|
From: Rahul G. <rah...@mo...> - 2008-09-23 10:17:44
|
I've now been through this in detail, and here are my results. I assumed that the Heston engine implementation broke QLA, whereas in fact, it is the Heston process. I removed the engine (still broken), the model (still broken), and the process (still broken) in that order. The strange thing was that even having removed all of my code, the same error persisted. As such, I took a fresh code base, and implemented: 1a) Heston Process as definition in processes.*pp OR 1b) Heston Process as a totally separate class (hestonprocess.*pp) 1a - edited processes.xml, added QuantLib::YieldTermStructure to types.xml (libraryClass) 1b - edited categories.xml, added hestonprocess.xml, added QuantLib::YieldTermStructure to types.xml (libraryClass) And then as per usual, generate files, add to project, compile. The result of both approaches was the same: qlPricingEngine - Error retrieving Enumeration from Registry - the type 'class boost::shared_ptr<class QuantLib::PricingEngine> (__cdecl*)(class boost::shared_ptr<class QuantLib::GeneralizedBlackScholesProcess> const &)' is not available! Any ideas? Eric Ehlers-2 wrote: > > Hi Rahul, > > On Thu, August 14, 2008 12:38, Rahul Gupta wrote: >> Eric, >> >> Thank you for such a thorough reply. > > Happy to help. > >> I should first clarify the following issues: >> >> 1) I was explicitly providing a null, I merely didn't type it correctly. >> 2) > The boosts issue is again a testament to my typing skills. > > That makes more sense. > >> Now with regards to the engine. I believe that I may have taken an > excessively complex route towards adding an engine. My terminal goal is > to > expose Analytic and MC heston engines. Assuming I strip my code, would > this > be the best way to add the engines? >> >> 1) Provide a type in enumeratedclasses.xml - Analytic = without >> timesteps, MC = with timesteps [in terms of type] (say, AHE and MCHE) 2) >> Add > a similar definition in pricingengines.xml/cpp/hpp to what I have already > done in my own files. > > I have just reviewed the code in more detail, it's slightly more > complicated. > Pricing engines come in 2 flavors: > > 1) Full fledged objects > 2) Enumerated classes > 2a) Without timesteps > 2b) With timesteps > > DiscountingSwapEngine is an example of 1): > - Class QuantLibAddin::DiscountingSwapEngine is implemented in files > QuantLibAddin\qlo\pricingengines.*pp > - Function qlDiscountingSwapEngine() is configured in file > QuantLibAddin\gensrc\metadata\functions\pricingengines.xml > > AnalyticEuropeanEngine is an example of 2a): > - Function AE_Engine() is implemented in files > QuantLibAddin\qlo\enumerations\constructors\enumeratedclasses.*pp > - Enumeration AE is configured in file > QuantLibAddin\gensrc\metadata\enumerations\enumeratedclasses.xml > > Note that in the case of 2) no QuantLibAddin class is implemented. > > Your new classes would need to follow one approach or the other. The > differences between the two approaches should be fairly clear: > > 1) Fully fledged stateful object which can be instantiated in its own > cell, serialized, etc. No restrictions on the signature of the > constructor. > > 2) Enumeration, exists only as a transient object which cannot be > directly > accessed by the user, must conform to one of the two available > constructor signatures (2a or 2b). > > Before starting on this I would first identify the cause of the "class xxx > is > not available" error. As mentioned I can't see anything in your > description > of your initial changes which would have caused that error and you should > get > to the bottom of that before proceeding. > > Please let me know how it goes. Maybe when this is done there will be > some > code to contribute back to the project, and perhaps a new section on > enumerations in the "Extending QuantLibXL" tutorial? > > Regards, > Eric > > ------------------------- > Eric Ehlers > nazcatech sprl | Brussels | http://www.nazcatech.be > Distributed computing for pricing analytics - Use Microsoft Excel as a > client > to the Grid > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- View this message in context: http://www.nabble.com/Exposure-Issues-tp18941365p19624804.html Sent from the quantlib-dev mailing list archive at Nabble.com. |