How to estimate the stochastic volatility as in Fernandez (2010)?

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.

1 Like

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

2 Likes

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?

  1. Strictly speaking, this approach is not valid.
  2. As the paper says: they compute the \sigma as if the process were a simple AR(1) without SV. So you simply estimate the AR(1) and compute the standard deviation of the residuals.
2 Likes