Re: Boundary condition for each time step in finite difference engine

Posted by Haoyun XU on
URL: http://quantlib.414.s1.nabble.com/Boundary-condition-for-each-time-step-in-finite-difference-engine-tp14449p14461.html

Hi Peter,

I have a question regarding your FdmTimeDepDirichletBoundary class:

How can I apply the boundary constraint to a range of points near the boudary, instead of the exact point on the boundary?

More specifically, think about the pricing of discretely monitored (daily) barrier options. Suppose we are using finite difference engine on a grid from Smin to Smax. We have ordinary Dirichlet boundary for each intraday time slice. However,  for day-end time slice, extra constraint should be applied. For example, up&out put options should have 0 value for underlying price between barrier
and Smax.

Any ideas how can I handle this using existing QuantLib framework?

Best,
Henry

>
> ---------- Forwarded message ----------
> From: Peter Caspers <[hidden email]>
> To: Klaus Spanderen <[hidden email]>
> Cc:
> Date: Sat, 20 Jul 2013 09:22:29 +0200
> Subject: Re: [Quantlib-users] Boundary condition for each time step in finite difference engine
> Hi,
>    sorry, there is still debug code in this class which writes messages
> to std::cout. Please consider removing that before trying it out, as
> shown here
>
> https://github.com/lballabio/quantlib/pull/17/files
>
> Luigi, maybe we can get this tiny fix into 1.3 ?
>
> Thank you
>    Peter
>
>
> Klaus Spanderen <[hidden email]> writes:
>
>> Hi
>>
>>
>>
>> you might want to consider to use Peter's
>> FdmTimeDepDirichletBoundary, which allows you to specify a time
>> dependent value for the Dirichlet boundary condition.
>>
>>
>>
>> If your barrier is only monitor using the closing prices but not with
>> any intra day quotes then maybe you should only use one time step per
>> day.
>>
>>
>>
>> regards
>>
>> Klaus
>>
>>
>>
>> On Wednesday, July 17, 2013 01:42:55 PM Haoyun XU wrote:
>>
>> Hi,
>>
>>
>> I am considering pricing daily monitored barrier options with
>> QuantLib. For this to work, I need to set up boundary conditions
>> depending on time steps. More specifically, barriers are only active
>> at specified steps (day end).
>>
>>
>> I wonder how can I do this? Does the FdmDirichletBoundary class
>> support different boundary & boundary values at different time steps?
>>
>>
>> Many thanks!
>>
>>
>> Best,
>>
>> Henry
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> See everything from the browser to the database with AppDynamics
>> Get end-to-end visibility with application monitoring from AppDynamics
>> Isolate bottlenecks and diagnose root cause in seconds.
>> Start your free trial of AppDynamics Pro today!
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> QuantLib-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users