Financial Measures

GS Quant allows for access to more complex market models and associated measures. These are functions which allow more intuitive slicing of various market-model based datasets. Examples of this would include:

Implied VolatilityHistorical implied volatility curve for different strikes and tenors
Normalized SkewDifference in volatility between out-of-the-money and in-the-money option (Put - call ) / ATM
Term StructureForward looking term structures of volatility or forward levels at a given point in time




Examples require an initialized GsSession and data subscription. Please refer to Sessions for details

The following example shows how to chart historical skew level for SPX:

from datetime import date
from import DataContext
from import SecurityMaster, AssetIdentifier, ExchangeCode
import matplotlib.pyplot as plt
import gs_quant.timeseries as ts

data_ctx = DataContext(start=date(2018, 1, 1), end=date(2018, 12, 31))  # Create a data context covering 2018
spx = SecurityMaster.get_asset('SPX', AssetIdentifier.TICKER, exchange_code=ExchangeCode.NYSE) # Lookup S&P 500 Index via the Security Master

with data_ctx:                                                          # Use the data context we setup
    skew = ts.skew(spx, '1m', ts.SkewReference.DELTA, 25)               # Get 25 delta skew
    skew.plot(title='SPX 25 Delta Skew')                                                              # Plot output

Should produce something like this:

Related Content