I was looking at the stochastic volatility example. I mentioned some arguments like dims="time"
, which is not explained in the api doc. I wonder if there is a full list of kwargs i can refer to and some detailed usage of those? Also I wonder what init_dist
is supposed to do in these models. Thanks for your help!
Dims aren’t unique to timeseries, they’re a way to organize you data and make your code more readable. See here for a full explanation.
init_dist
gives the initial conditions for the recursive relationship. For example, in the stochastic volatility model, the variance of the time series follows a Gaussian random walk, so we write the model as:
\begin{align} \sigma_{t+1} &= \sigma_t + \eta_t, \quad \eta_t \sim N(0, \sigma_{\eta}) \\ r_t &\sim T(0, \sigma_t, \nu)\end{align}
This model isn’t closed because you need to tell me what \sigma_0 is. In our case it’s a parameter to estimate, so we need to specify \sigma_0 \sim f(\cdot) where f(\cdot) is the init_dist
.
Say if I want to fit a series of equity prices using pymc.EulerMaruyama
. Could I Specify the initial S_0 to be some fixed value? For example the first column in data. Also, is it possible to use a named distribution as prior and sample the posterior for this initial distribution?