ynouri / pysabr

SABR model Python implementation
MIT License
454 stars 78 forks source link

Ynour - SABR shifted beta calibration #10

Open kiann00 opened 1 year ago

kiann00 commented 1 year ago

wow, Ynouri, stumbled upon this little github python a week ago. Amazing code and project, and very useful!

I gave it a quick test, and was wondering for 2 issues

  1. Are we able to include 'beta' in the calibration?
  2. And the local minima/solution seems to go off-base (to the original parameters). I do a snapshot of the original, and fitted, parameters. While in both case, the (lognormal) vol-smile is recovered, the 'rho' and 'volvol' goes 'crazy'. Not sure what can be done...

![Uploading GitHub_SABR.JPG…]()

ynouri commented 1 year ago

Glad this is useful! I'm not actively developing this project right now, but feel free to submit a pull request if you have ideas on how to improve the calibration.

kiann00 commented 1 year ago

sure. By the way, I browsed through your code, and I hope I did not read it wrong, but it seems

  1. You force the 'trade' set-up to always enter the vol input quote as Black-Normal. Is this correct?
  2. Because I see the arguments are : sabr_ln = Hagan2002LognormalSABR(f/100, shift/100, t, v_atm_n/1e4, beta, rho, volvol)

Is there a particular way, where, (for the SABR lognormal version), I enter the ATM lognormal vols rather than Normal vols? I know the Swaption market quotes Normal vols (which is probably why), but if I try to use your model to play with SPX options and FX Options, one would need to use a function to convert Lognormal vols into Normal Vols. Though, I guess, the naive = Normal Vols (ATM) = Forward * LogNormal-Vols (ATM)

Kind regards Kian

On Mon, Nov 28, 2022 at 10:45 PM Yacine @.***> wrote:

Glad this is useful! I'm not actively developing this project right now, but feel free to submit a pull request if you have ideas on how to improve the calibration.

— Reply to this email directly, view it on GitHub https://github.com/ynouri/pysabr/issues/10#issuecomment-1329230669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLPMKKUS4TATP3VSFWK5PDWKTASNANCNFSM6AAAAAASJ7VXWI . You are receiving this because you authored the thread.Message ID: @.***>