Exchange Rates Financial Planner 2
Introduction This applet permits the currencies; Yen, GB pounds, Deuchemarks
(DM), Malaysian Ringgit (MR), Singapore Dollars, and US Dollars, to be
graphed against any other of this set, on a daily basis. It also permits
various calculations to be performed on the data for investment purposes.
Below is a screen capture of the applet, which will be used to explain
its features.
The Applet
The applet comprises twelve radio buttons at the top. The first set of
six radio buttons comprises the base currency, Yen/100, GBP, DM, MR, SD
or USD. Choosing the particular radio button activates which ever is the
currency of interest. The second set of six radio buttons comprises the
compared currency, ¥/100, £, dm, M$, S$ or us$. Choosing the
particular radio button activates which ever is the currency that is to
be compared against the base currency. Thus, there are two buttons to be
chosen, that is the base currency, which is USD shown in the above diagram
and the compared currency, which is DM in the above diagram. The six scrollbars
are used to enter information for visual display of the calculations. The
first scrollbar on the left permits the day of sale (of DM for USD) to
be displayed in written detail for the currency chosen. In this example,
day 98 will show the date of day 16 (31st September 1997), and
the currency (DM) is indicated at an interbank rate of 1.7625 DM for 1
USD. The second scrollbar permits the horizontal day scale to be expanded
or contracted to permit more day decades to be displayed across the screen.
As the day decade numbers are stretched across the screen, the scale interval
indicating the day decade number automatically follows. The horizontal
scale units have no meaning as far as computing exchange rates. The third
scrollbar permits the purchase day to be entered. This is the day on which
DM was purchased for USD. In this example, day 54 shows the date as 4th
October 1997, and the currency (DM) exchange rate is indicated at an interbank
rate of 1.8639 DM for 1 USD. The vertical scale, on the left-hand side
of the canvas, shows the compared currency under consideration (DM) and
a figure of the percentage change between lines is indicated. In this case,
it is approximately 1.471% change between any two horizontal lines. The
first of the lower tier of scrollbars labelled IB/HKB allows the ratio
of the interbank rate to the rate offered by your bank (in this case the
HongKong Bank) to be entered. This figure represents the real rate that
you would get from your bank, which is always less than the interbank rates.
In this case it is shown as 1.0048, that is, you would receive a rate which
is worse by approximately 0.48%. The fifth scrollbar allows you to enter
the amount of money in thousands (100,000 USD in this case) that you sold
on day 54, in order to purchase DM on the purchase day. This amount is
used to calculate the real loss or gain incurred if you change currency
on the sell date from DM back to USD. The amount of DM bought for 100,000
USD on day 54, is shown on the screen printout below the scrollbars as;
"Amount of currency bought on day 54 = 185500 DM." Note that this amount
is calculated from the HKB DM rate shown for day 54. The last scrollbar
permits you to enter the interest rate for the currency under consideration
for the month ahead. It is the interest rate per calendar month for a fixed
monthly deposit of the currency under consideration (in this case DM) offered
by the bank. The graph shows from day to day the variation of the currency
under consideration. The file "rates.txt" is manually updated daily to
obtain the latest exchange rates data. Below, is an example of how the
data is entered in the "rates.txt" file. The limit on the number of days
is due to the readability of the screen plot. All currency rates are those
compared against the USD. The inter-currency rates of pairs of currencies
not involving the USD, such as, the DM against the MR, etc. are calculated
by the applet.
| Day |
Date |
yen |
gbp |
dm |
mr |
sid |
| 1 |
190597 |
116.1965 |
0.6103 |
1.7071 |
2.4969 |
1.4345 |
| 2 |
200597 |
113.6701 |
0.6076 |
1.6949 |
2.5000 |
1.4305 |
| 3 |
220597 |
115.9350 |
0.6118 |
1.6933 |
2.5025 |
1.4315 |
| . |
|
|
|
|
|
|
| . |
|
|
|
|
|
|
.
|
|
|
|
|
|
|
| 97 |
021097 |
121.6200 |
0.6187 |
1.7722 |
3.3285 |
1.5315 |
| 98 |
031097 |
122.2601 |
0.6204 |
1.7625 |
3.3625 |
1.5420 |
Calculations
The applet permits the calculation of the amount of foreign currency that
can be bought for the amount of base currency to be sold. It takes account
of the Interbank rate to the Hongkong bank rate (IB/HKB factor). In the
example shown in the figure above, 100,000 USD is sold at a rate of 1.8639
DM per dollar, divided by the IB/HKB factor of 1.0048, giving 185,500 DM
on day 54. The basic rule for not losing any money on currency change is
to ensure that the currency changing back to USD from DM takes into account
the buy and sell rates of the bank (in this case the Hongkong bank). If
it is assumed that the conversion back to USD from DM is the same as the
conversion rate from USD to DM (1.0048 in this case), then the conversion
rate must be less than the rate from USD to DM divided by the square of
the IB/HKB factor. That is, for this example, 1.8639/(1.0048)(1.0048) =
1.84613. This is shown as on the second line of the screen dump as "Sell
DM when rate <1.84613." Changing the value of the first scrollbar changes
the day on which DM is sold for USD. As the 'sell day' changes, the exchange
rates will also change and so, the profit or loss changing back to USD
from DM changes. The third line of the screen dump gives the amount realized
in USD if DM is sold on a specific date. In this case, 185500 DM is sold
at a rate of 1.7625 DM to 1 USD. This conversion, divided by the IB/HKB
factor gives the amount realized in USD. For this case, the amount of USD
obtained on day 98 is found to be (185500)/(1.7625 x 1.0048) = 104,745
USD. The screen dump third line gives this result in the form "If sell
DM on day 98 get 104,745 USD before interest". The fourth line of the screen
dump on the left-hand side of the screen gives the amount of real profit
(that is profit after the IB/HKB factor has been taken into account) on
the 'sell day' over the 'purchase day'. It is the difference in the exchange
rates between the 'sell day' and the 'purchase day', divided by the IB/HKB
factor and multiplied by the original amount of USD sold. Its purpose is
to show how much foreign currency has been made (or lost) on the 'sell
day'. For this calculation, it is (currency rate on day 54 - currency rate
on day 98) x(USD sold)/ IB/HKB factor) = (1.8639-1.7625)(100,000)/1.0048
= 10,091.56 DM. This is shown on the fourth line of the screen dump as
"Real profit on day 98 over day 54 = 10,091.56 DM. The next calculation
is that of the amount of interest accrued over a one-month period. The
calculations shown above have not been for one month but for about 3 months.
Normally, for a fixed deposit you must wait for one calendar month before
you can change. For this case, the above calculations must be worked for
a one-month period and the decision whether to change currencies or not
can be made on the outcome of these calculations as shown by the screen
dumps. The interest is calculated by taking the "Bank ann. interest/calendar
month" This means that the bank will offer an annual interest that is then
divided by 12 to obtain the interest over a calendar month. In this case
the bank offers 5 1/8th %. The amount of interest accrued over a month
is the amount of foreign currency bought on day 54 multiplied by 41/800
and divided by 12 for a one month period. That is, 185500*41/(800 x 12)
= 792.239 as shown by the fifth line of the screen dump as "Interest over
1 month from day 5 = 792.238 DM. The final line of the screen dump shows
the amount of USD obtained if the DM is sold on day 98 after a period of
one-month (assuming it is one month for this calculation, rather than the
3 months shown). The interest accrued, divided by the exchange rate on
the 'sell day', divided by the IB/HKB factor will give the interest in
USD. This amount added to the third line of the screen dump "If sell DM
on day 98 get 105193 USD after interest" will give the total amount gained
due to currency conversion at the right time and interest accrued over
the period of a month from the 'purchase day'. That is, for this case,
(185500+792.238)/(1.7625 x 1.0048) = 105,192.8 USD. Each of the other possible
currency pairs follows the same calculations as given above. The
vertical red lines seen on the time axis represent the percentage change
of the plot from the previous day. Each horizontal grid line represents
0.5%. For example, on day 91 there is shown a spike that is 2.7 divisions
high in the positive direction. This means that between day 90 and day
91 the DM increased in value 2.7 x 0.5 = 1.35%. The plot indicates that
there was in increase, but the amount is difficult to determine. The spikes
overcome this indeterminacy. Also, running your eye along the time scale
and looking at the spikes above and below the time axis, gives an indication
of how the compared currency is behaving in the medium term. More spikes
above the line indicate that the compared currency is strengthening.
The source code (version Rev.1 98/08/06) is
available according to the GNU Public License.
Tony Townsend tonyart@ieee.org