N, alpha, sigma_vec, cf_dates, cf_matrix,
R_matrix, dt, Timevec, notional, Mat, K)
Compute the put or call value of a bond option based on the Hull-White Tree.
This function should be called from Octave script option_bond_hw.m
which handles all input and ouput data.
References:
- Hull, Options, Futures and other derivatives, 6th Edition
- Clewlow and Strickland, Implementing Derivatives Models, Page 255ff,.
Chapter 9: Constructing Trinomial Trees for the short rate, 1st Edition
Input and output variables:
- call_flag: Boolean (true: call option, false: put option
- T: Bond Maturity in years
- N: Number of cash flow dates / call dates
- alpha: mean reversion parameter of Hull-White model
- sigma_vec: scenario dependent volatility
- cf_dates: row vector with cash flow dates (in days)
- cf_matrix: scenario dependent cash flow values
- R_matrix: scenario dependent discount rates for each cf date)
- dt: row vector with time steps between call dates
- Timevec: row vector with timesteps of cf_dates and a year after
- notional: bond notional)
- Mat: cash flow index of options maturity date
- K: Strike value
- accr_int_mat: scenario dependent interest cash flow values
- american: Boolean (true: american option, false: european option
- Put: OUTPUT: Putprices (vector)
- Call: OUTPUT: Callprices (vector)