Menu

#142 Code error in fdmblackscholesmesher.cpp

None
closed-invalid
nobody
None
5
2017-01-30
2012-01-19
Simon
No

Line 68 currently reads
" std::pair<Real,Real>(std::log(cPoint.first),cPoint.second)));"
it should read
" std::pair<Real,Real>(std::log(cPoint.first),std::log(cPoint.second))));

Discussion

  • Klaus Spanderen

    Klaus Spanderen - 2012-01-21

    Hi Simon

    the first parameter must be given in log(cPoint.first) because the mesher is in log(S). The second parameter controls the number of grid points x_i that lie in the neighborhood of log(K). Therefore it is not a bug but a question of the convention we want to use to specify this density parameter.

    In the the past I've used the currently implemented convention that follows e.g. the Tavella book. If you want to change it we'll have to change the value of the density parameter in fdblackscholesvanillaengine.cpp etc from 0.1 to exp(0.1)~1.1. Because the implemented behavior should remain as it is.

     
  • Luigi Ballabio

    Luigi Ballabio - 2017-01-30
    • status: open --> closed-invalid
    • Group: -->
     

Log in to post a comment.