Top-rated recipes tagged "black" but not "pylab"http://code.activestate.com/recipes/tags/black-pylab/top/2010-04-06T13:26:02-07:00ActiveState Code RecipesSolving the Black-Scholes PDE with laplace inversion:Revised (Python)
2010-04-06T13:26:02-07:00Fernando Nieuwveldthttp://code.activestate.com/recipes/users/4172088/http://code.activestate.com/recipes/577142-solving-the-black-scholes-pde-with-laplace-inversi/
<p style="color: grey">
Python
recipe 577142
by <a href="/recipes/users/4172088/">Fernando Nieuwveldt</a>
(<a href="/recipes/tags/black/">black</a>, <a href="/recipes/tags/laplace/">laplace</a>, <a href="/recipes/tags/scholes/">scholes</a>, <a href="/recipes/tags/talbot/">talbot</a>).
Revision 2.
</p>
<p>I originally posted this code in <a href="http://code.activestate.com/recipes/577132/">Recipe 577132</a> and this is a repost of that recipe with corrections since there was an error in the original recipe. Added here is an error analysis to show the effectiveness of the Laplace inversion method for pricing European options. One can test the accuracy of this method to the finite difference schemes. The laplace transform of Black-Scholes PDE was taken and the result was inverted using the Talbot method for numerical inversion. For a derivation of the laplace transform of the Black-Scholes PDE, see for instance <a href="http://www.wilmott.com/pdfs/020310_skachkov.pdf." rel="nofollow">www.wilmott.com/pdfs/020310_skachkov.pdf.</a></p>