Posted by
Bai, Yun on
URL: http://quantlib.414.s1.nabble.com/Can-CRR-model-valuate-options-on-stocks-with-discrete-dividend-schedule-tp595.html
Following examples\EquityOption\EquityOption.cpp, I tried to value an
american option on underly that has discrete dividend schedule by simply
changing the EuropeanOption to DividendVanillaOption:
DividendVanillaOption(stochProcess, payoff, exercise, dividendDates,
dividendAmount, engine)
Where
stochProcess is Black ScholesMertonProcess, engine is CoxRossRubinstern,
payoff is standard american payoff, div amount and dates are preset
vectors:
boost::shared_ptr<PricingEngine> engine(
new BinomialVanillaEngine<CoxRossRubinstein>(timesteps)
);
boost::shared_ptr<StochasticProcess> stochProcess(new
BlackScholesMertonProcess(Handle<Quote>(spot),
Handle<YieldTermStructure>(qTS),
Handle<YieldTermStructure>(rTS),
Handle<BlackVolTermStructure>(volTS))
);
boost::shared_ptr<StrikedTypePayoff> payoff(new
PlainVanillaPayoff(call_or_put, K));
Date settlementDate = today; // assume this option is exercisable
from today.
boost::shared_ptr<Exercise> exercise( new
AmericanExercise(settlementDate, maturity));
However during runtime, exceptions pops up from
DividendVanillaOption::setupArguments, telling me "wrong engine type".
Can someone tell me whether DividendVanillaOption can be used along with
CRR model binomial engine?
Thank you
Yun
-------------- next part --------------
An HTML attachment was scrubbed...
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users