# MicrostructureNoise

## Overview

MicrostructureNoise is a Julia package for Bayesian volatility estimation in presence of market microstructure noise.

## Installation

To install, run:

```
Pkg.add("MicrostructureNoise")
```

## Description

MicrostructureNoise estimates the volatility function of the stochastic differential equation

from noisy observations of its solution

where denote unobservable stochastic disturbances. The method is minimalistic in its assumptions on the volatility function, which in particular can itself be a stochastic process.

The estimation methodology is intuitive to understand, given that its ingredients are well-known statistical techniques. The posterior inference is performed via the Gibbs sampler, with the Forward Filtering Backward Simulation algorithm used to reconstruct unobservable states . This relies on the Kalman filter. The unknown squared volatility function is a priori modelled as piecewise constant and is assigned the inverse Gamma Markov chain prior, which induces smoothing among adjacent pieces of the function. The picture below gives an idea of the results obtainable with the method. Depicted is a reconstruction of the volatility function from the synthetic data generated according to the classical Heston stochastic volatility model (the unobserved true volatility curve is plotted in red). Note that next to the point estimate (posterior mean plotted in black), the method conducts automatic uncertainty quantification via the marginal Bayesian credible band (plotted in blue).

When is observed without noise, an option (`fixeta`

) allows to perfom inference as described in the reference "Nonparametric Bayesian volatility estimation".

## Documentation

See https://mschauer.github.io/MicrostructureNoise.jl/latest.

## Contribute

See issue #1 (Roadmap/Contribution) for questions and coordination of the development.

## References

Shota Gugushvili, Frank van der Meulen, Moritz Schauer, and Peter Spreij: Nonparametric Bayesian volatility estimation. arxiv:1801.09956, *Brazilian Journal of Probability*, to appear, 2020.

Shota Gugushvili, Frank van der Meulen, Moritz Schauer, and Peter Spreij: Nonparametric Bayesian volatility learning under microstructure noise. arxiv:1805.05606, 2018.

A. T. Cemgil and O. Dikmen: Conjugate gamma Markov random fields for modelling nonstationary sources. In ICA 2007, 7th International Conference on Independent Component Analysis and Signal Separation, September 2007.