4
$\begingroup$

I've been trying to implement a bivariate tree for pricing american options with the heston model in R using the paper of Beliaeva and Nawalkha (http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1107934).

However I am obtaining negative transition probabilities for the middle node change of the stock price. I am pretty sure my coding is correct, I also cross-checked with the book by Rouah (http://eu.wiley.com/WileyCDA/WileyTitle/productCd-1118548256.html) and what I did resembles the code there.

Has anyone else experienced this or can give some pointers?

EDIT: Here's my code for the stock probabilities. As a sample I used the numbers given in the Beliaeva paper: S_0 = 100, V_0 = 0.04, sigma = 0.1, kappa = 3, theta = 0.04, rho = -0.1.

The results I got where: (0.4860517840, -0.0008249158, 0.5147731319)

stockProb <- function(v0,vt,yt,sigma,kappa,rho,delT)
{
  muY <- (rho/sigma*kappa-0.5)*vt
  sigmayt <- sqrt(1-rho^2)*sqrt(vt)
  sigmay0 <- sqrt(1-rho^2)*sqrt(v0)
  if(vt > 0)
  {
    k <- ceiling(sqrt(vt/v0))
  }
  else
  {
    k <- 1
  }

  I <- round(muY/k/sigmay0*sqrt(delT))
  yu <- yt + (I+1)*k*sigmay0*sqrt(delT)
  ym <- yt + I*k*sigmay0*sqrt(delT)
  yd <- yt + (I-1)*k*sigmay0*sqrt(delT)  
  eu <- yu - yt - muY*delT
  em <- ym - yt - muY*delT
  ed <- yd - yt - muY*delT
  pu <- 0.5*(sigmayt^2*delT + em*ed)/k^2/sigmay0^2/delT
  pm <- -(sigmayt^2*delT + eu*ed)/k^2/sigmay0^2/delT
  pd <- 0.5*(sigmayt^2*delT +eu*em)/k^2/sigmay0^2/delT  
  ps <- c(pu,pm,pd)
  ps
}
$\endgroup$
  • 1
    $\begingroup$ Hi Season, welcome to Quant.SE! As the probabilities are negative I think it's best to show your code anyway. Without the code people will probably think it's a bug. $\endgroup$ – Bob Jansen Sep 28 '14 at 14:49
  • 1
    $\begingroup$ I can't really comment on the paper or the tree discretization in it, but trees seem like a pretty crazy way of solving the Heston PDE compared to implicit finite differences. $\endgroup$ – Brian B Sep 28 '14 at 22:09
  • $\begingroup$ No luck yet for me. Can you the complete invocation of the function? Do you by any chance have v0 and vt equal? $\endgroup$ – Bob Jansen Sep 29 '14 at 6:07
  • $\begingroup$ Well yes in the first step vt and v0 are equal but that is according to the paper. $\endgroup$ – Season Sep 29 '14 at 7:09
  • $\begingroup$ BTW: thanks for sharing the paper. I'm still reading it. The authors spend quite some time on these negative probabilities and apparently a number of things can go wrong. I do wonder though: in the first step shouldn't v0 be the volatility now and vt the vol at the next step. $\endgroup$ – Bob Jansen Oct 1 '14 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.