Sunday, December 2, 2012

Topaz: Monte Carlo Method for Option Pricing Under Black-Scholes model and Merton Jump Diffusion Model


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.
    
    
  • Initial condition: \begin{equation} P_0(S) = \max\{K-S,0\}. \end{equation}

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

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