|
From: Joseph W. <jo...@gn...> - 2007-03-08 17:21:42
|
Thanks to everyone that sent me code and pointers. I did a backward compatible refactoring of the basket option code that makes it relatively easy to add new types of basket options. Instead of using a enum to define the basket option, the code now allows you to subclass BasketOptionType which contains code on how to calculate the price of that option. There are now AverageBasketOptionType, MinBasketOptionType, and MaxBasketOptionType, and by moving the option calculation code out of the engines, any new basket options can be calculated automatically by the monte carlo code. I'm now in the process of putting together some swig wrappers for all of this. I do have a question about StochasticProcessArray. Right now you have to define a vector of StochasticProcesses and then put that into the constructor of the array. Would it be better to add a "push_back" method to the StochasticProcessArray so that you create an array object and then insert processes to it? -- ------------------------------------------------------------------------------- Joseph Wang Ph.D. - jo...@gn... China Derivatives Researcher and Software Developer - QuantLib http://en.wikiversity.org/wiki/User:Roadrunner |