SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
Rabelais
Topic Author
Posts: 9
Joined: September 22nd, 2020, 6:33 pm

How to perform Monte Carlo simulations to price a Forward contract under the Schwartz mean reverting model?

September 22nd, 2020, 8:17 pm

I have 200 monthly spot prices of a commodity (oil) and I have to model the prices using the Schwartz mean reverting SDE:
Image
where W is the standard Brownian motion, mu is the drift, sigma the volatility, alpha the strength of mean reversion (these parameters are estimated from data).
This commodity is the underlying asset of the Forward contract with price at delivery F(S,T), where S is the spot price at time 0 and T is the expiry time.
Such a contract is equivalent to having an option with Image, where K=F(S,T) is the strike price.

Letting Image be the time to expiry, the formula for the price of the forward contract is 
Image
and the value of the equivalent option is Image

Knowing this information, how to run (I'm using matlab but other languages are fine too) a Monte Carlo simulation to price this particular option? Usually, these are the steps to follow
  • generate a large number of random price paths for the underlying asset
  • for each path compute the payoff of the option
  • compute the average of all payoffs
  • discount the average to today
however, I'm having some problems with this framework. This is what I tried so far

I wrote the (matlab) code (download below) which computes what I think (can you confirm?) is the exact solution for option pricing (V_exact in the attached code) and then computes the approximating solution by means of Monte Carlo simulation (V_Monte_Carlo in the code). The MC simulation uses the first spot price (real data) and the estimated parameters to 'randomly' compute the next spot prices. To compute the spot prices, instead of using the equation for dS that I wrote above it's easier to use this one which is obtained from dS by letting X=log S:
Image
where Image and Image

These are the steps for the Monte Carlo simulation:
  1. The first price F of the forward contract - and so of the option V too - is set to 0 since there is no cost to enter a forward contract. Compute the first value of X by taking the logarithm of the first spot price
  2. compute the next value of X using the formula (2)
  3. compute the next value of the spot price by taking the exponential of X
  4. compute the next price F of the forward contract using formula (1)
  5. compute the next price V of the option using Image
  6. compute the average V_Monte_Carlo of the option prices
  7. repeat steps 2-6 until all values are computed
However, as you can see from the image below, the curve of the option prices obtained with the MC simulation is smooth, while what I was expecting was a curve similar to the one of the exact solution. So I made some mistakes somewhere

p.s. if you prefer I can write the code here

Image
Attachments
testMC.rar
(1.33 KiB) Downloaded 7 times
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On