HullOFOD11eProblem 21 - 28
HullOFOD11eProblem 21 - 28
Strike 900
r 5.00%
q 2%
vol 20%
Remaining Life 2
IsCall 0
IsFut 0
Result 0
IsAmerican 0
80.0000
75.0000
70.0000
Tree BS
2 #VALUE! #VALUE!
3 #VALUE! #VALUE! 65.0000
4 #VALUE! #VALUE!
5 #VALUE! #VALUE!
60.0000
6 #VALUE! #VALUE!
7 #VALUE! #VALUE!
8 #VALUE! #VALUE! 55.0000
9 #VALUE! #VALUE!
10 #VALUE! #VALUE!
50.0000
11 #VALUE! #VALUE! 0 10 20 30 40
12 #VALUE! #VALUE!
13 #VALUE! #VALUE!
14 #VALUE! #VALUE!
15 #VALUE! #VALUE!
16 #VALUE! #VALUE!
17 #VALUE! #VALUE!
18 #VALUE! #VALUE!
19 #VALUE! #VALUE!
20 #VALUE! #VALUE!
21 #VALUE! #VALUE!
22 #VALUE! #VALUE!
23 #VALUE! #VALUE!
24 #VALUE! #VALUE!
25 #VALUE! #VALUE!
26 #VALUE! #VALUE!
27 #VALUE! #VALUE!
28 #VALUE! #VALUE!
29 #VALUE! #VALUE!
30 #VALUE! #VALUE!
31 #VALUE! #VALUE!
32 #VALUE! #VALUE!
33 #VALUE! #VALUE!
34 #VALUE! #VALUE!
35 #VALUE! #VALUE!
36 #VALUE! #VALUE!
37 #VALUE! #VALUE!
38 #VALUE! #VALUE!
39 #VALUE! #VALUE!
40 #VALUE! #VALUE!
41 #VALUE! #VALUE!
42 #VALUE! #VALUE!
43 #VALUE! #VALUE!
44 #VALUE! #VALUE!
45 #VALUE! #VALUE!
46 #VALUE! #VALUE!
47 #VALUE! #VALUE!
48 #VALUE! #VALUE!
49 #VALUE! #VALUE!
50 #VALUE! #VALUE!
Tree
BS
20 30 40 50 60
Stock Price 900
Strike 900
r 5.00%
q 2%
vol 20%
Remaining Life 2
IsCall 0
IsFut 0
Result 0
IsAmerican 1
Tree
12.0000
Tree
2 #VALUE! 10.0000
3 #VALUE!
4 #VALUE! 8.0000
5 #VALUE!
6 #VALUE! 6.0000
7 #VALUE!
8 #VALUE!
4.0000
9 #VALUE!
10 #VALUE!
2.0000
11 #VALUE!
12 #VALUE!
13 #VALUE! 0.0000
0 10 20 30 40
14 #VALUE!
15 #VALUE!
16 #VALUE!
17 #VALUE!
18 #VALUE!
19 #VALUE!
20 #VALUE!
21 #VALUE!
22 #VALUE!
23 #VALUE!
24 #VALUE!
25 #VALUE!
26 #VALUE!
27 #VALUE!
28 #VALUE!
29 #VALUE!
30 #VALUE!
31 #VALUE!
32 #VALUE!
33 #VALUE!
34 #VALUE!
35 #VALUE!
36 #VALUE!
37 #VALUE!
38 #VALUE!
39 #VALUE!
40 #VALUE!
41 #VALUE!
42 #VALUE!
43 #VALUE!
44 #VALUE!
45 #VALUE!
46 #VALUE!
47 #VALUE!
48 #VALUE!
49 #VALUE!
50 #VALUE!
Tree
Tree
0 20 30 40 50 60
Stock Price 900
Strike 900
r 5.00%
q 2%
vol 20%
Remaining Life 2
IsCall 0
IsFut 0
Result 0 90.
88.
IsAmerican 1
86.
84.
82.
80.
78.
Tree Amer Tree Eur BS Ctl Var
2 #VALUE! 60.3718 71.3393 #VALUE! 76.
3 #VALUE! 78.7127 71.3393 #VALUE! 74.
4 #VALUE! 65.5541 71.3393 #VALUE!
5 #VALUE! 75.7509 71.3393 #VALUE! 72.
6 #VALUE! 67.4226 71.3393 #VALUE! 70.
7 #VALUE! 74.4815 71.3393 #VALUE!
8 #VALUE! 68.3810 71.3393 #VALUE!
9 #VALUE! 73.7783 71.3393 #VALUE!
10 #VALUE! 68.9632 71.3393 #VALUE!
11 #VALUE! 73.3319 71.3393 #VALUE!
12 #VALUE! 69.3541 71.3393 #VALUE!
13 #VALUE! 73.0235 71.3393 #VALUE!
14 #VALUE! 69.6347 71.3393 #VALUE!
15 #VALUE! 72.7977 71.3393 #VALUE!
16 #VALUE! 69.8459 71.3393 #VALUE!
17 #VALUE! 72.6252 71.3393 #VALUE!
18 #VALUE! 70.0105 71.3393 #VALUE!
19 #VALUE! 72.4892 71.3393 #VALUE!
20 #VALUE! 70.1424 71.3393 #VALUE!
21 #VALUE! 72.3792 71.3393 #VALUE!
22 #VALUE! 70.2505 71.3393 #VALUE!
23 #VALUE! 72.2884 71.3393 #VALUE!
24 #VALUE! 70.3408 71.3393 #VALUE!
25 #VALUE! 72.2122 71.3393 #VALUE!
26 #VALUE! 70.4172 71.3393 #VALUE!
27 #VALUE! 72.1473 71.3393 #VALUE!
28 #VALUE! 70.4827 71.3393 #VALUE!
29 #VALUE! 72.0914 71.3393 #VALUE!
30 #VALUE! 70.5396 71.3393 #VALUE!
31 #VALUE! 72.0428 71.3393 #VALUE!
32 #VALUE! 70.5893 71.3393 #VALUE!
33 #VALUE! 72.0000 71.3393 #VALUE!
34 #VALUE! 70.6333 71.3393 #VALUE!
35 #VALUE! 71.9622 71.3393 #VALUE!
36 #VALUE! 70.6724 71.3393 #VALUE!
37 #VALUE! 71.9284 71.3393 #VALUE!
38 #VALUE! 70.7074 71.3393 #VALUE!
39 #VALUE! 71.8981 71.3393 #VALUE!
40 #VALUE! 70.7389 71.3393 #VALUE!
41 #VALUE! 71.8708 71.3393 #VALUE!
42 #VALUE! 70.7674 71.3393 #VALUE!
43 #VALUE! 71.8460 71.3393 #VALUE!
44 #VALUE! 70.7933 71.3393 #VALUE!
45 #VALUE! 71.8235 71.3393 #VALUE!
46 #VALUE! 70.8170 71.3393 #VALUE!
47 #VALUE! 71.8028 71.3393 #VALUE!
48 #VALUE! 70.8387 71.3393 #VALUE!
49 #VALUE! 71.7839 71.3393 #VALUE!
50 #VALUE! 70.8586 71.3393 #VALUE!
90.0000
84.0000
82.0000
80.0000
78.0000
Ctl Var
76.0000
74.0000
72.0000
70.0000
0 10 20 30 40 50 60
P
Stock Price 900
Strike 900
r 5.00%
q 2%
vol 85.00
Remaining Life 2
IsCall 0
IsFut 0
Result 6
IsAmerican 1
Tree
1200.00%
1000.00%
Tree
800.00%
2 #VALUE!
3 #VALUE!
4 #VALUE! 600.00%
5 #VALUE!
6 #VALUE! 400.00%
7 #VALUE!
8 #VALUE! 200.00%
9 #VALUE!
10 #VALUE!
0.00%
11 #VALUE! 0 10 20 30 40
12 #VALUE!
13 #VALUE!
14 #VALUE!
15 #VALUE!
16 #VALUE!
17 #VALUE!
18 #VALUE!
19 #VALUE!
20 #VALUE!
21 #VALUE!
22 #VALUE!
23 #VALUE!
24 #VALUE!
25 #VALUE!
26 #VALUE!
27 #VALUE!
28 #VALUE!
29 #VALUE!
30 #VALUE!
31 #VALUE!
32 #VALUE!
33 #VALUE!
34 #VALUE!
35 #VALUE!
36 #VALUE!
37 #VALUE!
38 #VALUE!
39 #VALUE!
40 #VALUE!
41 #VALUE!
42 #VALUE!
43 #VALUE!
44 #VALUE!
45 #VALUE!
46 #VALUE!
47 #VALUE!
48 #VALUE!
49 #VALUE!
50 #VALUE!
Tree
Tree
0 20 30 40 50 60
DerivaGem - Version 4.00
For Excel 2000 and more recent versions of Excel
Important: Do not forget to enable Macros. If you are using Office 2007 you will have to
click on the Options button and choose "Enable this content"
en designed to
ives" 10/E
ware in DG400.xls
5.0%
Example: #VALUE!
4.5%
4.0%
Function 2: DiscountBondYieldFromPrice(Life, Price) 3.5%
Calculates the yield of a discount bond from its price per dollar.
3.0%
Arguments:
Life 0.25 Life of the bond in years. Life <= 1 year. 2.5%
Price 0.98 Bond price per dollar of principal.
2.0%
0 1 2 3 4
Example: #VALUE!
Example: #VALUE!
Example: #VALUE!
Example: #VALUE!
Function 9: BondAccrual(Life, Coupon, Principal, Freq, T)
Calculates the amount of coupon accrued between the last payment date before T and time T.
BondAccrual = dirty price at T less clean price at T.
Arguments:
Life 7.3 Life of the bond in years from today.
Coupon 0.06 Coupon (rate per year)
Principal 100 Bond principal
Freq 2 Frequency of payments on bond per year (=12, 4, 2, or 1)
T 0 Time at which accrual is calculated.
Example: #VALUE!
Example: #VALUE!
Example: #VALUE!
Swap functions
Function 12: SwapPrice(Starts, Life, SwapRate, Notional, Freq, IsPayFixed, LastReset, iType, Zeros, ForwardRates, Result)
Calculates the value of a swap in which we receive SwapRate for Life years starting in Start years.
Arguments:
Start -0.25 7.3 7.3 Time in years until swap start.
Life 5 5 5 Life of swap in years
SwapRate 5.00% 5.00% 5.00% Fixed swap rate which we receive.
Notional 100 100 100 Swap notional
Freq 2 2 2 Frequency of payments on bond per year (=12, 4, 2, or 1)
IsPayFixed 0 0 0 Are we paying fixed or floating
Last Reset 4.00% 0.00% 0.00%
iType 0 0 0 Type of swap: 0 for OIS, 1 for LIBOR
Zeros Array containing continuously compounded zero curve: Maturities in the first co
Fwds Array containing LIBOR forward rates
Result 0 1 2 0=Price, 1=DV01, 2=Gamma01
Sample MarketData:
0 0.25 3.00% Deposit
The input data does not have to be in any particular
order. It is sorted in increasing maturity by the
calculator.
Example: #VALUE! #VALUE! The zero curve is an array function. It returns 2 columns and n rows
of results.
#VALUE! #VALUE!
#VALUE! #VALUE! To insert an array function select (highlight) a range. In this example
#VALUE! #VALUE! the range is 2 columns and 15 rows. Type in the function
("=(SwapZeroCurve(B179:F193)") and then type Ctrl-Alt-Enter (all at
#VALUE! #VALUE! the same time).
#VALUE! #VALUE!
#VALUE! #VALUE! If you select a range that is too big it shows #N/A in the surplus cells.
If you select a range that is too small you only see part of the results.
#VALUE! #VALUE!
#VALUE! #VALUE! To edit an array function you must select the entire array (in this
case 2 columns and 15 rows) edit the function and type Ctrl-Alt-
#VALUE! #VALUE! Enter .
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
OIS Discounting
MarketData definition:
Type
Column 1 2 3 4 5
Deposit 0 Life Yield
Bond 1 Life Coupon Yield Freq
Sample MarketData:
0 0.25 1.00% Deposit
0 0.5 1.20% Deposit
0 1 1.40% Deposit
1 1.5 2.00% 1.60% 1 Bond
1 2 2.00% 1.80% 1 Bond
1 3 2.00% 2.00% 1 Bond
1 5 2.00% 2.10% 1 Bond
1 7 2.00% 2.20% 1 Bond
1 10 2.00% 2.40% 1 Bond
1 12 2.00% 2.40% 1 Bond
1 15 2.00% 2.40% 1 Bond
1 20 2.00% 2.40% 1 Bond
1 2 3 4 5 6 7 8 9 10
Term Structure
pounded interest rates. 0 3.000%
The term structure is a 2 by n array. The first
0.5 3.353% column contains the rate maturity and the second
1 3.664% column the continuously compounded rate.
he first column and zero rates in second column 1.5 3.938%
The number of rows in the array, n, can be as
2 4.180% small as 1 or as large as you like.
2.5 4.394%
3 4.583%
4 4.900%
5 5.100%
mpounded interest rates. 7 5.400%
10 5.754%
el of market data
nd n rows
is example
nter (all at
urplus cells.
the results.
(in this
trl-Alt-
array. The first
urity and the second
pounded rate.
ay, n, can be as
e.
Forward Rates
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
4.000%
Function 16: Black_Scholes(S, K, r, q, vol, T, IsCall, IsFut, Divs, Result)
Carries out Black-Scholes calculations for European options on stocks, stock indices, currencies and futures
Arguments:
S 50 Asset Price
K 50 Strike price
r 0.05 Domestic risk-free rate
q 0.02 Dividend yield for stock index options, foreign risk free rate for currency options (Enter 0 if this paramet
vol 0.25 Volatility. BUT Enter Price if Implied Volatility is to be calculated (i.e. Result=6)
T 1 Time to maturity (yrs)
IsCall 1 TRUE if call, FALSE if put
IsFut 0 TRUE if futures option, FALSE otherwise
Divs Array containing time to dividend payment and size of dividend payment in cols 1 and 2. (Leave blank if
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol
Function 17: TreeEquityOpt(S, K, r, q, vol, T, IsCall, IsFut, Divs, IsAmerican, nSteps, Result)
Carries out binomial tree calculations for European or American options on stocks, stock indices, currencies, and futures
Arguments:
S 50 Asset Price
K 50 Strike price
r 0.05 Domestic risk-free rate
q 0.02 Dividend yield for stock index options, foreign risk free rate for currency options (Enter 0 if this paramet
vol 0.25 Volatility. BUT Enter Price if Implied Volatility is to be calculated (i.e. Result=6)
T 1 Time to maturity (yrs)
IsCall 1 TRUE if call, FALSE if put
IsFut 0 TRUE if futures option, FALSE otherwise
Divs Array containing time to dividend payment and size of dividend payment in cols 1 and 2. (Leave blank if
IsAmerican 0 TRUE if American option, FALSE if European option
nSteps 25 Number of time steps on tree
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol
Example: #VALUE!
Example: #VALUE!
Example: #VALUE!
Function 22: CompoundOption(S, K1, r, q, vol, T1, IsCall, IsFut, K2, T2, IsOptionOnCall, Result)
Carries out calculations for compound options on non-dividend-paying stocks, stock indices,currencies and futures
Arguments:
S 50 Asset Price
K1 5 First Strike Price
r 0.05 Domestic risk-free rate
q 0.02 Dividend yield for stock index options, foreign risk free rate for currency options (Enter 0 if this paramet
vol 0.25 Volatility. BUT Enter Price if Implied Volatility is to be calculated (i.e. Result=6)
T1 0.35 Time to first exercise
IsCall 1 True if first option a call, FALSE if first option a put
IsFut 0 TRUE if futures option, FALSE otherwise
K2 50 Second strike price
T2 1 Time to second exercise
tionOnCall 1 TRUE if second option is a call, FALSE if second option is a put
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol
Example: #VALUE!
Function 23: LookbackOption(S, r, q, vol, T, IsCall, IsFut, IsFixedLookback, Smax, Smin, K, Result)
Carries out calculations for lookback options on non-dividend-paying stocks, stock indices,currencies and futures
Arguments:
S 50 Asset Price
r 0.05 Domestic risk-free rate
q 0.02 Dividend yield for stock index options, foreign risk free rate for currency options (Enter 0 if this paramet
vol 0.25 Volatility. BUT Enter Price if Implied Volatility is to be calculated (i.e. Result=6)
T 1 Time to maturity (yrs)
IsCall 1 TRUE if lookback call, FALSE if lookback put
IsFut 0 TRUE if futures option, FALSE otherwise
edLookback 1 TRUE for fixed lookback
Smax 50 Maximum price to date (equals to current price if a new instrument)
Smin 50 Minimum price to date (equals current price if a new instrument)
K 55 Strike price for Fixed Lookback; Ignored otherwise
Result 1 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol
Example: #VALUE!
ons (Enter 0 if this parameter not applicable)
es and futures
and futures
ons (Enter 0 if this parameter not applicable)
es and futures
Portfolio definition:
Type
Underlying 0 Number
Black Scholes 1 Number K T IsCall
TreeEquityOption 2 Number K T IsCall nSteps
Binaryoption 3 Number K T IsCall IsCash
BarrierOption 4 Number K T IsCall Barrier
AverageOption 5 Number K T IsCall CurrAve
ChooserOption 6 Number K T TimeToChoice
CompoundOption 7 Number K1 T1 IsCall K2
LookBackOption 8 Number K T IsCall IsFixedLookback
Sample Portfolio
Type Number
Underlying 0 -2
Black Scholes 1 50 55 0.5 1
Black Scholes 1 50 48 0.75 1
TreeEquityOption 2 100 50 0.5 0 50
Example: #VALUE!
ndex, currency, or futures
IsAmerican
IsUp IsIn
TimeSoFar
T2 IsOptOnCall
Smax Smin
Dividends
0.5 1
0.75 1
1
Function 25: CEVOption(S, K , r, q, T, IsCall, CEV_sigma, CEV_alpha, result)
Calculates equity option prices using the CEV (Constant Elasticity of Variance Model)
Arguments:
S 50 Asset Price
K 50 Strike price
r 0.05 Domestic risk-free rate
q 0.02 Dividend yield for stock index options, foreign risk free rate for currency options (Enter 0 if
T 1 Time to maturity (yrs)
IsCall 1 TRUE if call, FALSE if put
CEV_sigma 0.25 CEV volatility parameter
CEV_alpha 1 CEV volatility parameter (0 <= alpha < 2)
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho
Example: #VALUE!
Example: #VALUE!
Example: #VALUE!
Function 28: HestonOption(S, K, r, q, T, IsCall, volatility, rev_level, rev_rate, vol_of_vol, rho, result)
Calculates equity option prices using the Heston Model
Arguments:
S 50 Asset Price
K 50 Strike price
r 0.05 Domestic risk-free rate
q 0.02 Dividend yield for stock index options, foreign risk free rate for currency options (Enter 0 if
T 1 Time to maturity (yrs)
IsCall 1 TRUE if call, FALSE if put
volatility 25.0% Intial volatility
rev_level 30.0% Level volatility reverts to
rev_rate 5.0% Reversion rate
vol_of_vol 2 Volatility of the variance
rho -0.5 Correlation between stock price and volatility
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho
Example: #VALUE!
Example: #VALUE!
rrency options (Enter 0 if this parameter not applicable)
Example: #VALUE!
Function 31: BachelierCap(Start, Life, CapRate, L, Frequ, StdDev, IsCap, OIS, Forwards, Result)
Carries out calculations for caps and floors using Bachelier model
Arguments:
Start 0 Time (years from today) when cap starts
Life 10 Life of cap in years
CapRate 5.00% Cap Rate
L 100 Notional amount
Frequ 4 Number of times a year cap is settled (= 12, 4, 2, or 1)
StdDev 1.25% Standard deviation rate. But enter price if implied StdDev is to be calculated (i.e.Result=4)
IsCap 1 TRUE if cap, FALSE if Floor
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=ImpliedVol
Example: #VALUE!
Function 32: ShiftedBlackCap(Start, Life, CapRate, L, Frequ, volatility, shift, IsCap, Zeros, Fwds, Result)
Carries out calculations for caps and floors using shifted lognormal model
Arguments:
Start 0 Time (years from today) when cap starts
Life 10 Life of cap in years
CapRate 6.00% Cap Rate
L 100 Notional amount
Frequ 4 Number of times a year cap is settled (= 12, 4, 2, or 1)
Vol 25.00% Volatility. But enter price if implied Vol is to be calculated (i.e.Result=4)
Shift 2.00% Amount lognormal distribution is shifted by
IsCap 1 TRUE if cap, FALSE if floor
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=ImpliedVol
Example: #VALUE!
Function 33: SABRCap(Start, Life, CapRate, L, Frequ, Vol0, Beta, Vol_of_Vol, rho, shift, IsCap, Zeros, Result)
Carries out calculations for caps and floors using SABR model
Arguments:
Start 0 Time (years from today) when cap starts
Life 10 Life of cap in years
CapRate 6.00% Cap Rate
L 100 Notional amount
Frequ 4 Number of times a year cap is settled (= 12, 4, 2, or 1)
Vol0 25.00% Volatility. But enter price if implied Vol is to be calculated (i.e.Result=4)
Beta 1 SABR beta coefficient
Vol_of_Vol 1.1 Volatility of volatility
Correlation -0.5 Correlation between forward rate and volatility
Shift 0.00% Amount SABR distribution is shifted by
IsCap 1 TRUE if cap, FALSE if floor
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega
Example: #VALUE!
OIS Zeros Forward Rates
0.25 0.029888 0.25 0.04
0.5 0.031747 0.5 0.04
0.75 0.032598 0.75 0.04
1 0.033731 1 0.04
2 0.034725 1.25 0.04
3 0.035737 1.5 0.04
4 0.036243 1.75 0.04
5 0.036759 2 0.04
econd column 7 0.037819 3 0.04
10 0.038907 5 0.04
15 0.039426 7 0.04
20 0.040036 10 0.04
30 0.041506 15 0.04
20 0.04
30 0.04
i.e.Result=4)
econd column
econd column
econd column
Function 34: BlackSwapOpt(OptLife, SwapLife, SwapRate, L, Frequ, vol, IsPayFix, Zeros, Forwards, Result)
Price of option to enter into a swap using Black's model
Arguments:
OptLife 2 Option Life in years
SwapLife 8 Swap life after option expiry in years
SwapRate 5.00% Strike Swap Rate
L 100 Principal amount
Frequ 2 Frequency of payments on swap (= 12, 4, 2, or 1)
vol 20.00% Volatility. BUT enter price if implied volatility is to be calculated (i.e. Result=4)
IsPayFix 1 TRUE if option to pay strike swap rate, FALSE if option to receive strike swap rate
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 2 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied Volatility
Example: #VALUE!
Function 35: BachelierSwapOpt(OptLife, SwapLife, SwapRate, L, Frequ, StdDev, IsPayFix, Zeros, Forwards, Result)
Price of option to enter into a swap using Bachelier model
Arguments:
OptLife 2 Option Life in years
SwapLife 8 Swap life after option expiry in years
SwapRate 5.00% Strike Swap Rate
L 100 Principal amount
Frequ 2 Frequency of payments on swap (= 12, 4, 2, or 1)
StdDev 1.25% Standard deviation rate. BUT enter price if implied volatility is to be calculated (i.e. Result=4)
IsPayFix 1 TRUE if option to pay strike swap rate, FALSE if option to receive strike swap rate
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied Volatility
Example: #VALUE!
Function 36: ShiftedBlackSwapOpt(OptLife, SwapLife, SwapRate, L, Frequ, vol, Shift, IsPayFix, Zeros, Forwards, Result)
Price of option to enter into a swap using shifted lognormal model
Arguments:
OptLife 2 Option Life in years
SwapLife 8 Swap life after option expiry in years
SwapRate 5.00% Strike Swap Rate
L 100 Principal amount
Frequ 2 Frequency of payments on swap (= 12, 4, 2, or 1)
vol 20.00% Volatility. BUT enter price if implied volatility is to be calculated (i.e. Result=4)
Shift 2.00%
IsPayFix 1 TRUE if option to pay strike swap rate, FALSE if option to receive strike swap rate
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 2 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied Volatility
Example: #VALUE!
Function 37: SABRSwapOpt(Start, Life, CapRate, L, Frequ, volatility, shift, IsCap, Zeros, Result)
Price of option to enter into a swap using SABR model
Arguments:
Start 2 Time (years from today) when cap starts
Life 8 Life of cap in years
SwapRate 5.00% Cap Rate
L 100 Notional amount
Frequ 4 Number of times a year cap is settled (= 12, 4, 2, or 1)
Vol0 20.00% Volatility. But enter price if implied Vol is to be calculated (i.e.Result=4)
Beta 1 SABR beta coefficient
Vol_of_Vol 0.001 Volatility of volatility
Correlation 0 Correlation between forward rate and volatility
Shift 0.00% Amount SABR distribution is shifted by
IsPayFix 1 TRUE if cap, FALSE if floor
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Forwards Array of forward rates
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega
Example: #VALUE!
wards, Result) OIS Zeros Forward Rates
0.25 0.029888 0.25 0.04
0.5 0.031747 0.5 0.04
0.75 0.032598 0.75 0.04
1 0.033731 1 0.04
2 0.034725 1.25 0.04
3 0.035737 1.5 0.04
4 0.036243 1.75 0.04
e. Result=4) 5 0.036759 2 0.04
trike swap rate 7 0.037819 3 0.04
o rates in second column 10 0.038907 5 0.04
15 0.039426 7 0.04
20 0.040036 10 0.04
30 0.041506 15 0.04
20 0.04
30 0.04
e. Result=4)
trike swap rate
o rates in second column
Example #VALUE!
Example #VALUE!
Example #VALUE!
Term Structure
0 3.00%
1 3.66%
2 4.18%
3 4.58%
4 4.90%
5 5.14%
6 5.33%
7 5.48%
8 5.59%
9 5.68%
10 5.75%
econd column
ted (i.e.Result=4)
econd column
del,nSteps,Zeros,Result)
econd column
Function 41: DefaultProbability(t, HazardRates)
Calculates the probability of a default by time t using a given term structure of hazard rates
Arguments:
t 1.25 Default event occcurs on or before t
HazardRates Array containing hazard rate curve: Maturities in the first column and hazard rates in second co
Example #VALUE!
Example #VALUE!
Example #VALUE!
es in second column
azard rates in second column
es in second column
azard rates in second column
es in second column
CDS Spreads
1 25
2 40
3 50
4 55
5 60
10 64
Function 45: CDO_Spread(Life, Frequ, Recovery, Attach, Detach, Correlation, nFirms, nPoints, Zeros, Ha
Calculates the breakeven CDO spread in basis points
Arguments:
Life 5 Life of the CDS in years
Frequ 4 Frequency of payments on the CDS (=12, 4, 2, or 1)
Recovery 40.00% Recovery rate in the event of default (0<= R <=1)
Attach 10.00% Tranche attachment point (A >= 0)
Detach 15.00% Tranche detachment point (A < D <= 1)
Correlation 20.00% Copula Correlation (0 <= corr <= 1)
nFirms 125 Number of companies in the portfolio (<=250)
nPoints 10 Number of integration points (<=50)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
HazardRates Array containing hazard rate curve: Maturities in the first column and hazard rates in second colum
Example #VALUE!
Function 46: CDO_UpFront(Life, Frequ, Recovery, Attach, Detach, Correlation, Spread, nFirms, nPoints, Zeros, HazardRates)
Calculates the breakeven upfront payment as a proportion of the notional for the CDO tranche
Arguments:
Life 5 Life of the CDS in years
Frequ 4 Frequency of payments on the CDS (=12, 4, 2, or 1)
Recovery 40.00% Recovery rate in the event of default (0<= R <=1)
Attach 0.00% Tranche attachment point (A >= 0)
Detach 3.00% Tranche detachment point (A < D <= 1)
Correlation 20.00% Copula Correlation (0 <= corr <= 1)
Spread 500 Spread in basis points that is paid in addition to the upfront payment
nFirms 125 Number of companies in the portfolio (<=250)
nPoints 5 Number of integration points (<=50)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
HazardRates Array containing hazard rate curve: Maturities in the first column and hazard rates in second colum
Example #VALUE!
Function 47: ImplyCopulaCorrelation(Life, Frequ, Recovery, Attach, Detach, Spread, UpFront, nFirms, nPoints, Zeros, Hazard
Calculates the breakeven upfront payment as a proportion of the notional for the CDO tranche
Arguments:
Life 5 Life of the CDS in years
Frequ 4 Frequency of payments on the CDS (=12, 4, 2, or 1)
Recovery 0.4 Recovery rate in the event of default (0<= R <=1)
Attach 0.00% Tranche attachment point (A >= 0)
Detach 3.00% Tranche detachment point (A < D <= 1)
Spread 500 Spread in basis points that is paid in addition to the upfront payment
UpFront 40.00% Upfront payment as proportion of notional
nFirms 125 Number of companies in the portfolio (<=250)
nPoints 5 Number of integration points (<=50)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
HazardRates Array containing hazard rate curve: Maturities in the first column and hazard rates in second colum
Example #VALUE!
Function 48: CDO_Value(Life, Frequ, Recovery, Attach, Detach, Correlation, Spread, UpFront, nFirms, nPoints, Zeros, Hazard
Calculates the value of the CDO tranche per $100 of notional
Arguments:
Life 5 Life of the CDS in years
Frequ 4 Frequency of payments on the CDS (=12, 4, 2, or 1)
Recovery 40.00% Recovery rate in the event of default (0<= R <=1)
Attach 0.00% Tranche attachment point (A >= 0)
Detach 3.00% Tranche detachment point (A < D <= 1)
Correlation 20.00% Copula Correlation (0 <= corr <= 1)
Spread 500 Spread in basis points that is paid in addition to the upfront payment
UpFront 35.00% Upfront payment as proportion of notional
nFirms 125 Number of companies in the portfolio (<=250)
nPoints 8 Number of integration points (<=50)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
HazardRates Array containing hazard rate curve: Maturities in the first column and hazard rates in second colum
Example #VALUE!
Hazard Rates Term Structure
0 0.50% 0 3.00%
0.5 1.00% 1 3.66%
1 1.25% 2 4.18%
2 1.00% 3 4.58%
5 1.00% 4 4.90%
10 1.00% 5 5.14%
6 5.33%
7 5.48%
8 5.59%
9 5.68%
o rates in second column 10 5.75%
and hazard rates in second column