Code Monkey home page Code Monkey logo

Comments (14)

domokane avatar domokane commented on August 24, 2024

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

from financepy.

mattdoub avatar mattdoub commented on August 24, 2024

I would use a polynomial interpolation - ideally a SVI implementation

from financepy.

domokane avatar domokane commented on August 24, 2024

from financepy.

domokane avatar domokane commented on August 24, 2024

OK. I am looking at SVI surfaces.

from financepy.

mattdoub avatar mattdoub commented on August 24, 2024

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

from financepy.

domokane avatar domokane commented on August 24, 2024

OK. I will look at this today.

from financepy.

mattdoub avatar mattdoub commented on August 24, 2024

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?

from financepy.

domokane avatar domokane commented on August 24, 2024

from financepy.

mattdoub avatar mattdoub commented on August 24, 2024

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...

from financepy.

domokane avatar domokane commented on August 24, 2024

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.

from financepy.

domokane avatar domokane commented on August 24, 2024

I am closing this for the moment.

from financepy.

domokane avatar domokane commented on August 24, 2024

I have added an access function to get the vol called

volatilityFromStrikeDate(K, expiryDate):

from financepy.

mattdoub avatar mattdoub commented on August 24, 2024

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'

from financepy.

domokane avatar domokane commented on August 24, 2024

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.

from financepy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.