Advanced Realized Volatility and Quarticity

Volatility estimators are especially valuable in modelling financial returns and capturing time-variability of financial series. The ongoing $100k Optiver Realized Volatility Prediction Competition on Kaggle has further sparked interest in the research of high-frequency data and revitalized the interest in the field.

In the following articles we introduced time-series data and realized volatility as well as financial returns.

Nevertheless, there are other significant features that we can obtain from price data. We discuss additional metrics of volatility and measures of integrated quarticity in this article. Besides, we implement the estimators in Pandas, NumPy and SciPy in Python.

Quarticity and Realized Volatility

The libraries that we are using in the implementation of the maths formulas are

from scipy.special import gamma
import numpy as np
import pandas as pd

Furthermore, we estimate additional volatility estimators that we build upon realized quarticity, realized quad-power quarticity and realized tri-power quarticity.

The realized fourth-power variation or realized quarticity is a consistent estimator of the integrated quarticity

A more robust estimator, particularly in the presence of jumps, is the realized quad-power quarticity

Similarly robust estimator is also the realized tri-power quarticity

In python an implementation looks as following

def realized_quarticity(series):
    return np.sum(series**4)*series.shape[0]/3
df.groupby(df.index.date).agg(realized_quarticity)
def realized_quadpower_quarticity(series):
    series = abs(series.rolling(window=4).apply(np.product, raw=True))
    return (np.sum(series) * series.shape[0] * (np.pi**2))/4
df.groupby(df.index.date).agg(realized_quadpower_quarticity)
def realized_tripower_quarticity(series):
    series = series ** (4/3)
    series = abs(series).rolling(window=3).apply(np.prod, raw=True)
    return series.shape[0]*0.25*((gamma(1/2)**3)/(gamma(7/6)**3))*np.sum(series)
df.groupby(df.index.date).agg(realized_quadpower_quarticity)

Moreover, these estimates assist in estimation of three additional realized volatility estimators:

def realized_1(series):
    return np.sqrt(np.sum(series**4)/(6*np.sum(series**2)))
df.groupby(df.index.date).agg(realized_1)
def realized_2(series):
    return np.sqrt(((np.pi**2)*np.sum(abs(series.rolling(window=4).apply(np.product, raw=True))))/(8*np.sum(series**2)))
df.groupby(df.index.date).agg(realized_2)
def realized_3(series):
    numerator = (gamma(1/2)**3)*np.sum((abs(series)**(4/3)).rolling(window=3).apply(np.prod))
    denominator = 8 * (gamma(7/6)**3)*np.sum(series**2)
    return np.sqrt(numerator/denominator)
df.groupby(df.index.date).agg(realized_3)

Further Ideas to explore

Corsi et al. (2008) research paper suggests that we can optimize our strategy by taking into account residuals from GARCH model. In particular, they demonstrate that the residuals of the commonly used time–series models for realized volatility exhibit non–Gaussian properties and volatility clustering. To accommodate these properties, authors extend models for realized volatility by replacing the Gaussian with the more flexible normal inverse Gaussian (NIG) distribution to allow for fat–tails and skewness.

From this paper we also reference the idea of less well-known time-series model, auto-regressive fractionally integrated moving average (ARFIMA), which they claimed in 2005 was a promising strategy for modeling and predicting volatility.

Additionally, we might include current and lagged variables as proxies for the information arrival process which potentially can add insight on future volatility.

Finally, we can explicitly separate quadratic variation into continuous and jump components in order to increase the robustness.

References


You can contact me for professional inquires via my social media:

Leave a comment