Re: Vega, rho, and theta not provided

Posted by Ferdinando M. Ametrano-2 on
URL: http://quantlib.414.s1.nabble.com/Vega-rho-and-theta-not-provided-tp16447p16450.html

If I had to do it my favorite approach would be to solve with FD the differential equation for vega, as proposed (among others) by D. Tavella and C. Randall in their "Pricing Financial Instruments: The Finite Difference Method"

To the best of my knowledge that would be state-of-the-art: efficient and numerically robust. Of course it is not a walk in the park if you are not fluent in C++ and FD, in which case bump and reprice becomes appealing

On Wed, Apr 8, 2015 at 10:31 AM, Luigi Ballabio <[hidden email]> wrote:
It looks correct (and no, you don't need to call update()).  What results do you expect? What are you getting instead?

Luigi

On Tue, Apr 7, 2015 at 9:56 PM, Alexander Lamana <[hidden email]> wrote:
Hi, I'm trying to get the Greeks for an AmericanOption. Delta and gamma are provided, but the other three are not.

I tried something like the following. It's basically what Luigi suggested in another thread (http://quantlib.10058.n7.nabble.com/Vega-and-Rho-calculation-for-European-and-American-Options-using-Finite-Difference-Method-tp7925p7928.html). 

void calculateGreeks(boost::shared_ptr<SimpleQuote> rQuote,
boost::shared_ptr<SimpleQuote> pQuote,
boost::shared_ptr<SimpleQuote> dQuote,
boost::shared_ptr<SimpleQuote> vQuote,
boost::shared_ptr<OneAssetOption> option) {

// Perturb the implied volatility to calculate vega.
const Rate v0 = vQuote->value();

// Bump it by 1%.
const Spread dv = v0 * 0.01;

vQuote->setValue(v0 + dv);
option->update();
const Real V1 = option->NPV();

vQuote->setValue(v0 - dv);
option->update();
const Real V2 = option->NPV();

const Real vega = (V1 - V2) / (2 * dv);

vQuote->setValue(v0); // Restore the original implied volatility.

// Do something similar for rho and theta...
}

Is there a better way to do this? The values I get for rho, vega, and theta don't really align with the expected results.

Also, since I'm using SimpleQuotes (and passing handles to the term structures), do I need to call update()?


Thanks,
Alex



------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users




--

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users