BSMTermOperator

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

BSMTermOperator

Joseph Wang
I've upload onto the wiki

http://wiki.quantlib.org/twiki/bin/view/Quantlib/FiniteDifferencePricingEngines

a first pass at an operator called BSMTermOperator.  It takes an
arbitrary grid and black scholes process and
generates a differential operator for it.  The good thing is that it
takes into account volatilities smiles and time
dependent yields.  The bad news is that it is probably going to be a lot
more computationally intensive.

Something that occurs to me is that you can easily generate these
operators from a process.  So one could
make a black scholes process called SimpleBlackScholesProcess that
generates a "fast operator" with a lot
of the mathematical simplifications in place, while another black
scholes process can generate a fully
general operator object.




Reply | Threaded
Open this post in threaded view
|

Re: BSMTermOperator

Luigi Ballabio
On 02/04/05 05:58:12, Joseph Wang wrote:
> I've upload onto the wiki
>
> http://wiki.quantlib.org/twiki/bin/view/Quantlib/FiniteDifferencePricingEngines
>
> a first pass at an operator called BSMTermOperator.

Joseph,
        that implementation might not have worked (TimeSetter::setTime()  
had the wrong signature, and passing your operator to classes expecting a  
TridiagonalOperator instance might have sliced it and destroyed the time-
setting logic.) I've uploaded a modified (and untested) version.
You might want to try it out.

> The bad news is that it is probably going to be a lot more  
> computationally intensive.

Yes, setTime() will be called at each step during rollback.

> Something that occurs to me is that you can easily generate these  
> operators from a process.  So one could
> make a black scholes process called SimpleBlackScholesProcess that  
> generates a "fast operator" with a lot of the mathematical  
> simplifications in place, while another black scholes process can  
> generate a fully general operator object.

True, but to keep interfaces slim I wouldn't have the process itself  
generate the operator--I'd prefer some function dispatching on the process  
type...

Later,
        Luigi


----------------------------------------

Barker's Proof:
        Proofreading is more effective after publication.




Reply | Threaded
Open this post in threaded view
|

Re: BSMTermOperator

Joseph Wang
Thanks.

I took that version and make some changes.  The main one is that I added
some code so that the operator does its calculations in log price space
rather than price space so that the operator looks more like the simple
BSM operator.

I've uploaded the changes and some test code to put into the test
suite.  The test code just checks for consistency with the old BSM operator.

Next week, I'll start modifying the FD routines to use the new
operator.  That will give the finite difference algorithms the ability
to handle time-dependent rates and volatilities.

Questions:

* thoughts on using the boost test library message code to do tracing?
* any idea what the inheritance structure for the convertible bond
instrument should be?
* anyone have test data to test options with time dependent rates?


Luigi Ballabio wrote:

>
> On 02/04/05 05:58:12, Joseph Wang wrote:
>
>> I've upload onto the wiki
>>
>> http://wiki.quantlib.org/twiki/bin/view/Quantlib/FiniteDifferencePricingEngines 
>>
>>
>> a first pass at an operator called BSMTermOperator.
>
>
> Joseph,
>     that implementation might not have worked (TimeSetter::setTime()  
> had the wrong signature, and passing your operator to classes
> expecting a  TridiagonalOperator instance might have sliced it and
> destroyed the time- setting logic.) I've uploaded a modified (and
> untested) version.
> You might want to try it out.
>
>



Reply | Threaded
Open this post in threaded view
|

Re: BSMTermOperator

Ferdinando M. Ametrano-3
At 08.43 05/02/2005, Joseph Wang wrote:
>* anyone have test data to test options with time dependent rates?

I don't have exactly what you are looking for, anyway please consider
testing the FD engine with time dependent parameters against the analytic
(constant parameters) engine for European options. They should give the
same price since Europeans are sensitive only to the terminal rate/variance.

ciao -- Nando