Username: Password: Not registered?

Featured Job Listings

Jobs Software Papers All

Main : C++ : 



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


Category: C++ View Full Details
Download Now!American Call spread using Andersen's method
Submitter: vanna Date: 2006/10/6
Description:
Calculates call price for an American Spread option using Anersen's method. (uses Golden section method to find optimum exercise frontier)

Results can be compared by setting same imput parameters in Spread Option using 3D tree
Downloaded 1060 times  1060  File Size 0 bytes  Supported Platforms C++  Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: C++ View Full Details
Download Now!American option price using Andersen's method
Submitter: vanna Date: 2008/8/9
Description:
Calculates option price using Andersen's method in the GSL C++ framework.

Reuslts can be compared by setting same parameters to CRR Tree or LSM Method
Downloaded 737 times  737  File Size 0 bytes  Supported Platforms   Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: C++ View Full Details
Download Now!American Option Pricing in VG model using Finite Difference
Submitter: vanna Date: 2006/12/25
Description:
Appendix of the pdf file contains code to price american option in variance gamma model using FD scheme

Filippo Fiorani

keywords : PIDE, FDM
Downloaded 1146 times  1146  File Size 0 bytes  Supported Platforms C++  Home Page http://www.icer.it/
Rating: 10.00 (1 vote)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (0)

Category: C++ View Full Details
Download Now!Asian Option Price using 2D Finite Difference Method
Submitter: vanna Date: 2008/8/8
Description:
This file demonstrates using a 2D finite difference method to solve call option price of an arithmetic average fixed strike asian option.

Notes:
1. Upwind scheme is used to discretize the asian option PDE as mentioned in eqns 12-15 of paper Efficient Pricing of an Asian Put Option Using Stiff ODE Methods
2. Implicit scheme is used for time stepping.
3. A simple Gauss siedel mehtod is used to do Finite difference.
4. Environment is based on using GSL library on Visual Studio 2005 C++ express. To setup GSL and VS 2005 pl. refer How do I use GSL on Visual C++ 2005 express?
5. The result is tested by comparing data from Asian Option price using Monte carlo simulation
following are some test results:
double S0=100; //Spot price (S0)
double K=100; // option strike
double sigma=0.15; //volatility
double r=0.05; //Risk free rate [r]
double T=1; //Maturity of Option in years (T)

MC option price=4.7315
FD option price=4.77732


double S0=100; 
double K=100; 
double sigma=0.2; 
double r=0.1; 
double T=1; 

MC option price=7.1027
FD option price=7.12212


6.This technique is not stable for all parameter constellations and requires satisfaction of Peclet condition. eg., results become unrelaible around or after volatility=0.5. (Van leer's flux limiter finite volume method is supposedly more accurate)
Downloaded 741 times  741  File Size 0 bytes  Supported Platforms C++ GSL Visual Studio 2005  Home Page http://www.quantcode.com/
Rating: 0.00 (0 votes)
Rate this File | Modify | Report Broken File | Tell a Friend | Comments (1)

Category: C++ View Full Details
Download Now!Asian option price using Alternating Direction Implicit (ADI)
Submitter: vanna Date: 2008/8/11
Description:
This file demonstrates applciation of Alternating direction Implicit finite difference method to solve call option price of an arithmetic average fixed strike asian option. It also demonstartes superior stability in comparing to implicit or explicit methods

For the spatial grid assume the following 2 axes:
S=stock price
A=Arithmetic average of stock price


Notes:
1. Upwind scheme is used to discretize the asian option PDE as mentioned in eqns 12-15 of paper Efficient Pricing of an Asian Put Option Using Stiff ODE Methods
2. First half timestep implements S explcit and A implicit. While next half timestep has S implicit and A explicit.
3. A simple Gauss siedel mehtod is used to do Finite difference for each set of equations.
4. Environment is based on using GSL library on Visual Studio 2005 C++ express. To setup GSL and VS 2005 pl. refer How do I use GSL on Visual C++ 2005 express?
5. The result is tested by comparing data from Asian Option price using Monte carlo simulation
following are some test results:
double S0=100; //Spot price (S0)
double K=100; // option strike
double sigma=0.15; //volatility
double r=0.05; //Risk free rate [r]
double T=1; //Maturity of Option in years (T)

MC option price=4.7315
FD option price=4.77736


double S0=100; 
double K=100; 
double sigma=0.2; 
double r=0.1; 
double T=1; 

MC option price=7.1027
FD option price=7.1315



6.ADI method has superior convergence as compared to pure implicit method. For example, the pure 2D implicit method implementation Asian Option Price using 2D Finite Difference Method
works for sigma=0.15 and sigma=0.25 but blows up for sigma=0.5. While ADI method seems to be close enough.

double S0=100; 
double K=100; 
double sigma=0.5; 
double r=0.1; 
double T=1; 

MC option price=13.2946
FD option price=13.3061

Downloaded 414 times  414  File Size 0 bytes  Supported Platforms C++ GSL Visual Studio 2005  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 »
Post Job
Employers - View Resumes
Featured Recruiters