Quantcast

Calculating greeks for a quanto vanilla option with Quantlib

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Calculating greeks for a quanto vanilla option with Quantlib

Pedro Milet

Hello all,

 

I recently started using quantlib and I’m trying to calculate values for a quanto vanilla option (price, delta, vegas w.r.t to volatilities of asset and of fx rate, etc) – I could not find much information about quantlib quanto classes online.

 

I’m using a SWIG compilation of quantlib with C#. I instantiated a QuantoVanillaOption class together with a QuantoEuropeanEngine on a GeneralizedBlackScholesProcess. It yields the correct price with the .NPV() method, however I cannot get it to calculate the normal greeks (.vega(), .delta(), .gamma(), .dividendrho()) – it throws an exception; only q-greeks – namely qrho, qvega, qlambda – calculate without exception, although I confess I don’t know exactly that they are (are they rho and vega with respect to the foreign rate and foreign vol?).

 

What am I doing wrong? How can I calculate the normal greeks for a quanto vanilla option with quantlib?

 

Many thanks,

Pedro Milet

 

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Calculating greeks for a quanto vanilla option with Quantlib

Luigi Ballabio
Hello Pedro,
    apologies for the delay.  The other greeks should be calculated as well.  May you send a self-contained program that reproduces the problem?

As a workaround, in the meantime, you can calculate greeks numerically by bumping the inputs and repricing as in <https://youtu.be/MgUlBB59Ll0>.

Later,
    Luigi


On Tue, Oct 18, 2016 at 10:54 PM Pedro Milet <[hidden email]> wrote:

Hello all,

 

I recently started using quantlib and I’m trying to calculate values for a quanto vanilla option (price, delta, vegas w.r.t to volatilities of asset and of fx rate, etc) – I could not find much information about quantlib quanto classes online.

 

I’m using a SWIG compilation of quantlib with C#. I instantiated a QuantoVanillaOption class together with a QuantoEuropeanEngine on a GeneralizedBlackScholesProcess. It yields the correct price with the .NPV() method, however I cannot get it to calculate the normal greeks (.vega(), .delta(), .gamma(), .dividendrho()) – it throws an exception; only q-greeks – namely qrho, qvega, qlambda – calculate without exception, although I confess I don’t know exactly that they are (are they rho and vega with respect to the foreign rate and foreign vol?).

 

What am I doing wrong? How can I calculate the normal greeks for a quanto vanilla option with quantlib?

 

Many thanks,

Pedro Milet

 

 

 

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RES: Calculating greeks for a quanto vanilla option with Quantlib

Pedro Milet

Hello Luigi,

 

Thank you for your reply.

 

I ended up calculating the greeks numerically as you suggested.

Based on your reply, I’m guessing it has to do with the particular SWIG compilation I’m using. I don’t have time to look into that right now, but the numerical greeks do fulfill my current needs.

 

Thanks again for your help,

 

 

http://portal-rs.xpi.com.br/email/logo-assinatura.gif

Pedro Milet
XP Investimentos

(11) 3526-0169 | www.xpi.com.br

 

Rio de Janeiro | RJ
Praia de Botafogo, 501

Sala 601 – A1 

Bloco Pao de açucar
CEP: 22250-040

São Paulo | SP
Av. Brigadeiro Faria Lima, 3600 | 10° andar
CEP: 04538-132

Miami | FL
701 Brickell Ave. | Suite 2150
Downtown | 33131

New York | NY
5 Bryant Park. | 1065 Avenue of the Americas. | 29th Floor | 10018

 

 

 

 

 

Acompanhe a XP no Facebook

Acompanhe a XP no Twitter

http://portal-rs.xpi.com.br/email/icone-linkedin.gif

Veja o instagram da XP

Veja o youtube da XP

 

 

 

De: Luigi Ballabio [mailto:[hidden email]]
Enviada em: quinta-feira, 10 de novembro de 2016 14:05
Para: Pedro Milet <[hidden email]>; [hidden email]
Assunto: Re: [Quantlib-users] Calculating greeks for a quanto vanilla option with Quantlib

 

Hello Pedro,

    apologies for the delay.  The other greeks should be calculated as well.  May you send a self-contained program that reproduces the problem?

 

As a workaround, in the meantime, you can calculate greeks numerically by bumping the inputs and repricing as in <https://youtu.be/MgUlBB59Ll0>.

 

Later,

    Luigi

 

 

On Tue, Oct 18, 2016 at 10:54 PM Pedro Milet <[hidden email]> wrote:

Hello all,

 

I recently started using quantlib and I’m trying to calculate values for a quanto vanilla option (price, delta, vegas w.r.t to volatilities of asset and of fx rate, etc) – I could not find much information about quantlib quanto classes online.

 

I’m using a SWIG compilation of quantlib with C#. I instantiated a QuantoVanillaOption class together with a QuantoEuropeanEngine on a GeneralizedBlackScholesProcess. It yields the correct price with the .NPV() method, however I cannot get it to calculate the normal greeks (.vega(), .delta(), .gamma(), .dividendrho()) – it throws an exception; only q-greeks – namely qrho, qvega, qlambda – calculate without exception, although I confess I don’t know exactly that they are (are they rho and vega with respect to the foreign rate and foreign vol?).

 

What am I doing wrong? How can I calculate the normal greeks for a quanto vanilla option with quantlib?

 

Many thanks,

Pedro Milet

 

 

 

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...