### Options on equities, indices, currencies a Interest rate derivatives and convertible b Employee stock option valuation Historical volatility and price distribution Probability analysis Portfolio Hedging & Trading profitability Futures On-Line quotations Utilities Value at Risk (VaRtools)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
###
Options on equities, indices, currencies and futures
Interest rate derivatives and convertible bonds
Employee stock option valuation
Historical volatility and price distribution
Probability analysis
Portfolio Hedging & Trading profitability
Futures
On-Line quotations
Utilities
Value at Risk (VaRtools)
Options on equities, indices, currencies and futures
Results Calc Type ValuePrice: P #MACRO?Delta: D #MACRO?Gamma G #MACRO?Vega V #MACRO?Theta T #MACRO?Rho R #MACRO?
Example with user function in VBA module:Results Calc Type ValuePrice: P #VALUE!Delta: D #VALUE!Gamma G #VALUE!Vega V #VALUE!Theta T #VALUE!Rho R #VALUE!
HoadleyPercentToTarget1Returns the percentage that the underlying spot price needs to change to produce a target option price. A target of 100% produces "percent to double".
HoadleyPercentToTarget2Returns the percentage that the underlying spot price needs to change to produce a target option price. A target of 100% produces "percent to double".
HoadleyImpliedUA1Returns an underlying asset ("UA") value (strike, spotdays, volatility, risk free rate) implied by either a givenoption price or option delta. Uses absolute dates.
HoadleyImpliedUA2Returns an underlying asset ("UA") value (strike, spotdays, volatility, risk free rate) implied by either a givenoption price or option delta. Uses days.
Notes:1. The non-log normal and log normal prices are shown above for interest only. They are not used in calculating the volatility smile.
2. You can use Excel solver to simultaneously calculate the "true" volatility, skewness and kurtosis from observed market option prices by minimizing the sum of the squares of the differences between the non-log normal prices and the market prices.
HoadleyBasketOptionReturns the price of a European option on a basket of underlying assets. The price is calculated analytically, not by simulation.This function is only available in the full version of the add-in.
PG IBM GE MSFTCorr_matrix PG 1.00 0.30 0.20 0.20(correlation matrix) IBM 1.00 0.25 0.30
GE 1.00 0.20MSFT 1.00
PG IBM GE MSFTVolatilities 27% 25% 33% 34%Prices 91.43 87.91 31.32 28.43No_units 2500 1750 5400 6300div_yields 2.10% 3.00% 1.30% 0.00%
Results - 1Option value #MACRO?
Results - 2Comparison with at-the-money options on the individual assets. The basket optionwill usually (depending on the correlation between the assets) be cheaper. Hedgingcurrency exposures and other risks can therefore be done more cheaply than bypurchasing individual options.
PG IBM GE MSFTIndividual option strikes (ATM) 228,575 153,843 169,128 179,109Individual option values ### ### ### #MACRO?
Strike for basket 730,655
Total of individual option values #MACRO?Basket option value #MACRO?
Early Exercise ClassReturns all optimal early exercise points for a range of spot prices for a given option specification. Onlyrelevant for American options.
Example:Inputs ResultsOption dates:Deal date 13-Sep-01Expiry date 20-Dec-01Ex-dividend date 1: 03-Oct-01Ex-dividend date 2: 31-Oct-01
Inputs:Option_type C OptimalStrike 17.50 Spot Early Exercise Option PriceDays_to_expiry 98 Price Threshold at ThresholdVolatility 33.9% 20.50 On 02-Oct-01Risk_free_rate 5.00% 21.00 On 02-Oct-01
21.50 On 02-Oct-01Dividend_type D
Div 1 Div 2 19.50 On 30-Oct-01Dividends 0.25 0.5 20.00 On 30-Oct-01Days_to_ex_dates 20 48 20.50 On 30-Oct-01Dividend_count 2 21.00 On 30-Oct-01
21.50 On 30-Oct-01Current stock price: 17.65
Range of spot prices to be searched: 13.5014.0014.5015.0015.5016.0016.5017.0017.5018.0018.5019.0019.5020.0020.5021.0021.50
Hoadley FR NoteReturns the price, or the effective margin over swap, for a floating rate note ("floater")This function is only available in the full version of theadd-in.
HoadleyConvBondReturns the price and other related information of aconvertible bond with call and/or put features.This function is only available in the full version of the add-in.
ExampleInputs ResultsCalc_type PQ Convertible bond price (quoted)Redemption 100.00 Convertible bond price (cash)Valuation_date 02-Oct-03Maturity_Date 25-Mar-05 Bond price (quoted)Coupon_rate 8.00% Bond price (cash)Coupon_frequ 2 Accrued interestRisk_free_rate 5.00% Delta per shareCredit_spread 2.50% Option value
HoadleyBondOptHWReturns the price or hedge parameters of a Eurpoean or American coupon bond option using either the Hull-White analytic model (European), or Hul-White interest rate trinomial trees (European or American).
ExampleInputsCalc_type PPricing model 1Principal 100.00Valuation_date 07-Apr-03Bond_maturity 25-May-09Coupon_rate 5.0%Coupon_frequ 4
Term_structure Years Rate0.00 2.75%0.25 3.00%0.50 3.25%1.00 3.50%3.00 4.00%5.00 4.50%
HoadleySwaptionBlkReturns the price, hedge parameters or implied volatilityof a Eurpoean Swaption (an option on an interest rateswap) using the Black-76 model.
HoadleySwaptionHWReturns the price, hedge parameters or implied volatilityof a Eurpoean Swaption (an option on an interest rateswap) using the normal analytic or trinomial tree models.
HoadleyESO1Returns the fair value of an employee stock option priced according to the basic US Financial Accounting Standards Board (FASB) 123 standard.
HoadleyESO2Returns the fair value and expected life of an employee stock option priced according to the Hull-White "enhanced" US Financial Accounting Standards Board (FASB) 123 standard.
Example of company ESO grant scheduleInputsGrant date: 1-Jan-03Exercise price: 95.70Current stock price: 87.00Maximum option life in years: 10Volatility: 30%Risk free rate: 4.50%Dividend yield: 2.50%Trinomial steps 200
HoadleyHistoricVolatilityReturns the annualized volatility of an asset based on a sample of historical prices. Volatility can be calculated in four ways.
ExamplesInputs
Day Date High Low Open Close DividendMon 21-Jan-02 102.00 100.00 100.00 101.50Tue 22-Jan-02 102.00 100.50 101.50 104.00Wed 23-Jan-02 101.50 99.00 101.50 99.00Thu 24-Jan-02 100.00 97.50 100.00 97.50Fri 25-Jan-02 99.00 98.00 98.00 98.50
Important note: This example is not meant to reflect a realistic situation. In reality, much larger samples would be required to produce a meaningful result. (eg four years of daily close prices for GARCH)
Note: you would not normally use EWMA or GARCH with such a small sample.They are is included here for illustrative purposes only.
WeeklyMoving Average
#################################
25-Jan-02
28-Jan-02
29-Jan-02
30-Jan-02
31-Jan-02
01-Feb-02
04-Feb-02
05-Feb-02
06-Feb-02
07-Feb-02
08-Feb-02
0%
200%
400%
600%
800%
1000%
1200%
Weekly Moving Average Volatility
Date
Vo
lati
lity
Important note: This example is not meant to reflect a realistic situation. In reality, much larger samples would be required to produce a meaningful result. (eg four years of daily close prices for GARCH)
HoadleyGARCHUses the GARCH model to return the annualized volatility, forecast volatility and a number of 'GARCH' parameters of an asset based on a sample of historical closing prices. This function is only available in the full version of the add-in.
Example:Inputs ResultsHistorical stock prices Current volatility #MACRO?
1. This function is only available in the full version of the add-in. In the trial version all results will show as zero.
2. The term structure shows that, for example, if you are pricing a 12 week option then the best estimate of the volatility fro historical data would be 26%.
3. The HistoricVolatilityCalculator (included with full version of the add-in) calculates current volatility, volatility forecasts and term structures automatically using GARCH
4. This example is not meant to be realistic and is for illustrative purposes only. Sample sizes must be much larger (eg four years of daily data) for GARCH to be effective.
1. This function is only available in the full version of the add-in. In the trial version all results will show as zero.
2. The term structure shows that, for example, if you are pricing a 12 week option then the best estimate of the volatility fro historical data would be 26%.
3. The HistoricVolatilityCalculator (included with full version of the add-in) calculates current volatility, volatility forecasts and term structures automatically using GARCH
4. This example is not meant to be realistic and is for illustrative purposes only. Sample sizes must be much larger (eg four years of daily data) for GARCH to be effective.
HoadleyPriceDistReturns skewness and kurtosis coefficients, and standarderrors of skewness and kurtosis, from a sample of historical asset prices
ExampleInputs Results ValueClosing pricesFor one year Skewness: ###
10.61 Excess kurtosis ###10.6510.75 Standard error of skewness: ###10.58 Standard error of kurtosis ###10.3810.73 Significance tests:10.76 Skewness T ratio: ###10.85 Kurtosis T ratio: ###10.8010.5510.3410.6510.8010.4310.5510.6710.5010.3810.4010.6010.8010.9510.4910.1810.1010.259.729.449.679.589.579.299.229.319.419.509.579.609.689.559.559.69
Index
http://www.hoadley.net/options
Help
Note: Closing prices for Australian stock TabCorp from 22nd Jan 2001 to 21st Jan 2002.
(based on daily sampling)(based on daily sampling)
Skewness not statistically different from normality.Kurtosis is significantly different from that expectedfrom a lognormal distribution of prices.(see help file for significance testing)
Note: Closing prices for Australian stock TabCorp from 22nd Jan 2001 to 21st Jan 2002.
HoadleyAutoCorrelReturns the autocorrelation coefficient and Ljung-Box significance test results for a sample of prices, the (log) returns of the prices, or the square of the returns. The most common use will be to test for volatility clustering: volatility clustering implies strongautocorrelation in squared returns. Significant volatility clustering is one indication that the GARCH volatility model is appropriatefor the data.
ExampleInputs ResultsClosing prices Confidence level: 2%For one year data_type: 3
Null hypothesis: there is no autocorrelation for this data_type
Auto-corre-lation
Ljung-Box statistic
Chi-square
P-value
Chi-square critical
value
http://www.hoadley.net/options
Help
Notes:1. See the Historic Volatility Calculator (included with full version of the add-in) for a practical example of how this function can be used to evaluate GARCH suitability.
2. Closing prices for Australian stock TabCorp from 22nd Jan 2001 to 21st Jan 2002.
Returns the autocorrelation coefficient and Ljung-Box significance test results for a sample of prices, the (log) returns of the prices, or the square of the returns. The most common use will be to test for volatility clustering: volatility clustering implies strongautocorrelation in squared returns. Significant volatility clustering is one indication that the GARCH volatility model is appropriate
Null hypothesis: there is no autocorrelation for this data_type
Notes:1. See the Historic Volatility Calculator (included with full version of the add-in) for a practical example of how this function can be used to evaluate GARCH suitability.
2. Closing prices for Australian stock TabCorp from 22nd Jan 2001 to 21st Jan 2002.
HoadleyProbAtEndReturns the probability of the spot price being above orbelow a target price at the end of the specified number of days.
Probability of being above when expected return = 0 #MACRO? #VALUE!and dividend = 0 (equivalent to a stock #MACRO? #VALUE!with a dividend yield equal to expected return)
Index
From a work- sheet cell
From VBA module
Probability of spot being above target at end:Probability of spot being below target at end:
ResultsThe following table shows the probability of the spot price being above the target at any time. The "at end probability" is shown for comparison.
Spot PriceVolatility Any time during period At end of period
HoadleyProbAnyTime2Returns the probability of the spot price moving outside a target range at any time during a specified number of days. It also will return the probability of movingoutside both prices in the range, or remaining within the range at all times.This function is only available in the full version of the add-in.
Results Prob_type ValueProbability of being either above or below target at any time E #MACRO?Prob of remaining within target range at all times N #MACRO?Probability of being both above upper and below lower targets B #MACRO?Probability of being between target prices at some time W #MACRO?
Probability of being above upper target at any time A #MACRO?Probability of being below lower target at any time B #MACRO?
Probability of being above upper target at end of period A #MACRO?Probability of being below lower target at end of period B #MACRO?
IndexHelp
HoadleyProbDistReturns an array containing the probability distribution for a range of asset prices. The skewness and kurtosis of the distribution can be specified to handle non-lognormally distributed prices. This function is only available in the full version of the add-in.
Note: This function returns an array of prices and as such the function must be entered as an Excel array formula.
This is done by highlighting the range which is to receive the results, using the function wizard to enter all arguments, and then hitting ctrl-shift-enter to enter the formula.
Note: This function returns an array of prices and as such the function must be entered as an Excel array formula.
This is done by highlighting the range which is to receive the results, using the function wizard to enter all arguments, and then hitting ctrl-shift-enter to enter the formula.
Monte Carlo Simulation ClassWill produce a range of underlying asset probabilities in situations where no analytic solution is possible.Can also be used to generate a sequence of lognormally distributed stock prices for a given volatility, expected return and duration.This object is only available in the full version of the add-in.
Examples:
1. Calculating probabilitiesInputs: Results:Upper target 60.00 Probabilities:Lower target 45.00 Above upper target at expirationSpot 50.00 Above upper target at any timeDays 100 Below lower target at expirationVolatility 30% Below lower target at any timeExpected return 10% Touching either targetDividend type D Touching neither targetDividend amount 2.00 Touching both targetsDays to ex dividend 60 Being between targets at any timeNumber of dividends 1Prices per day 1 Average end price:Iterations 2,000
2. Deriving a call price from simulationThis illustrates how simulation can be used to derive the price of an option (in this case a call).The Black-Scholes price is shown for comparison. A large number of iterations (eg 500,000) will produce a price very closeTo the Black-Scholes price.Inputs: Results:Spot price 100.00Strike 98.00 Call price from simulation:Volatility 30%Days 50 Call price from Black-Scholes:Risk free interest rate 5%Number of iterations 30,000
3. Production of normal distribution curveA simulated lognormal distribution curve is compared to a distribution produced analytically. As the number of iterations increases,The simulated distribution converges on the analytic distribution. This example is proof that the prices produced by the simulation object are Lognormally distributed.Inputs: Results:Current price 90 Gap between prices:Volatility 30%Days 365 PriceExpected return 7% 24Iterations 50,000 26(Change iterations to, say, 5,000 and 28 see the effect) 30
Will produce a range of underlying asset probabilities in situations where no analytic solution is possible.Can also be used to generate a sequence of lognormally distributed stock prices for a given volatility, expected
Above upper target at expiration 10.1%Above upper target at any time 19.6%Below lower target at expiration 30.8%Below lower target at any time 51.5%
70.5%29.6%
0.6%Being between targets at any time 100.0%
49.36
The Black-Scholes price is shown for comparison. A large number of iterations (eg 500,000) will produce a price very close
5.82
###
A simulated lognormal distribution curve is compared to a distribution produced analytically. As the number of iterations increases,The simulated distribution converges on the analytic distribution. This example is proof that the prices produced by the simulation object are
HoadleyHedgeReturns an array containing the number of options and/or number of units in theunderlying to achieve specific hedge ratio targets with respect to one or moreof a portfolio's position delta, position gamma and position vega. An examplewould be making a portfolio both delta and vega neutral.This function is only available in the full version of the add-in.
Portfolio examplePortfolio: general valuation details Note: Spot 27.80 1. The function must be entered as an Excel array formula. See helpValuation date 20-Apr-04 for details.Volatility 30.0% 2. Set the "use_underlying" argument to TRUE or FALSE to see the impactRisk free rate 4.00% on hedging of using or not using trades in the underlying.
Portfolio: holdings and current position greeksOptions portfolio: Put or Call Strike Expiry QTY
HoadleyPLUnderlyingReturns the profit or loss of a position in the underlying asset as at a specified date. The function takes into account dividends received or paid.
Income_details: Amt DateIncome payment 1 (eg coupon) 2.50 04-May-03
Income payment 2 2.50 04-Nov-03
Futures_price
Results -1 Calc Type ResultsFutures price P #MACRO?
Implied risk free rate IR #MACRO?
Results - 2 ResultsStrike: 100Price volatility 12%Call/Put CSpot option (uses spot price): #MACRO?Futures option (uses futures price): #MACRO?This example shows that a European futures option is worthexactly the same as a spot option if the option matures at thesame time as the futures contract. This example proves theconsistency of the futures and options functions.
Index
Option details
Help
CPNCD
HoadleyFuturesConValReturns the profit or loss of a position in the underlyingasset as at a specified date.
Returns the Value at risk for a portfolio of instruments linearly dependent on market variables.This function is only available in the full version of the add-in.
Returns the Value at risk for a portfolio of instruments which may not all be linearly dependent on market variables. Can also be used to generate a set of correlated asset prices.The simulation class must be used from a VBA module (macro); it is not a function.The VaR simulation component is only available in the full version of the add-in.
ExampleInputs - general
Market variable IDs MSFT GenElec 10_Yr_BondCurrent prices (not required for linear assets) 27.60 30.21 4.8%Exchange rates 1 1 1
VaR period in days 5Confidence interval 1%Trading days per year 252Simulation iterations 10,000Filter by position type (0 = include all) 0(set to 1 to compare simulated VaR with analytic)
Inputs - Positions
Long holding in stock 1 MSFT 5,520,210Short holding in stock 1 GenElec -1,078,500
Option position (note: position value 2 MSFT 55,300 12,080not required for option position)
Ten year bond (using duration method) 3 10_Yr_Bond 2,200,000 9.3
linear positions ('filter by position' = 1), the simulated VaR will be very close to the analytic VaR.
Note: When the simulation is filtered to only include
Returns an array mapping future cash flows (eg from bonds) at any time periods to anynumber of user-specified time vertices. The function uses quadratic interpolation topreserve the value and market risk of the original cash flows. The cash flow map canthen be used in the VaRLinear function or in the VaR simulation component.This function is only available in the full version of the add-in.
ExampleInputsStandard time vertices in years (maturity dates) 0.25 0.50 1.00Zero rates with continuous compounding 4.50% 5.00% 6.00%Bond price volatilities (% pa) 0.96% 1.60% 3.20%
Returns the correlation matrix of equally weighted returns for two or more columns of historic asset prices.Note that the matrix returned by the function contains the correlation of returns, not prices. This function is only available in the full version of the add-in.
Returns the correlation matrix of returns for two or more columns of historic asset prices using the EWMA model.Note that the matrix returned by the function contains the correlation of returns, not prices. This function is only available in the full version of the add-in.
Returns the covariance matrix of equally weighted returns for two or more columns of historic asset prices.Note that the matrix returned by the function contains the covariance of returns, not prices. This function is only available in the full version of the add-in.
Returns the covariance matrix of returns for two or more columns of historic asset prices using the EWMA model.Note that the matrix returned by the function contains the covariance of returns, not prices. This function is only available in the full version of the add-in.
Converts asset volatilities and correlations to a covariance matrix of a specified number of days.The default matrix is for a period of one day.This function is only available in the full version of the add-in.
Notes: 1. The above matrix should be the same as the covariance matrix on the covar sheet2. The function must be entered as an Excel array formula (crtl-shift-enter)
Notes: 1. The above matrix should be the same as the correlation matrix on the CorrelEWMA sheet2. The function must be entered as an Excel array formula (crtl-shift-enter)
Checks that a matrix (correlation, covariance) is positive definite.The VaR simulation component requires positive definite matrices in order togenerate correlated scenarios using the Cholesky decomposition.This function is only available in the full version of the add-in.
Checks that a matrix (correlation, covariance) is positive semi-definiteThe HoadleyVaRLinear functions requires positive semi-definite matrices.This function is only available in the full version of the add-in.
HoadleyGetQuotesA subroutine which can be called from a VBA module to return stock quotes from Yahoo.
ExampleClick on heading fields below to select/change columns
Symbol Name Date Last Trade Change
IBM INTL BUS MACHINE 27-Dec-02 77.36 -1.14MSFT MICROSOFT CP 27-Dec-02 52.97 -0.42Dell DELL COMPUTER 27-Dec-02 27.02 -0.36GE GENERAL ELEC CO 27-Dec-02 24.70 -0.41F FORD MOTOR CO 27-Dec-02 9.58 -0.21C CITIGROUP 27-Dec-02 35.17 -0.85BA BOEING CO 27-Dec-02 32.33 -0.30BAC BANK OF AMERICA 27-Dec-02 69.17 -0.67MER MERRILL LYNCH 27-Dec-02 38.30 -1.24XOM EXXON MOBIL 27-Dec-02 34.64 -0.68