I’ve seen many papers talking about computing SV, like FV (2010) or BP (2014). I think its structure is like state space modelling. Is there any tips to estimate the SV of a time series? Thank you in advance.
Best,
Hui
I’ve seen many papers talking about computing SV, like FV (2010) or BP (2014). I think its structure is like state space modelling. Is there any tips to estimate the SV of a time series? Thank you in advance.
Best,
Hui
Those SV processes are exogenous process that are separately estimated from the rest of the model. You can use a particle filter for this. We used
Thank you to Prof. Johannes.
Sorry that I’m still confused about modifying your sample code. Could I only plug in x for another series? Do I need to take log of it at first? And let the other blocks unchanged. Thank you.
Yes, you can modify the variable you want to estimate. Whether you log it or not depends on what you want to do.
I am trying to estimate a stochastic volatility shock for Total Factor Productivity (TFP) in a similar way to Fernandez-Villaverde and Rubio-Ramírez (2010) and Fernandez-Villaverde et al (2011).
A_t = \rho_{A}A_{t-1} + \sigma_t \epsilon_{A,t}
Where \epsilon_{A,t} is normally distributed with zero mean variance of 1.
From my understanding that A_t is the Solow residual. To find and calibrate \rho_{A} this can be estimated with an ARIMA(1,0,0) and time trend where \rho will be the coefficient and \sigma_t is the standard deviation of the residuals. Is this correct?
Regarding the stochastic volatility, how can I calibrate it?
\log (\sigma_t) = (1 - \rho_\sigma)\log \sigma + \rho_\sigma \log \sigma_{t-1}+ \eta u_t
Where \sigma_t is time varying stochastic volatility, \rho_\sigma is the autoregressive coefficient of the log standard deviation and \eta is
the standard deviation of the innovations to volatility.
Can someone please tell me how I can estimate the equation of the stochastic volatility? How can I have a series for \sigma_t ?
I should get values for these parameters based on the data and use them as priori in the particle filter right?
The point of the particle filter is exactly to estimate the SV process. Note that the priors in the particle filter are chosen before seeing the data. It’s not valid to use the data to obtain a prior.
Thank you jpfeifer, but can you tell me how to choose the priors that I input in the Particle filtering to obtain posteriors of the shock parameters ?
I am looking at your code of particle filtering run_filter_and_smoother_AR1.m
I can see that rho_sigma is 0.9 and eta_sigma is 0.3 .
Are these values I have to write them by default and let the particle filter decide on the values for the SV?
Those are not the prior values, they are the starting values of the chain. Regardless of the starting value, your chain should converge to the ergodic distribution. The priors are in Particle_Filtering/evaluate_prior_AR1.m at master · JohannesPfeifer/Particle_Filtering · GitHub
Dear Pfeifer, I think I understand now the priors for the particle filter. However, what I do not understand the prior given to the parameter \sigma (sigma_bar as defined in your particle filter code) from my understanding in the paper of Fernandez-Villaverde etal (2011) that this is chosen to match the data.
Can you please tell me how is it calculated/derived?
Hi Prof. Pfeifer,
Would you mind asking some basic questions?
Shall I get the parameter estimates of the SV processes by running only the run_filter_and_smoother_AR1.m? Does this file also implement Tailored Randomized Block Metropolis-Hastings (TaRB-MH) algorithm? What I understood is that the run_filter_and_smoother_AR1.m file implements particle filter. It is used to estimate the SV process as you commented above. Why do we still need implementing TaRB-MH algorithm?
After feeding the estimated parameters into the mod file can I solve the full model at first order and estimate it using RWMH algorithm? I am aware that in your “policy risk and business cycle” paper the SMM was used for full model estimation.
The function named “PF_density_computation_function” is used as an input argument in the function “PF_basefunction_with_smoother_AR1”. However, I did not find any function titled “PF_density_computation_function” inside the particle filters folder. Would you kindly tell me about it?
PF_density_computation_function
is not a function name, but rather the function handle passed as an input. In PF_caller.m
you have @PF_AR1_density
as the input.run_filter_and_smoother_AR1_TaRB
” be run to estimate the parameters of the stochastic volatility (SV) model?stoch_simul
the model at 3rd order feeding the estimated parameters of the SV model will volatility of the shocks have any impact on the parameter identification?I ran the file “run_filter_and_smoother_AR1_TaRB
” and encountered an error.
There is an ‘ii
’ in line 179 col 88, which I guess is not previously defined. I also see many 'ii
’s after the line 179. Could you please take a look if time permits? May I ask you a couple of questions related to the estimation?
a) Where are the estimated parameters stored?
b) My model features both transitory and permanent productivity shocks having time-varying volatility. Should I do one-sided hp filter to decompose the original TFP process into its transitory and permanent components?
c) The model also has a preference shock, which is unobservable. How can I deal with the stochastic volatility of an unobservable series?
Given the complexity of estimation, I only want to solve the model at 3rd order after estimating the stochastic volatility model. Will it be enough to write a paper?
Thank you for your kind response.
Dear professor, I would like to estimate the parameters of the uncertainty shocks of my model (that is, \rho_d, \rho_{\sigma^D}, \sigma^D, \sigma^{\sigma^D). I do not know if I have to proceed in the same way as in JohannesPfeifer/Particle_Filtering, or if I have other options apart from that one.
Thank you for your time
There are other approaches available as well, like e.g. [1706.05280] Ancillarity-Sufficiency Interweaving Strategy (ASIS) for Boosting MCMC Estimation of Stochastic Volatility Models
But they may be more complicated to implement for your use case. Dynare does not offer such an alternative.