Code covered by the BSD License  

Highlights from
Heston Option Pricer

Be the first to rate this file! 15 Downloads (last 30 days) File Size: 2.92 KB File ID: #25771
image thumbnail

Heston Option Pricer

by Rodolphe Sitter

 

07 Nov 2009

Compute European call option price using the Heston model and a conditional Monte-Carlo method

| Watch this File

File Information
Description

Compute European call option price using the Heston model and a conditional Monte-Carlo method

      [call_prices, std_errs] = Heston(S0, r, V0, eta, theta, kappa, strike, T, M, N)

*******************************************************************************
INPUTS:

  S0 - Current price of the underlying asset.
  r - Annualized continuously compounded risk-free rate of return over the life of the option, expressed as a positive decimal number.

       Heston Parameters:
  V0 - Current variance of the underlying asset
  eta - volatility of volatility
  theta - long-term mean
  kappa - rate of mean-reversion

  strike - Vector of strike prices of the option
  T - Time to expiration of the option, expressed in years.
  N - Number of time steps per path
  M - Number of paths (Monte-Carlo simulations)

*******************************************************************************
  OUTPUTS:

  call_prices - Prices (i.e., value) of a vector of European call options.

  std_err - Standard deviation of the error due to the Monte-Carlo simulation:
                    (std_err = std(sample)/sqrt(length(sample)))
                 
*******************************************************************************
  Example:

    S0 = 100; r = 0.02;
    V0 = 0.04; eta = 0.7; theta = 0.06; kappa = 1.5;
    strike = 85:5:115; T = 0.25
    M = 2000; % Number of paths.
    N = 250; % Number of time steps per path

      [call_prices, std_errs] = Heston(S0, r, V0, eta, theta, kappa, strike, T, M, N)

call_prices =
15.9804 11.4069 7.2125 3.9295 2.1213 1.2922 0.8625
   
std_errs =
 0.0198 0.0263 0.0329 0.0367 0.0357 0.0315 0.0268

*******************************************************************************

I thank Roger Lee for his MSFM course at the University of Chicago

Required Products Financial Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
08 May 2010 Daniel

Hi Rodolph,
Quick question, where does rho fit in, in all of this?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
finance Rodolphe Sitter 09 Nov 2009 10:51:11
stochastic Rodolphe Sitter 09 Nov 2009 10:51:11
volatility Rodolphe Sitter 09 Nov 2009 10:51:11
skew Rodolphe Sitter 09 Nov 2009 10:51:11
smile Rodolphe Sitter 09 Nov 2009 10:51:11
montecarlo Rodolphe Sitter 09 Nov 2009 10:51:11
simulation Rodolphe Sitter 09 Nov 2009 10:51:11
blackscholes Rodolphe Sitter 09 Nov 2009 10:51:11
pricing Rodolphe Sitter 09 Nov 2009 10:51:11
call Rodolphe Sitter 09 Nov 2009 10:51:11
option Rodolphe Sitter 09 Nov 2009 10:51:11
moneyness Rodolphe Sitter 09 Nov 2009 10:51:11
random Rodolphe Sitter 09 Nov 2009 10:51:11
heston Rodolphe Sitter 09 Nov 2009 12:34:53
heston Greg Mollentz 28 Jan 2010 08:56:06

Contact us at files@mathworks.com