You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Research code for functional GARCH and functional GAS-GARCH models applied to intraday volatility surfaces. The models treat within-day return curves as functional observations, extending classical GARCH/GAS dynamics to function space ($L^2[0,1]$).
Theory
Setting
Let ${r_t(u) : u \in [0,1]}_{t=1}^T$ denote a sequence of intraday log-return curves across $T$ trading days, where $u$ indexes the normalized time within a day ($u = 0$ at market open, $u = 1$ at market close).
The conditional variance curve on day $t$ given the past filtration $\mathcal{F}_{t-1}$ is defined as the functional object $\sigma_t^2(\cdot) \in L^2[0,1]$.
Functional GARCH(p,q)
Following Cerovecki et al. (2018), the model specifies:
$$y_t = \sigma_t \eta_t, \qquad (\eta_t) \text{ is an iid innovation process on } L^2[0,1] \text{ with } \mathbb{E}[\eta_t(u)] = 0, \ \mathbb{E}[\eta_t^2(u)] = 1$$
A unique strictly stationary, non-anticipative solution exists if the top Lyapunov exponent of the companion operator sequence satisfies $\gamma < 0$. For a GARCH(1,1) process, this reduces to:
Note: The current implementation (loss_func in garch.py) uses a Bernstein-projected MSE approximation rather than the formal QMLE criterion. The inner products are evaluated via sample means on a uniform grid of $N$ points, optimized using scipy.optimize (SLSQP).
Functional GAS-GARCH
The Generalized Autoregressive Score (GAS) extension maps the infinite-dimensional update to a score-driven recursion on a low-dimensional cubic B-spline coefficient vector $b_t$.
Let $\Phi(u) = (\phi_1(u), \ldots, \phi_M(u))^\top$ be the B-spline basis. The log-volatility curve is parameterized as:
$$\log \sigma_t(u) = \Phi(u)^\top b_t$$
The coefficients evolve via the GAS recursion:
$$b_t = \omega + B,b_{t-1} + A,s_{t-1}$$
Likelihood & Score
Evaluated on a discrete grid $u_1, \dots, u_N$, the return vector $r_t \in \mathbb{R}^N$ is modeled as a multivariate Student-$t$ distribution with $\nu$ degrees of freedom and an Ornstein-Uhlenbeck covariance kernel $\Lambda_\delta$ ($[\Lambda_\delta]_{ij} = \exp(-|u_i - u_j|/\delta)$):
Let $\tilde{r}_t = S_t^{-1} r_t$ be the standardized returns, and $A_1 = 1 + \tilde{r}t^\top \Lambda\delta^{-1} \tilde{r}t,/,\nu$. The analytic score $s_t = \nabla{b_t} \log p(r_t | b_t)$ evaluates to:
where $\Phi$ is the $(M \times N)$ basis matrix and $\odot$ denotes the Hadamard product.
Repository Layout
About
Research code for functional GAS and functional GARCH models for volatility surface estimation and forecasting, including scalable estimation methods and empirical applications to high-frequency financial data.