|
From: Rahul G. <rah...@mo...> - 2008-08-12 10:14:49
|
My aim has been to expose the Heston process, model, and analytic engine to
QuantLibXL.
For the process/model, I simply followed the guide, and it worked fine.
However for the analytic engine, the approach I took was to inherit from the
pricingengine class. I did this as follows:
analytichestonengine.hpp:
namespace QuantLibAddin {
//class AnalyticHestonEngine : public
ObjectHandler::LibraryObject<QuantLib::PricingEngine> {
class AnalyticHestonEngine : public QuantLibAddin::PricingEngine {
public:
AnalyticHestonEngine(
const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
const boost::shared_ptr<QuantLib::HestonModel> &model,
double integrationOrder, bool permanent);
};
}
analytichestonengine.cpp:
namespace QuantLibAddin {
AnalyticHestonEngine::AnalyticHestonEngine(
const boost::shared_ptr<ObjectHandler::ValueObject> &properties,
const boost::shared_ptr<QuantLib::HestonModel> &model,
double integrationOrder, bool permanent)
: QuantLibAddin::PricingEngine(properties, permanent) {
libraryObject_ = boost::shared_ptr<QuantLib::PricingEngine>(
new QuantLib::AnalyticHestonEngine(model, (int)integrationOrder));
}
}
Unfortunately, whilst this works fine, I appear to have broken the core
functionality.
When I try to instantiate a qlPricingEngine("AE",B30), i.e. a
GeneralizedBlackScholesEngine, I get #NUM, and the following error from
ohRetrieveError():
qlPricingEngine - Error retrieving Enumeration from Registry - the type
'class boost::shared_ptr<class QuantLib::PricingEngine> (__cdecl*)(class
boosts::shared_ptr<class QuantLib::GeneralizedBlackScholesProcess> const &)'
is not available!
I would really appreciate any input, as i'm kinda stuck.
Thanks!
--
View this message in context: http://www.nabble.com/Exposure-Issues-tp18941365p18941365.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|