Posted by
Haoyun XU on
Apr 23, 2014; 8:05am
URL: http://quantlib.414.s1.nabble.com/FDM-Boundary-Conditions-in-QuantLib-tp15185.html
Dear all,
I wonder what are the boundary conditions used by QuantLib FDM pricing engines (e.g., FdBlackScholesBarrierEngine). I understand this may be scheme-dependent. If that's the case, you can use ImplicitEuler as an example.
Assume we have N price grids at each time step, representing stock prices ranging from Smin to Smax (both inclusive). When we discretize the PDE, we have N-2 equations (1 for each inner grid). To make it complete, we need boundary conditions at Smin & Smax for each time step.
We could do this in a product-specific way. For example, we can specify simple Dirichlet boundary conditions for vanilla European options as below:
- Vanilla Call
- V(Smin, t) = 0
- V(Smax, t) = S - K exp (-r * (T - t))
- Vanilla Put
- V(Smin, t) = K * exp (-r * (T - t))
- V(Smax, t) = 0
Alternatively we may impose some "generic" boundary conditions, as suggested by Wilmott. See Wilmott on QF (2nd edition) Vol 3 Chapter 77.10.
Or maybe there are other techniques to handle it, which I are not aware of.
I tried to trace the code myself, but got lost in the method ImplicitEulerScheme::step().
Could someone help on this?
Best wishes,
Henry
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users