Sunteți pe pagina 1din 23

Adfin Options Functions

User's Guide
Adfin Options Functions - User's Guide

Adfin Options Functions - User's Guide

Last Revised 16 May 02

Copyright © Reuters 2002 All rights reserved.

Republication or redistribution of Reuters content is expressly prohibited without the prior written consent of Reuters.

Except as permitted by law, no part of this document may be reproduced or transmitted by any process or means without the
prior consent of REUTERS Limited.

Reuters, by publishing this document, does not guarantee that any information contained herein is and will remain accurate or
that use of the information will ensure correct and faultless operation of the relevant service or equipment. Reuters, its agents
and employees shall not be held liable to or through any user for any loss or damage whatsoever resulting from reliance on the
information contained herein.

EFFIX, PowerPlus Pro, and Adfin are registered trademarks of the Reuters Group.
EFFIX Order Management System (OMS), EFFIX Licensing System (ELS), FxNSC, PIXL, PowerBase, and ROMS (Reuters
Order Management) are trademarks of the Reuters Group.
IDN, Network Management (NMS), Reuters DTS (Data Transformation System), Reuters DTM (Data Transformation Manager),
Reuters IPS (Internal Page Server), Reuters DCS (Data Contribution Servers), Reuters OCS (Optimizing Contribution Server),
Reuters Dealing 2000, Reuters GLCS (Global Limits Control System), Reuters KreditNet, Reuters KVAR+, Reuters News 2000,
RQF, RSF and Reuters Triarch are trademarks of REUTERS Limited.

Reuters and the Reuters sphere logo are registered trademarks and trademarks of the Reuters group of companies around the
world.

Microsoft Windows, Windows NT, Visual Basic and MS-DOS are registered trademarks, and Microsoft Excel, Microsoft Word,
and Microsoft Internet Explorer are products of Microsoft Corp. in the United States and other countries. Sun, Sun
Microsystems, Solaris and SunOS are trademarks of Sun Microsystems Inc. TIB is a registerd trademark, and Rendezvous is a
trademark of TIBCO Software Inc. UNIX is a registered trademark in the United States and other countries, licensed exclusively
through X/Open Company Limited.

Published by Reuters Limited, 85 Fleet Street, London EC4P 4AJ

Reuters Financial Software


6, rue Godefroy
F-92821 Puteaux
France
Tel: +33 1 47 62 64 66
Fax: +33 1 47 62 64 99
Internet: http://www.effix.fr

Support
Tel: +33 1 47 62 67 00
Email: marvin.help@reuters.com
Subscribe to the Marvin Newsletter: marvin.mailing@reuters.com

2
Adfin Options Functions - User's Guide

TABLE OF CONTENTS

1. USING ADFIN OPTIONS............................................................................................. 4

1.1. OPTIONS & WARRANTS ......................................................................................................... 4


1.1.1. NormalC ............................................................................................................................. 4
1.1.2. NormalS ............................................................................................................................. 4
1.1.3. OpCalcDeriv ....................................................................................................................... 4
1.1.4. OpHistVol ........................................................................................................................... 6
1.1.5. OpImpliedVol...................................................................................................................... 7
1.1.6. OpPremium ........................................................................................................................ 7
1.1.7. Previous Versions .............................................................................................................. 9

1.2. BOND OPTIONS ..................................................................................................................... 13


1.2.1. AdBondOptionDeriv.......................................................................................................... 13
1.2.2. AdBondOptionPremium ................................................................................................... 14
1.2.3. Previous Versions ............................................................................................................ 14

1.3. CAPS, FLOORS AND COLLARS............................................................................................ 16


1.3.1. AdCapFloorCaplets .......................................................................................................... 16
1.3.2. AdCapFloorImpliedVol ..................................................................................................... 17
1.3.3. AdCapFloorPremium........................................................................................................ 18
1.3.4. Previous Versions ............................................................................................................ 19

1.4. SWAPTIONS........................................................................................................................... 21
1.4.1. AdSwaptionPremium........................................................................................................ 21
1.4.2. AdSwaptionDeriv .............................................................................................................. 21
1.4.3. Previous Versions ............................................................................................................ 22

3
Adfin Options Functions - User's Guide

1. USING ADFIN OPTIONS

1.1. OPTIONS & WARRANTS

1.1.1. NormalC

=NormalC(Number)

Calculates y=f(x) using a cumulative normal distribution.

Arguments

Number : x value

Return Value

x
N c ( x) = N (t )dt
−∞

See also

NormalS

1.1.2. NormalS

=NormalS(Number)

Calculates y=f(x) using a normal distribution.

Arguments

Number : x value

Return Value

1 ( x − m) 2
N ( x) = exp[ − ]
2Πν 2ν 2

Note

This function was previously called Normal. It has been renamed due to an incompatibility with Excel.

See also

NormalC

1.1.3. OpCalcDeriv

=OpCalcDeriv(CalcDate,ExpiryDate,SpotPrice,StrikePrice,Volatility,
RiskFreeRateArray, ReturnArray, OptionStructure, RateStructure,
CalcStructure, AdMode)

Returns in an array all derivatives (delta, gamma, rho, theta, and vega) of an option on a security
(index, stock), a future, a commodity, or a currency.

4
Adfin Options Functions - User's Guide

In the case of an option on a security, the underlying pays a dividend that can be:

continuous
proportional
discounted
fixed

Arguments

CalcDate : Calculation date of the option


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Strike price of the option
Volatility : Volatility of the underlying instrument
RiskFreeRateArray : Term Structure array.
Depending on the model, this array has several forms:
• a Constant Yield (Value)
• a Zero Coupon Curve (Date, Value)
ReturnArray : Can be either a constant yield or a dividend array (Date, Dividend):
• Commodities: carrying costs
• Currencies: risk free rate for the foreign currency
• Futures: 0
• Stocks: annual security yield
OptionStructure : Extended argument defining the option structure
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method
AdMode : Extended argument customising the return value

Return Value

The return value depends on the value of AdMode. The default value is a vertical 9-cell array
containing:

Delta : Delta ratio


Gamma : Gamma ratio
Rho : Rho ratio
Theta : Theta ratio
Vega : Vega ratio
ForeignDelta : Delta ratio in the foreign currency (for currency options)
ForeignRho : Rho ratio in the foreign currency (for currency options)
ForiegnTheta : Theta ratio in the foreign currency (for currency options)
ForeignVega : Vega ratio in the foreign currency (for currency options)

When this array function is used as a standard function, all the elements are returned. To return, for
instance, the second element use "RET:2" as the AdMode value.
Similarly, when used with a horizontal array, only the first element is returned into all cells of the array.
To return a correct array, use "LAY:H" as the AdMode value.
It is also possible to return both parameter names and values using for instance "RET:B5" as
AdMode (in this case you must select a 2-column and 5-row array).

Notes

The string value used for OptionStructure cannot be empty. It must include at least the option
type (i.e. "CALL" or "PUT").
For compatibility with older releases, OpCalcDeriv returns only one derivative when this derivative
is specified in AdMode using the RES keyword.

5
Adfin Options Functions - User's Guide

The RES:FDELTA , RES:FRHO , RES:FVEGA , RES:FTHETA keywords in the AdMode argument are
supported only in the case of a European currency option (UI:CUR EXM:EUR in the
OptionStructure Argument) with the Black & Scholes Model (FT:BS in the CalcStructure Argument).

Examples

The following examples show the use of the new OpCalcDeriv function in derivatives calculations. You
can copy and paste them into an Excel spreadsheet to verify the consistency of the results.

Computing the premium on a European call option using the Black & Scholes model:
In PPPro 4.0: =OpCalcDeriv("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:EUR OCM:BS UI:SEC RATES:CONT","LAY:V RET:B")
In PPPro 4.5: =OpCalcDeriv("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:EUR","RM:YTM RATETYPE:CONT","CMT:FORM FT:BS","LAY:V RET:B")

Computing the premium on an American call option using the Whaley model:
In PPPro 4.0: =OpCalcDeriv("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:AMER OCM:WHALEY UI:SEC RATES:CONT","LAY:V RET:B")
In PPPro 4.5: =OpCalcDeriv("25APR97", "25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:AMER","RM:YTM RATETYPE:CONT","CMT:FORM FT:WHALEY","LAY:V RET:B")

Computing the premium on an American call option using the Cox, Ross & Rubinstein model:
In PPPro 4.0: =OpCalcDeriv("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:AMER OCM:COX UI:SEC RATES:CONT COXITER:31","LAY:V RET:B")
In PPPro 4.5: =OpCalcDeriv("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:AMER","RM:YTM RATETYPE:CONT","CMT:TREE TITER:31","LAY:V RET:B")

See Also

OpPremium

1.1.4. OpHistVol

=OpHistVol(PriceArray, OpMode)

Calculates the historical volatility of an option on a security (index, stock), a future, a commodity, or a
currency, from a set of underlying prices.

To define the type of prices used (either close prices, or high and low prices), use the HVM keyword in
OpMode.

Arguments

PriceArray : 1-dimensional array (for HVM:CLOSE) or 2-dimensional array (for HVM:HL)


containing the prices. The orientation of this array is specified using the LAY
keyword in OpMode.
OpMode : Extended argument customizing the return value

Return Value

The historical volatility of the option.

See also

OpImpliedVol

6
Adfin Options Functions - User's Guide

1.1.5. OpImpliedVol

=OpImpliedVol(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Premium,


RiskFreeRateArray, ReturnArray, OptionStructure, RateStructure,
CalcStructure)

Calculates the implied volatility of an option on a security (index, stock), a future, a commodity, or a
currency, from the option premium.

Arguments

CalcDate : Calculation date of the option


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Strike price of the option
Premium : Premium of the option
RiskFreeRateArray : Term Structure array.
Depending on the model, this array has several forms:
• a Constant Yield (Value)
• a Zero Coupon Curve (Date, Value)
ReturnArray : Can be either a constant yield or a dividend array (Date, Dividend):
• Commodities: carrying costs
• Currencies: risk free rate for the foreign currency
• Futures: 0
• Stocks: annual security yield
OptionStructure : Extended argument defining the option structure
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method

Return Value

The implied volatility of the option.

Notes

The string value used for OptionStructure cannot be empty. It must include at least the option
type (i.e. "CALL" or "PUT").
The dividend rate(s) specified in ReturnArray can be continuous, proportional, discounted or
fixed.

1.1.6. OpPremium

=OpPremium(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRateArray, ReturnArray, OptionStructure, RateStructure,
CalcStructure)

Calculates the premium of an option on a security (index, stock), a future, a commodity, or a currency.

In the case of an option on a security, the underlying pays a dividend that can be:

continuous
proportional
discounted
fixed

7
Adfin Options Functions - User's Guide

Arguments

CalcDate : Calculation date of the option


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Strike price of the option
Volatility : Volatility of the underlying instrument
RiskFreeRateArray : Term Structure array.
Depending on the model, this array has several forms:
• a Constant Yield (Value)
• a Zero Coupon Curve (Date, Value)
ReturnArray : Can be either a constant yield or a dividend array (Date, Dividend):
• Commodities: carrying costs
• Currencies: risk free rate for the foreign currency
• Futures: 0
• Stocks: annual security yield
OptionStructure : Extended argument defining the option structure
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method

Return Value

The premium of the option.

Note

The string value used for OptionStructure cannot be empty. It must include at least the option
type (i.e. "CALL" or "PUT").

Examples

The following examples show the use of the new OpPremium function for different calculations. You
can copy and paste them into an Excel spreadsheet to verify the consistency of the results.

Computing the premium on a European call option using the Black & Scholes model:
In PPPro 4.0: =OpPremium("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:EUR OCM:BS UI:SEC RATE:CONT")
In PPPro 4.5: =OpPremium("25APR97","25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:EUR", "RM:YTM RATETYPE:CONT", "CMT:FORM FT:BS")

Computing the premium on an American call option using the Whaley model:
In PPPro 4.0: =OpPremiumCrv("25APR97", "25FEB98", 1690, 1550, 0.19, 0, 0.02,
ZcArray, "CALL EXM:AMER OCM:WHALEY UI:SEC RATE:CONT")
In PPPro 4.5: =OpPremium("25APR97", "25FEB98", 1690, 1550, 0.19, ZcArray,
0.02, "CALL EXM:AMER", "RM:YC RATETYPE:CONT", "CMT:FORM FT:WHALEY"), where
ZcArray is a two-column array containing dates and rates.

Computing the premium on an American call option using the Cox, Ross & Rubinstein model:
In PPPro 4.0: =OpPremium("25APR97", "25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:AMER OCM:COX UI:SEC RATE:CONT COXITER:31")
In PPPro 4.5: =OpPremium("25APR97", "25FEB98", 1690, 1550, 0.19, 0.018, 0.02,
"CALL EXM:AMER", "RM:YTM RATETYPE:CONT", "CMT:TREE TITER:31")

See also

OpCalcDeriv
OpImpliedVol

8
Adfin Options Functions - User's Guide

1.1.7. Previous Versions

Important

Previous versions of Adfin Options include the following functions:

OpCalcDeriv, OpCalcDerivCrv and OpCalcDerivDiv


OpImpliedVol and OpImpliedVolDiv
OpPremium, OpPremiumCrv and OpPremiumDiv

Because of the new architecture of Adfin Analytics, these functions are now provided by the following
functions:

OpCalcDeriv
OpImpliedVol
OpPremium

Those old functions still work. However, you are advised to use the new functions that offer better
performance and flexibility.

Old Functions

=OpCalcDeriv(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRate, Rate2, OptionStructure, OpMode)

Returns in an array all derivatives (delta, gamma, theta, vega, rho) of an option, the underlying of which
pays a continuous dividend yield, assuming a constant volatility and risk-free interest rate.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Exercise or strike price of the option
Volatility : Anticipated volatility of the underlying
RiskFreeRate : Yearly rate for an equivalent risk-free investment
Rate2 : Additional yearly rate
Commodities : carrying costs
Currencies : risk free rate for the foreign currency
Futures : 0
Stocks : annual security yield
OptionStructure : Extended argument defining the option structure
OpMode : Extended argument customizing the return value

=OpCalcDerivCrv(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRate, Rate2, CrvArray, OptionStructure, OpMode)

Returns in an array all derivatives (delta, gamma, rho, theta, vega) of an option using a set of discrete
dividends, and/or a set of exercise dates, and/or a risk-free rate curve, and/or a volatility curve.

The sets or curves included in the CrvArray parameter should be specified in OptionStructure
using the CAS keyword.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option / warrant

9
Adfin Options Functions - User's Guide

SpotPrice : Market or spot price of the underlying instrument


StrikePrice : Exercise or Strike price of the option / warrant
Volatility : Anticipated volatility of the underlying (this parameter should be set to 0 if a
volatility curve is included in the CrvArray parameter)
RiskFreeRate : Yearly rate for an equivalent risk-free investment (this parameter should be
set to 0 if a risk-free rate curve is included in the CrvArray parameter)
Rate2 : Additional yearly rate (this parameter should be set to 0 if a dividend set is
included in the CrvArray parameter)
Commodities: carrying costs
Currencies: risk free rate for the foreign currency
Futures: 0
Stocks: annual security yield
CrvArray : 2-dimensional array containing the dates (row or column depending on the
array orientation specified with the LAY keyword) and the values for the
included sets or curves
The first line should contain all the dates from the dividend set (if included),
the exercise date set (if included), the rate curve (if included); and the
volatility curve (if included)
The other lines stand for the dividend amounts (if included), the exercise
flags (if included), the rates (if included); and the volatility values (if included),
in the order specified with the CAS keyword in OptionStructure
OptionStructure : Extended argument defining the option structure
OpMode : Extended argument defining the option mode

=OpCalcDerivDiv(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRate, DivArray, OptionStructure, OpMode)

Returns in an array all derivatives (delta, gamma, rho, theta, vega) of an option, the underlying of which
pays discrete dividends, assuming a constant volatility and risk-free interest rate.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option / warrant
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Exercise or strike price of the option / warrant
Volatility : Anticipated volatility of the underlying
RiskFreeRate : Yearly rate for an equivalent risk-free investment
DivArray : 2-dimensional array containing the dividend dates and the corresponding
dividends expressed as amounts if OCM:CFD or as percentage of the spot
price if OCM:CPD (the orientation of this array should be specified with the
LAY keyword in OptionStructure if it is different from the default
orientation)
OptionStructure : Extended argument defining the option structure
OpMode : Extended argument defining the option mode

=OpImpliedVol(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Premium, RiskFreeRate,


Rate2, OptionStructure)

Calculates the implied volatility of an option from the option premium.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument

10
Adfin Options Functions - User's Guide

StrikePrice : Exercise or strike price of the option


Premium : Market or spot price of the option
RiskFreeRate : Yearly rate for an equivalent risk-free investment
Rate2 : Additional yearly rate
Commodities : carrying costs
Currencies : risk free rate for the foreign currency
Futures : 0
Stocks : annual security yield
OptionStructure : Extended argument defining the option structure

=OpImpliedVolDiv(OpCalcDate, OpExpiryDate, SpotPrice, OpStrikePrice,


OpPremium, RiskFreeRate, DivArray, OptionStructure)

Calculates the implied volatility of an option, the underlying of which pays discrete dividends, assuming
a constant risk-free interest rate.

Arguments

OpCalcDate : Calculation date


OpExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
OpStrikePrice : Exercise or strike price of the option
OpPremium : Market or spot price of the option
RiskFreeRate : Yearly rate for an equivalent risk-free investment
DivArray : 2-dimensional array containing the dividend dates and the corresponding
dividends expressed as amounts if OCM:CFD or as percentage of the spot
price if OCM:CPD (the orientation of this array should be specified with the
LAY keyword in OptionStructure if it is different from the default
orientation)
OptionStructure : Extended argument defining the option structure

=OpPremium (CalcDate, ExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRate, Rate2, OptionStructure)

Calculates the premium of an option, the underlying of which pays a continuous dividend yield,
assuming a constant volatility and risk-free interest rate.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Exercise or strike price of the option
Volatility : Anticipated volatility of the underlying
RiskFreeRate : Yearly rate for an equivalent risk-free investment
Rate2 : Additional yearly rate
Commodities : carrying costs
Currencies : risk free rate for the foreign currency
Futures : 0
Stocks : annual security yield
OptionStructure : Extended argument defining the option structure

=OpPremiumCrv(OpCalcDate, OpExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRate, Rate2, CrvArray, OptionStructure)

11
Adfin Options Functions - User's Guide

Calculates the premium of an option using a set of discrete dividends, and/or a set of exercise dates,
and/or a risk-free rate curve, and/or a volatility curve.

The sets or curves included in the CrvArray parameter should be specified in OptionStructure
using the CAS keyword.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Exercise or strike price of the option
Volatility : Anticipated volatility of the underlying (this parameter should be set to 0 if a
volatility curve is included in the CrvArray parameter)
RiskFreeRate : Yearly rate for an equivalent risk-free investment (this parameter should be
set to 0 if a risk-free rate curve is included in the CrvArray parameter)
Rate2 : Additional yearly rate (this parameter should be set to 0 if a dividend set is
included in the CrvArray parameter)
Commodities : carrying costs
Currencies : risk free rate for the foreign currency
Futures : 0
Stocks : annual security yield
CrvArray : 2-dimensional array containing the dates (row or column depending on the
array orientation specified with the LAY keyword) and the values for the
included sets or curves
The first line should contain all the dates from the dividend set (if included),
the exercise date set (if included), the rate curve (if included); and the
volatility curve (if included)
The other lines stand for the dividend amounts (if included), the exercise
flags (if included), the rates (if included); and the volatility values (if included),
in the order specified with the CAS keyword in OptionStructure
OptionStructure : Extended argument defining the option structure

=OpPremiumDiv(CalcDate, ExpiryDate, SpotPrice, StrikePrice, Volatility,


RiskFreeRate, DivArray, OptionStructure)

Calculates the premium of an option, the underlying of which pays discrete dividends, assuming a
constant volatility and risk-free interest rate.

Arguments

CalcDate : Calculation date


ExpiryDate : Expiry date of the option
SpotPrice : Market or spot price of the underlying instrument
StrikePrice : Exercise or strike price of the option
Volatility : Anticipated volatility of the underlying
RiskFreeRate : Yearly rate for an equivalent risk-free investment
DivArray : 2-dimensional array containing the dividend dates and the corresponding
dividends expressed as amounts if OCM:CFD or as percentage of the spot
price if OCM:CPD (the orientation of this array should be specified with the
LAY keyword in OptionStructure if it is different from the default
orientation)
OptionStructure : Extended argument defining the option structure

12
Adfin Options Functions - User's Guide

1.2. BOND OPTIONS

1.2.1. AdBondOptionDeriv

=AdBondOptionDeriv(CalcDate, RateArray, BondMaturity, Coupon, ExpiryDate,


StrikePrice, BondStructure, OptionStructure, RateStructure, CalcStructure,
AdMode)

Returns an array of all the derivatives (delta, gamma, rho, theta, vega) of a bond option defined from a
bond structure.

Arguments

CalcDate : Calculation date


RateArray : Term Structure array. Depending on the model, this array has several forms:
• a (Date, Rate, Volatility) array for the Black Derman Toy model
• a (Date, Rate, Volatility, Mean-reversion) array for the Hull & White
model.
BondMaturity : Maturity date of the bond
Coupon : Coupon
ExpiryDate : Expiry date of the option
StrikePrice : Strike of the option
BondStructure : Extended argument defining the bond structure
OptionStructure : Extended argument defining the option structure
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method
AdMode : Extended argument customizing the return value

Return Value

The return value depends on the value of AdMode. The default value is a vertical 5-cell array
containing:

Delta : Delta ratio


Gamma : Gamma ratio
Rho : Rho ratio
Theta : Theta ratio
Vega : Vega ratio

When this array function is used as a standard function, all the elements are returned. To return the
second element use "RET:2" as AdMode.
Similarly, when used with a horizontal array, only the first element is returned into all the cells of the
array. To return a correct, array use "LAY:H" as AdMode.
It is also possible to return both parameter names and values using for instance "RET:B5" as
AdMode (in this case you must select a 2-column and 5-row array).

Notes

The string value used for OptionStructure cannot be empty. It must include at least the option
type (keyword CALL or PUT).
By default, Adfin assumes that the StrikePrice argument stands for the gross price of the
bond. To use the clean price of the bond, use the PX keyword in CalcStructure.

See also

AdBondOptionPremium

13
Adfin Options Functions - User's Guide

1.2.2. AdBondOptionPremium

=AdBondOptionPremium(CalcDate, RateArray, BondMaturity, Coupon, ExpiryDate,


StrikePrice, BondStructure, OptionStructure, RateStructure, CalcStructure,
AdMode)

Calculates the premium of a bond option defined from a bond structure.

Arguments

CalcDate : Calculation date


RateArray : Term Structure array. Depending on the model, this array has several forms:
• a (Date, Rate, Volatility) array for the Black Derman Toy model
• a (Date, Rate, Volatility, Mean-reversion) array for the Hull & White
model.
BondMaturity : Maturity date of the bond
Coupon : Coupon
ExpiryDate : Expiry date of the option
StrikePrice : Strike price of the option
BondStructure : Extended argument defining the bond structure
OptionStructure : Extended argument defining the option structure
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method
AdMode : Extended argument customizing the return value

Return Value

The return value depends on the value of AdMode. The default value is the bond option premium. If
needed, the second returned value is the bond price.

Notes

The string value used for OptionStructure cannot be empty. It must include at least the option
type (keyword CALL or PUT).
By default, Adfin assumes that the StrikePrice argument stands for the gross price of the
bond. To use the clean price of the bond, use the PX keyword in CalcStructure.

See also

AdBondOptionDeriv

1.2.3. Previous Versions

Important

Previous versions of Adfin Options include the following functions:

BdOpPremium and BdOpDeriv


CfOpPremium and CfOpDeriv.

Because of the new architecture of Adfin Analytics, these old functions have been replaced with the
new functions AdBondOptionPremium, and AdBondOptionDeriv
Adfin Options supports both architectures. However, you are advised to use these new functions that
offer better performance and flexibility.

14
Adfin Options Functions - User's Guide

Old Functions

=BdOpPremium(CalcDate, DateArray, RateArray, VolatilityArray, Maturity,


Coupon, ExpiryDate, StrikePrice, BondStructure, OptionStructure, OpMode)

Calculates the premium of a bond option defined from a bond structure.

Arguments

CalcDate : Calculation date


DateArray : Array of dates
RateArray : Array of annualised zero-coupon rates
VolatilityArray : Array of annualised volatilities of the short rate
Maturity : Maturity date of the bond
Coupon : Nominal coupon rate of the bond
ExpiryDate : Expiry date of the option
StrikePrice : Exercise or strike price of the option
BondStructure : Extended argument defining the bond structure
OptionStructure : Extended argument defining the option structure
OpMode : Extended argument customizing the return value

=BdOpDeriv(CalcDate, DateArray, RateArray, VolatilityArray, Maturity,


Coupon, ExpiryDate, StrikePrice, BondStructure, OptionStructure, OpMode)

Returns in an array all derivatives (delta, gamma, rho, theta, vega) of a bond option defined from a
bond structure.

Arguments

CalcDate : Calculation date


DateArray : Array of dates
RateArray : Array of annualized zero-coupon rates
VolatilityArray : Array of annualized volatilities of the short rate
Maturity : Maturity date of the bond
Coupon : Nominal coupon rate of the bond
ExpiryDate : Expiry date of the option
StrikePrice : Exercise or strike price of the option
BondStructure : Extended argument defining the bond structure
OptionStructure : Extended argument defining the option structure
OpMode : Extended argument customizing the return value

=CfOpPremium(CalcDate, DateArray, RateArray, VolatilityArray, CfDates, Cf,


ExpiryDate, StrikePrice, OptionStructure, OpMode)

Calculates the premium of a bond option defined from a set of cash flows.

Arguments

CalcDate : Calculation date


DateArray : Array of dates
RateArray : Array of annualised zero-coupon rates
VolatilityArray : Array of annualised volatilities of the short rate
CfDates : Array of cash flow dates corresponding to the bond reimbursement
Cf : Array of cash flow values corresponding to the bond reimbursement
ExpiryDate : Expiry date of the option
StrikePrice : Exercise or strike price of the option

15
Adfin Options Functions - User's Guide

OptionStructure : Extended argument defining the option structure


OpMode : Extended argument customizing the return value

=CfOpDeriv(CalcDate, DateArray, RateArray, VolatilityArray, CfDates, Cf,


ExpiryDate, StrikePrice, OptionStructure, OpMode)

Returns in an array all derivatives (delta, gamma, rho, theta, vega) of a bond option defined from a set
of cash flows.

Arguments

CalcDate : Calculation date


DateArray : Array of dates
RateArray : Array of annualized zero-coupon rates
VolatilityArray : Array of annualized volatilities of the short rate
CfDates : Array of cash flow dates corresponding to the bond reimbursement
Cf : Array of cash flow values corresponding to the bond reimbursement
ExpiryDate : Expiry date of the option
StrikePrice : Exercise or strike price of the option
OptionStructure : Extended argument defining the option structure
OpMode : Extended argument customizing the return value

1.3. CAPS, FLOORS AND COLLARS

1.3.1. AdCapFloorCaplets

=AdCapFloorCaplets(SettlementDate, RateArray, StartDate, ExpiryDate,


CapStrikePrice, FloorStrikePrice, FirstRate, CapFloorStructure,
RateStructure, CalcStructure, AdMode)

Generates an array with the caplet/floret premiums of a cap, floor, collar.

Arguments

SettlementDate : Settlement date


RateArray : Term Structure array. Depending on the model, this array has several forms:
• a (Dates, Rates, Constant volatility) array if BS is specified
• a (Dates, Rates, Volatilities) array if BDT is specified
• a (Dates, Rates, Constant volatility, constant mean-reversion) if HW is
specified
The model used is specified through the keyword RM (Rate Model) in the
RateStructure argument.
StartDate : Start date of the cap, floor, or collar
ExpiryDate : Expiry date of the cap, floor, or collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor
FirstRate : Rate of the cap, floor, or collar for the current calculation period
CapFloorStructure : Extended argument defining the instrument
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method
AdMode : Extended argument customizing the return value

16
Adfin Options Functions - User's Guide

Return Value

The return value is a vertical 5-column array containing for all caplets or floorlets, the date, the strike
price, the volatility, the forward rate, and the premium.

Notes

The string value used for CapFloorStructure cannot be empty. It must include at least the
instrument type (keyword CAP, FLOOR or COLLAR) and the caplet or floorlet frequency (keyword
FRQ).
When using the Hull & White model, only money market rates can be used to price caps and floors.
When valuing an already issued instrument, the rate for the current caplet or floorlet must be
entered in the function using the argument FirstRate (it cannot be calculated from the zero-
coupon yield curve).

See also

AdCapFloorImpliedVol
AdCapFloorPremium

1.3.2. AdCapFloorImpliedVol

=AdCapFloorImpliedVol(CalcDate, RateArray, StartDate, ExpiryDate,


CapStrikePrice, FloorStrikePrice, FirstRate, Premium, CapFloorStructure,
RateStructure, CalcStructure)

Calculates the implied volatility of a cap, floor or collar.

Arguments

CalcDate : Calculation date


RateArray : Term Structure array. This array is a (Dates, Rates, Constant volatility) array
with an empty Constant Volatility column. The keyword RM must be set to BS
in the RateStructure argument.
StartDate : Start date of the cap, floor, or collar
ExpiryDate : Expiry date of the cap, floor, or collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor
FirstRate : Rate of the cap, floor, or collar for the current calculation period
Premium : Market or spot price of the cap, floor, or collar
CapFloorStructure : Extended argument defining the instrument
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method

Return Value

The implied volatility of the cap, floor, or collar.

Notes

The string value used for CapFloorStructure cannot be empty. It must include at least the
instrument type (keyword CAP, FLOOR or COLLAR) and the caplet or floorlet frequency (keyword
FRQ).
When valuing an already issued instrument, the rate for the current caplet or floorlet must be
entered in the function using the argument FirstRate (it cannot be calculated from the zero-
coupon yield curve).

17
Adfin Options Functions - User's Guide

See also

Prior Versions
AdCapFloorCaplets
AdCapFloorPremium

1.3.3. AdCapFloorPremium

=AdCapFloorPremium(CalcDate, RateArray, StartDate, ExpiryDate,


CapStrikePrice, FloorStrikePrice, FirstRate, CapFloorStructure,
RateStructure, CalcStructure)

Calculates the premium of a cap, floor or collar specified in the CapFloorStructure.

Arguments

CalcDate : Calculation date


RateArray : Term Structure array. Depending on the model, this array has several forms:
• a (Dates, Rates, Constant volatility) array if BS is specified
• a Dates, Rates, Volatilities) array if BDT is specified
• a (Dates, Rates, Constant volatility, constant mean-reversion) if HW is
specified
The model used is specified through the keyword RM (Rate Model) in the
RateStructure argument.
StartDate : Start date of the cap, floor or collar
ExpiryDate : Expiry date of the cap, floor, or collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor
FirstRate : Rate of the cap, floor, or collar for the current calculation period
CapFloorStructure : Extended argument defining the instrument
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method

Return Value

The premium of a cap, floor, or collar.

Notes

When using the Hull & White model, only money market rates can be used to price caps and floors.

See also

AdCapFloorCaplets
AdCapFloorImpliedVol

18
Adfin Options Functions - User's Guide

1.3.4. Previous Versions

Important

Previous versions of Adfin Options include the following functions:

CpflCaplets
CpflDelta
CpflImpliedVol
CpflPremium.

Because of the new architecture of Adfin Analytics, these old functions have been replaced with the
following functions:

AdCapFloorCaplets
AdCapFloorImpliedVol
AdCapFloorPremium

Those old functions still work, but you are advised to use the new ones that offer better performance
and flexibility.

Old Functions

=CpflCaplets(CalcDate, ZcDates, ZcRates, StartDate, Maturity, CapStrikePrice,


FloorStrikePrice, FirstRate, Volatility, OptionStructure, YcMode)

Generates an array with the caplet/floret premiums of a cap/floor/collar.

Arguments

CalcDate : Calculation date


ZcDates : Array of zero-coupon dates
ZcRates : Array of zero-coupon rates or discount factors
StartDate : Start date of the cap/floor/collar
Maturity : Maturity date of the cap/floor/collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor
FirstRate : Rate of the cap/floor/collar for the current calculation period
Volatility : Anticipated volatility of the underlying in percentage
OptionStructure : Extended argument defining the option structure
YcMode : Extended argument customizing the return value

Return Value

The return value is a vertical 5-column array containing for all caplets/floorlets, the date, the strike
price, the volatility, the forward rate, and the premium.

=CpflDelta(CalcDate, ZcDates, ZcRates, StartDate, Maturity, CapStrikePrice,


FloorStrikePrice, FirstRate, Volatility, OptionStructure, YcMode)

Calculates the delta ratio of a cap/floor/collar.

19
Adfin Options Functions - User's Guide

Arguments

CalcDate : Calculation date


ZcDates : Array of zero-coupon dates
ZcRates : Array of zero-coupon rates or discount factors
StartDate : Start date of the cap/floor/collar
Maturity : Maturity date of the cap/floor/collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor
FirstRate : Rate of the cap/floor/collar for the current calculation period
Volatility : Anticipated volatility of the underlying in percentage
OptionStructure : Extended argument defining the option structure
YcMode : Extended argument customizing the return value

Return Value

The delta ratio of the cap/floor/collar.

=CpflImpliedVol(CalcDate, ZcDates, ZcRates, StartDate, Maturity, CapStrikePrice,


FloorStrikePrice, FirstRate, Premium, OptionStructure, YcMode)

Calculates the implied volatility of a cap/floor/collar.

Arguments

CalcDate : Calculation date


ZcDates : Array of zero-coupon dates
ZcRates : Array of zero-coupon rates or discount factors
StartDate : Start date of the cap/floor/collar
Maturity : Maturity date of the cap/floor/collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor
FirstRate : Rate of the cap/floor/collar for the current calculation period
Premium : Market or spot price of the cap/floor/collar
OptionStructure : Extended argument defining the option structure
YcMode : Extended argument customizing the return value

=CpflPremium(CalcDate, ZcDates, ZcRates, StartDate, Maturity, CapStrikePrice,


FloorStrikePrice, FirstRate, Volatility, OptionStructure, YcMode)

Calculates the premium of a cap/floor/collar.

Arguments

CalcDate : Calculation date


ZcDates : Array of zero-coupon dates
ZcRates : Array of zero-coupon rates or discount factors
StartDate : Start date of the cap/floor/collar
Maturity : Maturity date of the cap/floor/collar (expressed as a date or a code such as
"1Y")
CapStrikePrice : Exercise or strike price of the cap
FloorStrikePrice : Exercise or strike price of the floor

20
Adfin Options Functions - User's Guide

FirstRate : Rate of the cap/floor/collar for the current calculation period


Volatility : Anticipated volatility of the underlying in percentage
OptionStructure : Extended argument defining the option structure
YcMode : Extended argument customizing the return value

1.4. SWAPTIONS

1.4.1. AdSwaptionPremium

=AdSwaptionPremium(CalcDate, RateArray, SwapStartDate, SwapMaturity,


ExpiryDate, SpotPrice, StrikePrice, SwapStructure, OptionStructure,
RateStructure, CalcStructure)

Calculates the premium of a swaption.

Arguments

CalcDate : Settlement date


RateArray : Term Structure array. Depending on the model, this array has several forms:
• a (Dates, Rates, Constant volatility) array if BS is specified
• a (Dates, Rates, Volatilities) array if BDT is specified
• a (Dates, Rates, Constant volatility, constant mean-reversion) if HW is
specified
The model used is specified through the keyword RM (Rate Model) in the
RateStructure argument.
SwapStartDate : Start date of the swap
SwapMaturity : Maturity date of the swap (expressed as a date or a code such as “1Y”)
ExpiryDate : Expiry date of the option
SpotPrice : Spot market rate of the swap
StrikePrice : Exercise or strike rate of the swap
SwapStructure : Extended argument defining the swap
OptionStructure : Extended argument defining the option
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method

Return Value

The premium of the option on a swap.

Note

The European mode is the only exercise mode available for a swaption when the keyword RM has the
values RM:BS or RM:HW.

See also

AdSwaptionDeriv

1.4.2. AdSwaptionDeriv

=AdSwaptionDeriv(CalcDate, RateArray, SwapStartDate, SwapMaturity,


ExpiryDate, SpotPrice, StrikePrice, SwapStructure, OptionStructure,
RateStructure, CalcStructure, AdMode)

Returns in an array all derivatives (delta, gamma, theta, vega) of an option on a swap.

21
Adfin Options Functions - User's Guide

Arguments

CalcDate : Settlement date


RateArray : Term Structure array. Depending on the model, this array has several forms:
• a ( Dates,Rates, Constant volatility) array if BS is specified
• a (Dates, Rates, Volatilities) array if BDT is specified
• a (Dates, Rates, Constant volatility, constant mean-reversion) if HW is
specified
The model used is specified through the keyword RM (Rate Model) in the
RateStructure argument.
SwapStartDate : Start date of the swap
SwapMaturity : Maturity date of the swap (expressed as a date or a code such as “1Y”)
ExpiryDate : Expiry date of the option
SpotPrice : Spot market rate of the swap
StrikePrice : Exercise or strike rate of the swap
SwapStructure : Extended argument defining the swap
OptionStructure : Extended argument defining the option
RateStructure : Extended argument defining the interest rate model
CalcStructure : Extended argument defining the calculation method
AdMode : Extended argument customizing the return value

Return Value

The return value depends on the value of AdMode. The default value is a vertical 4-cell array
containing:

Delta : Delta ratio


Gamma : Gamma ratio
Theta : Theta ratio
Vega : Vega ratio

See also

AdSwaptionPremium

1.4.3. Previous Versions

Important

Previous versions of Adfin Options include the premium function OpSwaptionPremium. Because of the
new architecture of Adfin Analytics, this old function has been replaced with the new function
AdSwaptionPremium

That old function still works, but you are advised to use the new function that offers better performance
and flexibility.

Old Function

=OpSwaptionPremium (CalcDate, ZcDates, ZcRates, StartDate, Maturity,


ExpiryDate, SpotPrice, StrikePrice, Volatility, IrsStructure,
OptionStructure, YcMode)

Calculates the premium of a swaption.

22
Adfin Options Functions - User's Guide

Arguments

CalcDate : Calculation date


ZcDates : Array of zero-coupon dates
ZcRates : Array of zero-coupon rates or discount factors
StartDate : Start date of the swap
Maturity : Maturity date of the swap (expressed as a date or a code such as "1Y")
ExpiryDate : Expiry date of the option
SpotPrice : Spot market rate of the swap
StrikePrice : Exercise or strike rate of the swap
Volatility : Anticipated volatility of the swap rate
IrsStructure : Extended argument defining the interest rate swap structure
OptionStructure : Extended argument defining the option structure
YcMode : Extended argument customizing the return value

23

S-ar putea să vă placă și