Fix latex in Stochastic Volatility Tutorial
"\n",
"We'll next fit a stochastic volatility model.\n",
"Let's begin with a constant volatility model where log price $p$ follows Brownian motion\n",
+ "\n",
"$$\n",
" \\log p_t = \\log p_{t-1} + w_t \\sqrt h\n",
"$$\n",
+ "\n",
"where $w_t$ is a sequence of standard white noise. We can rewrite this model in terms of the log returns $r_t=\\log(p_t\\,/\\,p_{t-1})$:\n",
+ "\n",
"$$\n",
" r_t = w_t \\sqrt h\n",
"$$\n",
+ "\n",
"Now to account for [volatility clustering](https://en.wikipedia.org/wiki/Volatility_clustering) we can generalize to a stochastic volatility model where volatility $h$ depends on time $t$. Among the simplest such models is one where $h_t$ follows geometric Brownian motion\n",
+ "\n",
"$$\n",
" \\log h_t = \\log h_{t-1} + \\sigma v_t\n",
"$$\n",
+ "\n",
"where again $v_t$ is a sequence of standard white noise. The entire model thus consists of a geometric Brownian motion $h_t$ that determines the diffusion rate of another geometric Brownian motion $p_t$:\n",
+ "\n",
"$$\n",
" \\log h_t = \\log h_{t-1} + \\sigma v_t \\\\\n",
" \\log p_t = \\log p_{t-1} + w_t \\sqrt h_t\n",
"$$\n",
+ "\n",
"Usually $v_1$ and $w_t$ are both Gaussian. We will generalize to a Stable distribution for $w_t$, learning three parameters (stability, skew, and location), but still scaling by $\\sqrt h_t$.\n",
"\n",
"Our Pyro model will sample the increments $v_t$ and record the computation of $\\log h_t$ via [pyro.deterministic](http://docs.pyro.ai/en/stable/primitives.html#pyro.deterministic). Note that there are many ways of implementing this model in Pyro, and geometry can vary depending on implementation. The following version seems to have good geometry, when combined with reparameterizers."
"source": [
"Observe that volatility roughly follows areas of large absolute log returns. Note that the uncertainty is underestimated, since we have used an approximate `AutoDiagonalNormal` guide. For more precise uncertainty estimates, one could use [HMC](http://docs.pyro.ai/en/stable/mcmc.html#hmc) or [NUTS](http://docs.pyro.ai/en/stable/mcmc.html#nuts) inference."
]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
}
],
"metadata": {
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.2"
+ "version": "3.6.8"
}
},
"nbformat": 4,
