trouble with the finite differences framework

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

trouble with the finite differences framework

pdenapoli
Hi,
 
I'm having trouble with the finite differences framework of Quantlib.
I could not implement the example oulined in
 
 http://www.quantlib.org/reference/a01930.html 
 
It seems that the two lines related to the boundary conditions are
wrong:
 
    L.setLowerBC(BoundaryCondition(BoundaryCondition::Neumann,
        exercisingValue[1]-exercisingValue[0]));
    L.setUpperBC(BoundaryCondition(BoundaryCondition::Neumann,
        exercisingValue[gridPoints_-1]-exercisingValue[gridPoints_-2]));
 
In fact there seems not to be any function/method called setLowerBC
(or setUpperBC) in the library. I susspect that the documentation is
out of day. Could you tell me how show I replace this two lines?
 
I think that if you want quantlib to be useful, it is very important
to keep the documentation up to date.
 
It would be nice to provide a full working example for the finite
differences framework.
 
Best regards,
Pablo De Napoli
 
 
 I  


Reply | Threaded
Open this post in threaded view
|

Re: trouble with the finite differences framework

Luigi Ballabio-2
On 2004.09.08 23:17, [hidden email] wrote:

> I'm having trouble with the finite differences framework of Quantlib.
>
> It seems that the two lines related to the boundary conditions are
> wrong:
>
>     L.setLowerBC(BoundaryCondition(BoundaryCondition::Neumann,
>         exercisingValue[1]-exercisingValue[0]));
>     L.setUpperBC(BoundaryCondition(BoundaryCondition::Neumann,
>         exercisingValue[gridPoints_-1]-exercisingValue
> [gridPoints_-2]));

Yes, the documentation is out of date. I'll try and update it when I  
find some time. But we're about to try and refactor the framework in  
the near future, and given that the time we can give to QuantLib is  
limited, it might happen that documentation is postponed until the  
framework we document is not itself outdated.

> It would be nice to provide a full working example for the finite
> differences framework.

That would be the FdAmericanOption class and all similar pricers.
They're in ql/Pricers.

Hope this helps,
                Luigi



Reply | Threaded
Open this post in threaded view
|

Re: trouble with the finite differences framework

Luigi Ballabio-2
On 2004.09.09 13:50, Luigi Ballabio wrote:
>> It would be nice to provide a full working example for the finite
>> differences framework.
>
> That would be the FdAmericanOption class and all similar pricers.
> They're in ql/Pricers.

Following up to myself:

re-reading my mail, I realized it can look harsch. I apologize if that  
was the impression, but as my real job doesn't leave me much time for  
QuantLib, I preferred to give a short pointer to an answer rather than  
not answering at all for lack of time.

Cheers,
        Luigi