The volatility of a financial asset, usually measured in terms of the standard deviation of its daily returns, is an important input to many problems in finance, including risk management and option pricing. It also plays an important role in the regulation of financial institutions, because it is an ingredient in the risk measures — Value at Risk and expected shortfall — that financial institutions have to report to regulators for the purpose of determining capital requirements.
To determine the volatility, it is typically not sufficient to collect a sample of daily returns over a long period of time and compute its sample standard deviation. The reason is that the volatility tends to change over time, a feature known as volatility clustering. This term refers to the phenomenon that financial markets tend to alternate between periods of financial turmoil, and relatively calmer periods. Computing the standard deviation over a long time series would average these out. Alas, shortening the sample period is not a solution to this problem, as this would result in a less precise estimate. A proper solution requires an econometric model.
Different modeling frameworks for asset volatilities have been proposed in the literature. The workhorse model that is most widely employed is the ARCH (autoregressive conditional heteroskedasticity) model of Engle (Econometrica 1982) and its various extensions. The key insight is that the presence of volatility clustering implies that large (in absolute value) returns will tend to be followed by large (in absolute values) returns, and small returns by small returns. The basic idea of the model, then, is to model the unobserved volatility of an asset as an affine function of the squares of the returns of the past few days. This leads to the ARCH(q) model, in which the past q returns enter the calculation. The various extension of the model expand on this basic idea; for example, in the GARCH(p, q) model of Bollerslev (Journal of Econometrics 1986), the past p values of the squared volatility enter the calculation as well.
Volatility clustering is but one of the so-called stylized facts pertinent to daily asset returns. A second one is known as the (statistical) leverage effect, which describes the observation that large negative returns tend to have a greater impact on future volatility than do large positive returns. The leverage effect can be accounted for by incorporating asymmetries into the basic ARCH or GARCH models, as is done in the TGARCH(o, p, q) model of Glosten et al. (Journal of Finance 1993) and the EGARCH(o, p, q) model of Nelson (Econometrica 1991). A third common observation is that the empirical distribution of asset returns tends not to resemble a Gaussian distribution; rather, returns exhibit a feature known has heavy tails, implying that extreme events tend to occur more frequently than would be predicted by a Gaussian distribution. This, too, can be incorporated in the model. Other stylized facts relate to the co-movement of several assets. One of these is known as correlation breakdown. This describes the fact that the correlation between the returns of two assets tends to increase in times of financial turmoil, potentially negating the benefits of portfolio diversification. Modelling such effects requires multivariate extensions of the model.
The main research objective of this project was to produce an implementation for the Julia language. Julia is a relatively young open source project started at MIT. It promises to combine the ease of use and productivity of high-level languages, such as those mentioned above, with the speed of execution of compiled low-level languages such as C++. Indeed, Julia typically performs well within a factor of 2 of the equivalent C++ code.
The result of the project has been released as ARCHModels.jl an MIT-licensed Julia package that implements estimation, inference, simulation, Value at Risk forecasting, and diagnostic testing for a range of univariate and multivariate ARCH-type models.