Username: Password: Not registered?

Featured Job Listings

Jobs Software Papers All

Main : Excel : 



Sort by:  Title () Date () Rating () Popularity ()
Files currently sorted by: Title (A to Z)


Category: Excel View Full Details
Download Now!2 factor Trinomial tree for default intensity
Submitter: vanna Date: 2006/9/2
Description:
Calculates European exchange option for risky bond vs. Risk free bond
2D tree is based on Schonbucher's book "Credit derivative pricing models" section 7.4.
1D tree is based on method as described in appendix for Brigo's "Interest rate models"

Following inputs are needed:
1.Term structure of risk free rates as piecewise flat forward indexed by 6 months
2.Market Cap volatilties indexed by 6 months
3.Term structure of piecewise flat forward indexed by 6 months which is obtained for risky bonds
4.Model parameters for default risk hull white process.
5.Correlation of default risk vs. risk free rate.
6.Exchange option data

Outputs are :
1.Hull white model parameters for risk free rate process.
2.Exchange option price calculated using 2D trinomial tree
Downloaded 2392 times  2392  File Size 0 bytes  Supported Platforms Excel VBA  Home Page http://quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: Excel View Full Details
Download Now!American Option price using "Regress Later" by Glasserman and Yu
Submitter: vanna Date: 2007/12/27
Description:
"Regress later" is a monte carlo method suggested by Glasserman and Yu. It is different from Longstaff and Schwartz method that the regession takes place one time step ahead. To do this the authors suggest use basis functions in regression which are martingales.

Assume:
N : no of simulations
M : no of time steps

Algorithm:
1.Initialize N x M stock prices grid with stock price evolution using GBM dynamics.

2.Create these N x M matrices
CC : stores continuation values
CE : store immediate exercise values
EF : Stores exercise flag

3.Initialize last column of CE,CE,EF using option payoff

4.Start Iterating for each time step backwards

4a.Create a matrix of regression independent variables using basis functions 1, X, X^2 and set X=stock price at the node stepof the next time
Note : pick only those points which have a positive immediate exercise value. rest of the nodes with 0 or negative payoff are ignored for regresion input

4b.Set input dependent/ observations vector to immediate exercise values of the next time step

4c.Perform Ordinary Least sqaures to get parameters for coeffcients of basis functions. It is basically a regression of stock variables at the next time step to option values at the next timestep. Since both the independent and dependent variables are taken at same timestep, the values for comparision using these regression parameters do not need to get discounted.

4d.Now compute continuation values at this node using the parameter values obtained from 4c.Note that Longstaff method comapres discounted contunation value from next step to current immediate exercise value.
While Glasserman compares regressed values whose parameters were basically computed using stock variables and option values at the next step.

4e.Compare continuation values obtained from regression in 4d vis-a-vis the immediate exercise values

4f.If immediate exercise value is more than regressed continuation value, choose to exercise and Populate EF matrix flag at the node.

4g.Populate continuation value : If exercise flag at node is set then set it to immediate exercise value else set it to discounted value of continuation value at next timestep

4h.Repeat 4a until simualtions are done

5.Observe the EF matrix and think that actual exercise decision was made when EF flag=1. Accordingly calculate expected payoff by averaging. This gives the MC option price



NOTE: I have tried comparing results to following run from Quantlib:
Option type = Put
Maturity = May 17th, 1999
Underlying price = 36
Strike = 40
Risk-free interest rate = 6.000000 %
Dividend yield = 0.000000 %
Volatility = 20.000000 %


Method European Bermudan American
Black-Scholes 3.844308 N/A N/A
Barone-Adesi/Whaley N/A N/A 4.459628
Bjerksund/Stensland N/A N/A 4.453064
Integral 3.844309 N/A N/A
Finite differences 3.844342 4.360807 4.486118
Binomial Jarrow-Rudd 3.844132 4.361174 4.486552
Binomial Cox-Ross-Rubinstein 3.843504 4.360861 4.486415



Using same input parameters in excel file and timesteps=100 and simualtions=10000, I am getting price around 4.47


To get an idea of the underlying process, there is an additional option of dumping the matrices of stock prices,continuaiton values,exercise flags and immediate exercise values at each node. To enable this option, tiemsteps and simulations should be less than 100
Downloaded 767 times  767  File Size 1000 bytes  Supported Platforms EXCEL VBA MONTE CARLO  Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: Excel View Full Details
Download Now!American option price using Brennan Schwartz
Submitter: vanna Date: 2008/8/15
Description:
Calculates American put option price using Brennan Schwartz method, using Implicit finite difference scheme.
While doing rollback of option price vector in the finite difference grid, option values are calculated at each timestep as if there is no constraints. Then after getting the vector, constraint condition is satisfied by taking max values.
Note that this is only first order accurate and convergence is slower than penalty method.
Downloaded 656 times  656  File Size 0 bytes  Supported Platforms Excel VBA  Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: Excel View Full Details
Download Now!American option price using Penalty method
Submitter: vanna Date: 2008/8/15
Description:
This code demonstrates application of finite difference method as described in paperQuadratic convergence for valuing American options using a penalty method


It calculates price of American put option.Input parameters are option and finite difference grid specifications and tolernance parameter required for penalty algorithm.

Iterations are continued until formula (4.20) is satisfied

To get a more inuitive understanding of the penalty method please refer Penalty and front-fixing methods for the numerical solution of American option problems
Downloaded 407 times  407  File Size 0 bytes  Supported Platforms Excel VBA  Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: Excel View Full Details
Download Now!American Option pricing by Longstaff and schwartz Least Squares without MS Addin
Submitter: vanna Date: 2007/12/25
Description:
Longstaff and Schwartz (1992) had devised a method to value American options using Monte carlo simulation. This spreadhsheet implements valuation of a call/put option of american exercise type. (Increasing the no of timesteps tend to approach american price)

Assume:
N : no of simulations
M : no of time steps

Algorithm:
1.Initialize N x M stock prices grid with stock price evolution using GBM dynamics.

2.Create these N x M matrices
CC : stores continuation values
CE : store immediate exercise values
EF : Stores exercise flag

3.Initialize last column of CE,CE,EF using option payoff

4.Start Iterating for each time step backwards

4a.Create a matrix of regression independent variables using basis functions 1, X, X^2 and set X=stock price at the node. Note : Logstaff recommends to pick only those points which have a positive immediate exercise value. rest of the nodes with 0 or negative payoff are ignored for regresion input

4b.Set input dependent/ observations vector to immediate exercise values

4c.Perform Ordinary Least sqaures to get parameters for coeffcients of basis functions. It is basically a regression of stock variables at the current time step to cotinuation values at the next timestep.

4d.Now compute back continuation values using the parameter values obtained from 4c.

4e.Compare continuation values obtained from regression vis-a-vis the immediate exercise values

4f.If immediate exercise value is more than regressed continuation value, choose to exercise and Populate EF matrix flag at the node.

4g.Populate continuation value : If exercise flag at node is set then set it to immediate exercise value else set it to discounted value of continuation value at next timestep

4h.Repeat 4a until simualtions are done

5.Observe the EF matrix and think that actual exercise decision was made when EF flag=1. Accordingly calculate expected payoff by averaging. This gives the MC option price



NOTE: I have tried comparing results to following run from Quantlib:
Option type = Put
Maturity = May 17th, 1999
Underlying price = 36
Strike = 40
Risk-free interest rate = 6.000000 %
Dividend yield = 0.000000 %
Volatility = 20.000000 %


Method European Bermudan American
Black-Scholes 3.844308 N/A N/A
Barone-Adesi/Whaley N/A N/A 4.459628
Bjerksund/Stensland N/A N/A 4.453064
Integral 3.844309 N/A N/A
Finite differences 3.844342 4.360807 4.486118
Binomial Jarrow-Rudd 3.844132 4.361174 4.486552
Binomial Cox-Ross-Rubinstein 3.843504 4.360861 4.486415



Using same input parameters in excel file and timesteps=100 and simualtions=10000, I am getting price around 4.50


To get an idea of the underlying process, there is an additional option of dumping the matrices of stock prices,continuaiton values,exercise flags and immediate exercise values at each node. To enable this option, tiemsteps and simulations should be less than 100
Downloaded 1297 times  1297  File Size 1000 bytes  Supported Platforms EXCEL VBA MONTE CARLO  Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)
(1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 »
Post Job
Employers - View Resumes
Featured Recruiters