Login  Register

exposing FDDividendAmericanEngine to QuantLibXL

Posted by aborodya on Feb 03, 2017; 9:52am
URL: http://quantlib.414.s1.nabble.com/exposing-FDDividendAmericanEngine-to-QuantLibXL-tp18055.html

Hi,

I am trying to price instrument of American Dividend Vanilla Option and figured that even though qlDividendVanillaOption is exposed to Excel, FDDividendAmericanEngine is not. After adding
       <EnumeratedClass>
          <string>FDDA</string>
          <value>FDDA_Engine</value>
          <libraryClass>QuantLib::FDDividendAmericanEngine</libraryClass>
        </EnumeratedClass>       
to enumeratedclasses.xml and defining
    boost::shared_ptr<QuantLib::PricingEngine> FDDA_Engine(
        const boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess>& process, const long& timeSteps) {
        return boost::shared_ptr<QuantLib::PricingEngine> (
            new QuantLib::FDDividendAmericanEngine<>(process, timeSteps, timeSteps-1));
    }
in enumeratedclasses.hpp/cpp , recompiling addin and succesfuuly creating an engine in excel I'm still getting "qlInstrumentNPV - wrong engine type" error.

What did I miss - any help would be realty appreciated