From: Warren C. <war...@al...> - 2006-02-03 21:47:16
|
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 |