Login  Register

Re: 答复: Binomial American Options with Discrete Dividends & Greeks

Posted by jamesquant on Mar 10, 2016; 12:26pm
URL: http://quantlib.414.s1.nabble.com/Binomial-American-Options-with-Discrete-Dividends-Greeks-tp17012p17343.html

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?

Please note I am trying to get this solution to work for European Options now only, not American options.

Best Regards,
James