powered by
The payout of the spread option is max(S1_T - S2_T - K, 0) where S1_T and S2_T are the prices at expiry T of assets 1 and 2 respectively and K is the strike price.
max(S1_T - S2_T - K, 0)
S1_T
S2_T
T
K
SpreadKirk( strike = 0, spot1, spot2, texp = 1, sigma1, sigma2, corr, intr = 0, divr1 = 0, divr2 = 0, cp = 1L, forward1 = spot1 * exp(-divr1 * texp)/df, forward2 = spot2 * exp(-divr2 * texp)/df, df = exp(-intr * texp) )
(vector of) strike price
(vector of) spot price of asset 1
(vector of) spot price of asset 2
(vector of) time to expiry
(vector of) volatility of asset 1
(vector of) volatility of asset 2
correlation
interest rate
dividend rate of asset 1
dividend rate of asset 2
call/put sign. 1 for call, -1 for put.
1
-1
forward price of asset 1. If given, overrides spot1
spot1
forward price of asset 2. If given, overrides spot2
spot2
discount factor. If given, df overrides intr
df
intr
option price
Kirk, E. (1995). Correlation in the energy markets. In Managing Energy Price Risk (First, pp. 71<U+2013>78). Risk Publications.
SwitchMargrabe
# NOT RUN { FER::SpreadKirk((-2:2)*10, 100, 120, 1.3, 0.2, 0.3, -0.5) # }
Run the code above in your browser using DataLab