FiniteDifferences framework: composition of L including S

Posted by Penschke, Walter on
URL: http://quantlib.414.s1.nabble.com/FiniteDifferences-framework-composition-of-L-including-S-tp3348.html

Hello QL-community,

I did have a look at the finite differences framework of QL. The sample code
provided in the documentation is based on a version of the BlackScholes
differential equation, which is defined for log(S). In this version the
differential operator L only depends on constants and on space-differentials
of the solution. As a consequence the grid for example is defined on the log
of the underlying.

I was now trying to perform similar calculations as in the example, however
now based on the BlackScholes differential equation for S. I.e.: the
differential equation looks like this:

        f = f(S, t)
        df/dt = rf - rS df/dS - 1/2 sigma^2 S^2 d^2/dS^2

(For the sake of simplicity I skipped the dividend yield in the above
formula.) As you can see the right hand side of the equation also contains
S. I now wonder, how I should set up the differential operator L with the
tools provided by QL. Especially it is not clear to me how I should
incorporate S in the definition of the differential operator L.

Any help, ideas or comments highly appreciated. Thanks,


wpe