Re: 答复: Binomial American Options with Discrete Dividends & Greeks
Posted by
Luigi Ballabio on
Mar 16, 2016; 3:21pm
URL: http://quantlib.414.s1.nabble.com/Binomial-American-Options-with-Discrete-Dividends-Greeks-tp17012p17347.html
Hello,
I don't think
QL.NET provides intraday pricing (given that QuantLib itself only did in the latest release, and as an optional feature) so setting the time back one hour won't work. One thing you can try:
if you have the price, delta and gamma (that is, P, dP/du and d^2P/du^2) you might plug them in the Black-Scholes equation and get dP/dt (i.e., the theta).
Luigi
Hi Luigi,
Your solution worked well of bumping the data to calculate the greeks apart
from theta, the issue is I was +1 day however when expiry was tomorrow then
it would hit the expiry date and crash.
// perturb date and get theta
Settings.setEvaluationDate(pToday.InnerDateTime.AddHours(1));
value_p = option.NPV();
Settings.setEvaluationDate(pToday);
res[3, 0] = pHeaders ? "Theta" : res[3, 0] = value_p -
option.NPV();
if (pHeaders) res[3, 1] = value_p - option.NPV();
I then tried to plus +1 hour but this wasnt successful, because even with 1
hour before expiry then same issue would happen,
Is the answer to Theta to use a closed formula instead of bumping the data?
or is there a better way to manage the datetime issue in QLNET?
Best Regards,
James
--
View this message in context: http://quantlib.10058.n7.nabble.com/Binomial-American-Options-with-Discrete-Dividends-Greeks-tp17012p17343.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev