changing stochastic process object

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

changing stochastic process object

Warren Chou
Hello,

I would like to bump the implied vol value/curve/surface of a derived StochasticProcess1D object.

I'm considering:

1) bumping implied vol private data of existing stochastic process object (using new virtual bumpVol method implemented in each derived class of StochasticProcess1D) , perform calculation (calling evolve() method), then undoing bump,

2) deep-copying derived StochasticProcess1D object by recursively typing (through dynamic casts) member pointers, then bumping new object's private implied vol value/curve/surface (using new bumpVol method as in 1),

3) recursively typing, copying member data, then constructing derived StochasticProcess1D object from scratch (using a newly defined getVol method instead of bumpVol)

My questions are

A) Which option would you choose, if any? Is there better way I'm missing?

B) Is changing object then undoing change (as in
1 above) acceptable practice? Is "getting" better than "setting"? How about making new methods friends of MCSimulation?

C) I don't see copy constructors defined in QuantLib. Why? Do default constructors perform deep copy?

Thank you,
Warren Chou
Reply | Threaded
Open this post in threaded view
|

Re: changing stochastic process object

Luigi Ballabio
On 2/3/06, Warren Chou <[hidden email]> wrote:
> I would like to bump the implied vol value/curve/surface of a derived StochasticProcess1D object.

Warren,
    apologies for the late reply.  What are you trying to do? Can you
give me a bit of context?

Thanks,
    Luigi