Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FinEquityVolSurface #63

Closed
mattdoub opened this issue Jan 11, 2021 · 14 comments
Closed

FinEquityVolSurface #63

mattdoub opened this issue Jan 11, 2021 · 14 comments

Comments

@mattdoub
Copy link

Hi,

Would it be possible to extend the FinEquityVolCurve class into a Surface:
User Inputs (for S&P 500 on 11 Jan 2021)

  • value Date (ex: FindDate(2021,1,11) )
  • Array of Expires (ex: [FindDate(2021,2,11), FindDate(2021,3,11), FindDate(2021,4,11), FindDate(2021,7,11), FindDate(2021,10,11), FindDate(2022,1,11), FindDate(2023,1,11)])
  • Array of Strikes (ex: [3037 3418 3608 3703 3798 3893 3988 4178 4557])
  • Array of Vols (ex: [42.94 31.30 25.88 22.94 19.72 16.90 15.31 17.54 25.67,
    37.01 28.25 24.19 21.93 19.57 17.45 15.89 15.34 21.15,
    34.68 27.38 23.82 21.85 19.83 17.98 16.52 15.31 18.94,
    31.41 26.25 23.51 22.05 20.61 19.25 18.03 16.01 15.90,
    29.91 25.58 23.21 22.01 20.83 19.70 18.62 16.63 14.94,
    29.26 25.24 23.03 21.91 20.81 19.73 18.69 16.76 14.63,
    27.59 24.33 22.72 21.93 21.17 20.43 19.71 18.36 16.26] )

This would return a VolSurface object. The volatility method would also be extended to take as input a strike and expiry date.

@domokane
Copy link
Owner

Sure. Do you have a view on the strike interpolation scheme ? SABR or polynomial or other ?

@mattdoub
Copy link
Author

I would use a polynomial interpolation - ideally a SVI implementation

@domokane
Copy link
Owner

domokane commented Jan 11, 2021 via email

@domokane
Copy link
Owner

OK. I am looking at SVI surfaces.

@mattdoub
Copy link
Author

Section 5.1 of the below article describes a fast and robust implementation of the SVI algorithm:
https://zeliade.com/wp-content/uploads/whitepapers/zwp-008-RobustNoArbSSVI.pdf

First the "Slices" are calibrated producing a set of parameters for each expiry/curve provided as input.

Then section 7.2 and 7.3 describes how to interpolate (or extrapolate) for any expiry using the previously calibrated parameters.

This jupyter notebook describes well the parametrisation: (The first section can be dismissed as implied vols are given as input in our case and not derived from option prices).
http://www.cmap.polytechnique.fr/~demarco/files/calibrationParis6/TP_M2_probFin_implied_vol_parametrisation_solutions.ipynb

@domokane
Copy link
Owner

OK. I will look at this today.

@mattdoub
Copy link
Author

mattdoub commented Jan 12, 2021

SSVI would be polynomial in delta.
SSVI is often used with Listed Option prices as input in the literature which requires a first step to imply the Black-Scholes vols from the prices before then moving to the SSVI polynomial fit.
In this case the vols are given as input so first step is not necessary here.

Further useful resources may be found here:
https://wwwf.imperial.ac.uk/~ajacquie/IC_AMDP/IC_AMDP_Docs/Code/SSVI.pdf

Also happy to take a look at SABR. Is it already available in a VolSurface Class method?

@domokane
Copy link
Owner

domokane commented Jan 12, 2021 via email

@mattdoub
Copy link
Author

SABR is in the SABR class (shifted and basic) under models. I have just used it in FinFXVolSurfacePlus under market->volatility and I am about to use it again for swaptions. On 12/01/2021 08:42, mattdoub wrote: Cool. SSVI would be polynomial in delta. SSVI is often used with Listed Option prices as input in the literature which requires a first step to imply the Black-Scholes vols from the prices before then moving to the SSVI polynomial fit. In this case the vols are given as input so first step is not necessary here. Further useful resources may be found here: https://wwwf.imperial.ac.uk/~ajacquie/IC_AMDP/IC_AMDP_Docs/Code/SSVI.pdf Also happy to take a look at SABR. Is it already available in a VolSurface Class method? — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#63 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJ73PK5JXOZZMUNTJEMVWTSZP4PJANCNFSM4V5MI4BA.

Apols meant SSVI polynomia in strike not delta...

@domokane
Copy link
Owner

Just checked in FinEquityVolatilitySurface. It uses Gatheral's SVI to fit the data you provided. See the test case TestFinEquityVolatilitySurface. I will look at SSVI over the next few days. It's already coded up but not yet wired in.

@domokane
Copy link
Owner

I am closing this for the moment.

@domokane
Copy link
Owner

I have added an access function to get the vol called

volatilityFromStrikeDate(K, expiryDate):

@mattdoub
Copy link
Author

Looks v good indeed, and it fits well! ;)

Just noticed a tiny bug:
once the curve is calibrated, if you want to see the object in the console it returns an error:
'FinEquityVolSurface' object has no attribute '_atmMethod'

@domokane
Copy link
Owner

domokane commented Jan 15, 2021

Fixed.

BTW I don't know if I got lucky with the fit as it is unconstrained. I need to build in constraints and no-arb checks. I seeded the longer expiry date fits with the SVI parameters from the previous expiry date which helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants