## Periodic Reporting for period 1 - juliaeconometrics (Developing a Financial Econometrics Package for the Julia Programming Language)

Periodo di rendicontazione: 2018-03-01 al 2020-02-29

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.

The training goals of the project (improved coding skills, writing library level code, writing documentation, using git, grant management, interdisciplinary communication skills) have been achieved by training through research. In addition, the researcher has taken the D.A.S. in Data Science program offered by ETH Zurich to study machine learning methods, which he believes to be the ""next big thing"" in volatility modelling."

Another benefit of the fact that ARCHModels.jl is entirely written in a high-level language is that it makes it easy for scientists doing research on ARCH-type models to implement their desired extensions. It would be a major burden to many researchers if the core of the package were written in C++. Researchers enjoy easy access to the source code of the package, as it is released under an open-source license and hosted on Github.

With open-source software being an important pillar of open science, we hope that the availability of ARCHModels.jl will draw more researchers in the field away from commercial software (Matlab being the standard at the moment), to free and open-source Julia. Speaking more broadly, the availability of a mature and comprehensive package ecosystem is an important factor in the continued growth of Julia’s user base in general. Hopefully ARCHModels.jl can be a small part of that.