Hi @simon_o and others,
Good day.
I watched your video regarding Bayesian generative modelling.
-
I am not sure why the standard deviation is the exponential to the volatility in this case?
pm.Normal(‘obs’, mu=0., sd=pm.math.exp(volatility), observed=returns)
-
I understand that the volatility[-1] or I call it volatility last are obtain with initial guess of volatility_mu and continue to calculate them.
My question is, if I want to find future ‘change’ from current or particular time ‘change’, how should I define the volatility_last?
My understanding for volatility last is the ‘change’ value, but if we look at the code, the value of volatility_last is around the range of volatility_mu.
While the new ‘change’ value is approximate to exponential of volatility.
Hope I can get some explanation from everyone.
Thank you very much.
Dear all,
Good day.
import pymc3.distributions.timeseries as ts
with pm.Model() as wiggins_model:
volatility_theta = pm.Uniform('volatility_theta', lower=0., upper=1., testval=0.5)
volatility_mu = pm.Normal('volatility_mu', mu=-5., sd=.1, testval=-5)
volatility_sigma = pm.Uniform('volatility_sigma', lower=0.001, upper=.2, testval=0.05)
sde = lambda x, theta, mu, sigma: (theta * (mu - x), sigma)
volatility = ts.EulerMaruyama('volatility',
1.0,
sde,
[volatility_theta, volatility_mu, volatility_sigma],
shape=len(returns),
testval=np.ones_like(returns))
pm.Normal('obs', mu=0., sd=pm.math.exp(volatility), observed=returns)
May I know why compute PDF of observed values normally distributed around mean 0
with a standard deviation of exp(volatility) in this case?
Can anyone please explain why the sd not volatility but exp(volatility) in this case?
Thank you very much.