Deriving the Formula
Provided that an investor has 1USD and the principal will be same regardless of which country to invest. Here, assume the investor will invest to US and Japan.
In the case when to investing 1USD at the yield of Rf for d period in US, the principal is,
1USD X (1 + Rf X d/360) ----------------- 1)
After converting 1USD to Japanese Yen and investing it at the yield of rv in Japan, convert it at Forward FX rate. In such case, the principal is,
1USD X S(1 + rv X d/360)/F ------------- 2)
S : Spot FX rate of USD/JPY
F : Forward FX rate of USD/JPY
As the formula of 1) and 2) should be the same,
1USD X (1 + Rf X d/360) = 1USD X S(1 + rv X d/360)/F
Accordingly, F = S X (1 + rv X d/360) / (1 + Rf X d/360) ---------------3)
Subtract S from both sides of 3) formula and get Swap Rate (SR):
Swap Rate(SR) = F - S = S X {(rv - Rf) X d/360} / (1 + Rf X d/360) --------------- 4)
Since the denominator (1 + Rf X d/360) of 4) formula is nearly close to 1, it can be simplified as below.
Swap Rate(SR) = F - S = S X {(rv - Rf) X d/360} ----------------- 5)
On 4) formula, if Rf > rv, the base currency is the currency of higher interest rate and it becomes Forward Discounted currency,
If Rf < rv, the base currency is the currency of lower interest rate and it becomes Forward Premium currency.
Example
USD 3 months (90 days) Term Deposit Interest Rate : 3.5%
JPY 3 months(90 days) Term Deposit Interest Rate : 0.1%
Spot Rate is USD/JPY = 120.10
If to use 4) formula In order to get 3 months Forward FX rate (F),
SR = F - S = 120.1 X {(0.001 - 0.035) X 90/360} / (1 + 0.035 X 90/360) = -1.02
As a result, 90 days Forward FX rate (F) is S + SR = 120.10 + (-1.02) = 119.08
cf) if to use the simplified formula 5),
SR = F - S = 120.1 X {0.001 - 0.035) X 90/360} = -1.03
F = S + SR = 120.10 + (-1.03) = 119.07
Therefore, there will be no big difference in the result when using the formal formula and that of the case when using the simplified formula.