Purpose
- The package "Topaz" computes the price of a European put option under the Black-Scholes model and the Merton jump diffusion model. The Monte-Carlo method was used.
Specifications
- Name: Topaz.
- Author: Feng Chen.
- Finishing date: 10/13/2012.
- Languages: MATLAB.
Simple Example
- Parameters: \begin{equation} T = 0.25, \quad \sigma = 0.15, \quad r = 0.05, \quad K = 100, \end{equation} where $T$ is the maturity, $\sigma$ is the volatility, $r$ is the interest rate, and $K$ is the strike price of the option.
Quick Start
- Compiling and running:
matlab Topaz_BS
- Graphics:
- CPU: Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz
- OS: Ubuntu 14.04.1 LTS.
- Release: MATLAB R2014b.
References
- Black-Scholes model.
- Monte Carlo method.
- Feng Chen, Jie Shen, and Haijun Yu. A New Spectral Element Method for Pricing European Options Under the Black–Scholes and Merton Jump Diffusion Models, Journal of Scientific Computing, Volume 52, Number 3, 499-518, (2012).
Code Highlights
randn('state',4);
B = sqrt(T) * randn(1,n);
S = S0' * exp(r*T-sigma*sigma*T/2d0+sigma*B);
P0 = exp(-r*T)*sum(subplus(K-S),2)/n;
No comments:
Post a Comment