0% found this document useful (0 votes)
87 views

Open Office DG201 Functions

This document describes functions to calculate prices and greeks for various types of derivative options including European, American, binary, barrier, average, and chooser options. It provides examples of the input parameters and output results for each pricing function.

Uploaded by

Javier Lopez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

Open Office DG201 Functions

This document describes functions to calculate prices and greeks for various types of derivative options including European, American, binary, barrier, average, and chooser options. It provides examples of the input parameters and output results for each pricing function.

Uploaded by

Javier Lopez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODS, PDF, TXT or read online on Scribd
You are on page 1/ 32

Title

DerivaGem - Version 2.01


For Open Office (Mac and Linux Users)
This is the Applications Builder Software that has been designed t
accompany John Hull's texts:

"Options, Futures and Other Derivatives" 8/E


and
"Fundamentals of Futures and Options Markets" 8/E
Both books are published by Pearson. They can be ordered from outlets such as
Amazon.com or directly from the publisher at www.mypearsonstore.com/bookstore

Important: Do not forget to set macro security on medium or low and Enable Macros

A-J Financial Systems, Inc., 2014

Page 1
Title

2.01
inux Users)
has been designed to
s:

atives" 8/E

s Markets" 8/E
ed from outlets such as
rsonstore.com/bookstore

r low and Enable Macros.

Page 2
Equity Options

Function 1: 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 p
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
Divs Array containing time to dividend payment and size of dividend payment in cols 1 and 2. (Leave
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol

Example: #VALUE! No Divs

#VALUE! With Divs Dividends


0.5 1
0.75 1

Function 2: 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 fut
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 p
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
Divs Array containing time to dividend payment and size of dividend payment in cols 1 and 2. (Leave
IsAmerican 0 1 if American; 0 otherwise
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! No Divs

#VALUE! With Divs Dividends


0.5 1
0.75 1

Page 3
Equity Options

es, currencies and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

end payment in cols 1 and 2. (Leave blank if not applicable)

stock indices, currencies, and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

end payment in cols 1 and 2. (Leave blank if not applicable)

Page 4
Binary Option

Function 3: BinaryOption(S, K, r, q, vol, T, IsCall, IsFut, Divs, IsCash, Result)


Carries out calculations for binary 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
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
Divs Array containing time to dividend payment and size of dividend payment in cols 1 and 2. (Leav
IsCash 1 1 if Cash; 0 if Asset or Nothing
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol

Example: #VALUE! No Divs

#VALUE! With Divs Dividends


0.5 1
0.75 1

Page 5
Binary Option

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

end payment in cols 1 and 2. (Leave blank if not applicable)

Page 6
Barrier Option

Function 4: BarrierOption(S, K, r, q,vol, T, IsCall, IsFut, H, IsUp, IsIn, Result)


Carries out calculations for barrier options on non-dividend-paying 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 p
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
H 65 Barrier
IsUp 1 1 if UP; 0 if Down
IsIn 0 1 if IN; 0 if OUT
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol

Example: #VALUE!

Page 7
Barrier Option

dices, currencies and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

Page 8
Average Option

Function 5: AverageOption(S, K, r, q, vol, T, IsCall, IsFut, CurrAve, TimeSoFar, Result)


Carries out calculations for Asian options on non-dividend-paying 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 p
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
CurrAve 50 Current Average (irrelevant if a new instrument)
TimeSoFar 0 Time since beginning of averaging in years (zero for a new instrument)
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol

Example: #VALUE!

Page 9
Average Option

ices, currencies and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

Page 10
Chooser Option

Function 6: ChooserOption(S, K, r, q, vol, T, IsFut, TimeToChoice, Result)


Carries out calculations for chooser options on non-dividend-paying 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
vol 0.25 Volatility. BUT Enter Price if Implied Volatility is to be calculated (i.e. Result=6)
T 1 Time to maturity (yrs)
IsFut 0 TRUE if futures option, FALSE otherwise
TimeToChoice 0.35 Time until choice between call and put has to be made
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol

Example: #VALUE!

Page 11
Chooser Option

ndices, currencies and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

Page 12
Compound Option

Function 7: 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
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
K2 50 Second strike price
T2 1 Time to second exercise
IsOptionOnCall 1 1 if second option is a call, 0 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!

Page 13
Compound Option

k indices, currencies and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

Page 14
Lookback Option

Function 8: 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
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 1 if Call, 0 if Put
IsFut 0 1 if Fut, 0 otherwise
IsFixedLookback 1 1 for fixed lookback; 0 otherwise
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 50 Strike price for Fixed Lookback; Ignored otherwise
Result 0 0=Price; 1=Delta; 2=Gamma; 3=Vega; 4=Theta; 5=Rho; 6=Implied Vol

Example: #VALUE!

Page 15
Lookback Option

ces, currencies and futures

for currency options (Enter 0 if this parameter not applicable)


ated (i.e. Result=6)

Page 16
Caps

Function 10: BlackCap(Start, End, CapRate, L, Frequ, vol, IsCap, Zeros, Result)
Carries out calculations for caps and floors using Black's model
Arguments:
Start 0 Time (years from today) when cap starts
End 5 Time (years from today) when cap ends
CapRate 0.05 Cap Rate
L 100 Notional amount
Frequ 4 Number of times a year cap is settled (= 12, 4, 2, or 1)
vol 0.25 Flat volatility. BUT enter price if implied volatility is to be calculated (i.e. Result=4)
IsCap 1 1 if cap, 0 if Floor
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=ImpliedVol

Example: #VALUE!

Function 11: HullWhiteCap(Start, End, CapRate, L, Frequ, sigma, a, IsCap, Zeros, Result)
Carries out calculations for caps and floors using Hull-White model
Arguments:
Start 0 Time (years from today) when cap starts
End 5 Time (years from today) when cap ends
CapRate 0.05 Cap Rate
L 100 Notional amount
Frequ 4 Number of times a year cap is settled (= 12, 4, 2, or 1)
sigma 0.015 Short rate standard deviation. But enter price if implied sigma is to be calculated (i.e. Result=4)
a 0.075 Reversion rate
IsCap 1 1 if Cap; 0 otherwise
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=ImpliedVol

Example: #VALUE!

Page 17
Caps

Term Structure
0 3.000%
0.5 3.353%
1 3.664%
1.5 3.938%
2 4.180%
2.5 4.394%
3 4.583%
culated (i.e. Result=4) 3.5 4.749%
4 4.896%
nd zero rates in second column 4.5 5.026%
5 5.140%
5.5 5.241%
6 5.331%
6.5 5.409%
7 5.479%
7.5 5.540%
8 5.594%
8.5 5.642%
9 5.684%
9.5 5.721%
10 5.754%

ma is to be calculated (i.e. Result=4)

nd zero rates in second column

Page 18
Swap Options

Function 13: BlackSwapOpt(Start, End, SwapRate, L, Frequ, vol, IsPayFix, Zeros, Result)
Carries out calculations for swap options using Black's model
Arguments:
Start 2 Time (years from today) when option matures
End 7 Time (years from today) when underlying swap ends
SwapRate 0.06 Strike Swap Rate
L 100 Principal amount
Frequ 2 Frequency of payments on swap (= 12, 4, 2, or 1)
vol 0.25 Volatility. BUT enter price if implied volatility is to be calculated (i.e. Result=4)
IsPayFix 1 1 if option to pay strike swap rate, 0 if option to receive strike swap rate
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied Volatility

Example: #VALUE!

Function 14: HullWhiteSwapOpt(Start, End, SwapRate, L, Frequ, sigma, a, IsPayFix, Zeros, Result)
Carries out calculations for swap options using the Hull-White model
Arguments:
Start 2 Time (years from today) when option matures
End 7 Time (years from today) when underlying swap ends
SwapRate 0.06 Strike Swap Rate
L 100 Principal amount
Frequ 2 Frequency of payments on swap (= 12, 4, 2, or 1)
sigma 0.015 Short rate standard deviation. But enter price if implied sigma is to be calculated (i.e. Result=4)
a 0.075 Reversion rate
IsPayFix 1 1 if option to pay strike swap rate, 0 if option to receive strike swap rate
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied sigma

Example: #VALUE!

Page 19
Swap Options

Term Structure
0 3.000%
0.5 3.353%
1 3.664%
1.5 3.938%
2 4.180%
2.5 4.394%
3 4.583%
ted (i.e. Result=4) 3.5 4.749%
4 4.896%
nd zero rates in second column 4.5 5.026%
5 5.140%
5.5 5.241%
6 5.331%
6.5 5.409%
7 5.479%
x, Zeros, Result) 7.5 5.540%
8 5.594%
8.5 5.642%
9 5.684%
9.5 5.721%
10 5.754%

ma is to be calculated (i.e. Result=4)

nd zero rates in second column

Page 20
Bond Options

Function 16: BlackBondOpt(BondLife, Coupon, Princ, Frequ, K, T, vol, IsCall, IsQuoted, Zeros, Result)
Carries out calculations for bond options using Black's model
Arguments:
BondLife 7 Life of bond in years(from today)
Coupon 0.06 Coupon (rate per year)
Princ 100 Bond Principal
Frequ 2 Frequency of payments on bond (=4, 2, or 1)
K 99.5 Strike Price
T 1 Time (in years) to option maturity
vol 0.2 Volatility. BUT enter price if implied volatility is to be calculated (i.e. Result=4)
IsCall 1 1 if Call, 0 if Put
IsQuoted 1 1 if strike is a quoted price, 0 if strike is cash price
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied sigma

Example: #VALUE!

Function 17: HullWhiteBondOpt(BondLife, Coupon, Princ, Frequ, K, T, sigma, a, IsCall, IsQuoted, Zeros, Result)
Carries out calculations for bond options using Hull-White model
Arguments:
BondLife 7 Life of bond in years(from today)
Coupon 0.06 Coupon (rate per year)
Princ 100 Bond Principal
Frequ 2 Frequency of payments on bond (=4, 2, or 1)
K 99.5 Strike Price
T 1 Time (in years) to option maturity
sigma 0.0125 Short rate standard deviation. But enter price if implied sigma is to be calculated (i.e. Result=4)
a 0.07 Reversion rate
IsCall 1 1 if Call, 0 if Put
IsQuoted 1 1 if strike is a quoted price, 0 if strike is cash price
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma, 3=Vega, 4=Implied sigma

Example: #VALUE!

Page 21
Bond Options

oted, Zeros, Result) Term Structure


0 3.000%
0.5 3.353%
1 3.664%
1.5 3.938%
2 4.180%
2.5 4.394%
3 4.583%
3.5 4.749%
ted (i.e. Result=4) 4 4.896%
4.5 5.026%
5 5.140%
nd zero rates in second column 5.5 5.241%
6 5.331%
6.5 5.409%
7 5.479%
7.5 5.540%
8 5.594%
Call, IsQuoted, Zeros, Result) 8.5 5.642%
9 5.684%
9.5 5.721%
10 5.754%

ma is to be calculated (i.e. Result=4)

nd zero rates in second column

Page 22
Bond and Swap

Function 19: BondPrice(BondLife, Coupon, Princ, Frequ, Zeros, IsClean, Result)


Values a bond
Arguments:
BondLife 5 Life of bond in years(from today)
Coupon 0.06 Coupon (rate per year)
Princ 100 Bond principal
Frequ 2 Frequency of payments on bond per year (=12, 4, 2, or 1)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
IsClean 1 If 1 result is the clean (quoted) price; if 0 result is dirty (cash) price
Result 0 0=Price, 1=Delta, 2=Gamma

Example: #VALUE!

Function 20: SwapPrice(Start, End, FixedRate, L, Frequ, Zeros, Result)


Values a plain vanilla interest rate swap. Note: ignores cash flows arising from reset dates prior to Start date
Arguments:
Start 0 Beginning of swap (years from today)
End 5 End of swap (years from today)
FixedRate 0.06 Fixed rate that is exchange for floating (compounding frequency corresponds to Frequ)
L 1000 Notional principal
Frequ 2 Frequency of payments on swap per year (=12, 4, 2, or 1)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
Result 0 0=Price, 1=Delta, 2=Gamma

Example: #VALUE!

Page 23
Bond and Swap

Term Structure
0 3.000%
0.5 3.353%
1 3.664%
1.5 3.938%
2 4.180%
2.5 4.394%
nd zero rates in second column 3 4.583%
3.5 4.749%
4 4.896%
4.5 5.026%
5 5.140%
5.5 5.241%
6 5.331%
6.5 5.409%
et dates prior to Start date 7 5.479%
7.5 5.540%
8 5.594%
8.5 5.642%
ency corresponds to Frequ) 9 5.684%
9.5 5.721%
10 5.754%
nd zero rates in second column

Page 24
CDS functions

Function 22: 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 occurs on or before t
HazardRates Array containing hazard rate curve: Maturities in column 1, hazard rates column 2

Example: #VALUE!

Function 23: CDS_Spread(Life, Frequ, Recovery, Zeros, HazardRates)


Calculates the breakeven CDS 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 0.4 Recovery rate in the event of default (0<= R <=1)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
HazardRates Array containing hazard rate curve: Maturities in column 1, hazard rates column 2

Example: #VALUE!

Function 24: CDS_Value(Life, Frequ, Recovery, Spread, Zeros, HazardRates)


Calculates the present value per $100 notional of buying protection at a specified spread
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)
Spread 50 CDS spread in basis points
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column
HazardRates Array containing hazard rate curve: Maturities in column 1, hazard rates column 2

Example: #VALUE!

Function 25: ImplyHazardRates(CDS_Spreads, Frequ, Recovery, Zeros


Determines the term structure of hazard rates that are consistent with a term structure of CDS spreads
Arguments:
CDS_Spreads Array containing spread term structure: Maturities in column 1, spreads in column 2
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)
Zeros Array containing zero curve: Maturities in the first column and zero rates in second column

Calculated hazard rates Check:


Example: #VALUE! #VALUE! #VALUE!

Page 25
CDS functions

#VALUE! #VALUE! #VALUE!


#VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE!

Page 26
CDS functions

Hazard Rates
0 0.500%
0.5 1.000%
1 1.250%
hazard rates column 2 2 1.000%
5 1.000%
10 1.000%

Term Structure
0 3.000%
0.5 3.353%
1 3.664%
1.5 3.938%
2 4.180%
nd zero rates in second column 2.5 4.394%
hazard rates column 2 3 4.583%
3.5 4.749%
4 4.896%
4.5 5.026%
5 5.140%
5.5 5.241%
6 5.331%
6.5 5.409%
7 5.479%
7.5 5.540%
8 5.594%
8.5 5.642%
9 5.684%
nd zero rates in second column 9.5 5.721%
hazard rates column 2 10 5.754%

e of CDS spreads

n 1, spreads in column 2

nd zero rates in second column

CDS Spreads
1 25

Page 27
CDS functions

2 40
3 50
4 55
5 60
10 64

Page 28
CDO functions

Function 26: CDO_Spread(Life, Frequ, Recovery, Attach, Detach, Correlation, nFirms, nPoints, Zeros, HazardRates)
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 0.4 Recovery rate in the event of default (0<= R <=1)
Attach 0.03 Tranche attachment point (A >= 0)
Detach 0.07 Tranche detachment point (A < D <= 1)
Correlation 0.25 Copula Correlation (0 <= corr <= 1)
nFirms 25 Number of companies in the portfolio (<=250)
nPoints 3 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 column 1, hazard rates column 2

Example: No example implemented because Open Office is slow


=CDO_SPREAD(B7;B8;B9;B10;B11;B12;B13;B14;K15:L35;K5:L10)

Function 27: CDO_UpFront(Life, Frequ, Recovery, Attach, Detach, Correlation, Spread, 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 Tranche attachment point (A >= 0)
Detach 0.03 Tranche detachment point (A < D <= 1)
Correlation 0.25 Copula Correlation (0 <= corr <= 1)
Spread 500 Spread in basis points that is paid in addition to the upfront payment
nFirms 50 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 column 1, hazard rates column 2

Example: No example implemented because Open Office is slow


=CDO_UPFRONT(B24;B25;B26;B27;B28;B29;B30;B31;B32;K15:L35;K5:L10)

Function 27: ImplyCopulaCorrelation(Life, Frequ, Recovery, Attach, Detach, Spread, UpFront, nFirms, nPoints, Zeros,
Calculates the copula correlation that is consistent with a set of fee data
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 Tranche attachment point (A >= 0)
Detach 0.03 Tranche detachment point (A < D <= 1)
Spread 500 Spread in basis points that is paid in addition to the upfront payment
UpFront 0.32 Upfront payment as proportion of notional
nFirms 25 Number of companies in the portfolio (<=250)

Page 29
CDO functions

nPoints 3 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 column 1, hazard rates column 2

Example: No example implemented because Open Office is slow


=IMPLYCOPULACORRELATION(B42;B43;B44;B45;B46;B47;B48;B49;B50;K15:L35;K5:L10)

Function 28: CDO_Value(Life, Frequ, Recovery, Attach, Detach, Correlation, Spread, UpFront, nFirms, nPoints, Zeros,
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 0.4 Recovery rate in the event of default (0<= R <=1)
Attach 0 Tranche attachment point (A >= 0)
Detach 0.03 Tranche detachment point (A < D <= 1)
Correlation 0.25 Copula Correlation (0 <= corr <= 1)
Spread 500 Spread in basis points that is paid in addition to the upfront payment
UpFront 0.32 Upfront payment as proportion of notional
nFirms 25 Number of companies in the portfolio (<=250)
nPoints 3 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 column 1, hazard rates column 2

Example: No example implemented because Open Office is slow


=CDO_VALUE(B60;B61;B62;B63;B64;B65;B66;B67;B68;B69;K15:L35;K5:L10)

Page 30
CDO functions

ms, nPoints, Zeros, HazardRates) Hazard Rates


0 0.500%
0.5 1.000%
1 1.250%
2 1.000%
5 1.000%
10 1.000%

Term Structure
nd zero rates in second column 0 3.000%
hazard rates column 2 0.5 3.353%
1 3.664%
1.5 3.938%
2 4.180%
2.5 4.394%
ead, nFirms, nPoints, Zeros, HazardRates) 3 4.583%
3.5 4.749%
4 4.896%
4.5 5.026%
5 5.140%
5.5 5.241%
6 5.331%
6.5 5.409%
7 5.479%
7.5 5.540%
8 5.594%
8.5 5.642%
nd zero rates in second column 9 5.684%
hazard rates column 2 9.5 5.721%
10 5.754%

d, UpFront, nFirms, nPoints, Zeros, HazardRates)

Page 31
CDO functions

nd zero rates in second column


hazard rates column 2

50;K15:L35;K5:L10)

d, UpFront, nFirms, nPoints, Zeros, HazardRates)

nd zero rates in second column


hazard rates column 2

Page 32

You might also like