# Ecb working paper series no 2381 march 2020 41 going

• No School
• AA 1
• 60

This preview shows page 42 - 46 out of 60 pages.

ECB Working Paper Series No 2381 / March 2020 41
Going with t backwards from T - 1 to 1, compute the following: Forecast and forecast error: ˆ Ω t +1 | t = ˆ FP t | t ( ˆ F ) 0 + ˆ Q ; ˆ z t +1 | t = ˆ Fz t | t + h s i t +1 ( μ 0 + x i t +1 ) + (1 - s i t +1 ) μ 1 , 0 , ..., 0 i 0 ; ν t +1 = ˆ z i +1 t +1 - ˆ z t +1 | t ; Use the information from t + 1 to update the estimates for t : z t | T = z t | t +1 = z t | t + P t | t ( ˆ F ) 0 ( ˆ Ω t +1 | t ) - 1 ν t +1 ; P t | T = P t | t +1 = P t | t - P t | t ( ˆ F ) 0 ( ˆ Ω t +1 | t ) - 1 ˆ FP t | t ; Use the obtained information to randomize z i +1 t ∼ N ( z t | T , P t | T ); Eliminate, as described above, elements of z i +1 t to obtain ˆ z i +1 t . 2. Given Z i +1 , X i , and θ i , operate upon the equation ( A.1 ) to simulate indicators S i +1 following Carter and Kohn ( 1994 ): a. Going forwards, for t = 1 , .., T , compute P t ( s t = 0): The initial unconditional probability of normal state is P 0 ( s 0 = 0) = 1 - q 2 - q - p . For t = 1 , ..., T , first compute P t - 1 ( s t = 0) = P t - 1 ( s t - 1 = 0) × p + ( 1 - P t - 1 ( s t - 1 = 0) ) × (1 - q ); and observe that f t | s t = 0 ∼ N ( μ 0 , σ 2 e ) , f t | s t = 1 ∼ N ( μ 1 + x i t , σ 2 e ) . Then, P t ( s t = 0) = P t - 1 ( s t = 0) φ f t - μ 0 σ e P t - 1 ( s t = 0) φ f t - μ 0 σ e + ( 1 - P t - 1 ( s t = 0) ) φ f t - μ 1 - x i t σ e . ECB Working Paper Series No 2381 / March 2020 42
b. Going backwards for t = T, ..., 1, compute P t +1 ( s t = 0) = P T ( s t = 0) and simulate the state indicators using these probabilities: For the last period, we have P T ( s T = 0) from step (a). Simulate s i +1 T using this probability. For t = T - 1 , ..., 1, compute the probabilities as follows: s i +1 t +1 = 0 P t +1 ( s t = 0) = P t ( s t = 0) × p P t ( s t = 0) × p + ( 1 - P t ( s t = 0) ) × (1 - q ) ; s i +1 t +1 = 1 P t +1 ( s t = 0) = P t ( s t = 0) × (1 - p ) P t ( s t = 0) × (1 - p ) + ( 1 - P t ( s t = 0) ) × q . Then, since P t +1 ( s t = 0) = P T ( s t = 0), use this probability to simulate s i +1 t 3. Given, S i +1 , θ i , and Z i +1 , simlulate X i +1 using Carter and Kohn ( 1994 ). It is the same routine as in step 1, except that now, the dynamics of the unobserved state are given by equation ( A.2 ), and the “measurement” equation is equation ( A.1 ) for the common factor, in which all the elements except for x t are fixed. A major simplification is that the common factor values are known for all periods t = 1 , ..., T , and both the common factor f t and the latent variable x t are one-dimensional, so there is no need to reduce the dimensionality of the equations to account for missing variables or singularity. 4. Finally, given Y , S i +1 , Z i +1 , and X i +1 , compute θ i +1 using standard pior distributions: a. The prior distribution for σ 2 v , the variance of the shock affecting the unobserved process x t , is inverse-gamma: σ 2 v ∼ IG ( a, b ). Then, the posterior is also inverse- gamma, IG a, ¯ b ), such that ¯ a = a + T 2 , ¯ b = b + ( x i t - s i t x i t - 1 ) 2 2 . We sample ( σ i +1 v ) 2 from this posterior. b. Similarly, the prior distribution for σ 2 e , the variance of the shock affecting the common factor f t , is inverse-gamma: σ 2 e ∼ IG ( a, b ). Then, the posterior is also inverse-gamma, IG a, ¯ b ), such that ¯ a = a + T 2 , ¯ b = 1 b + ∑ ( f i t - s i t ( μ i 1 + x i t - 1 ) - (1 - s i t ) μ i 0 ) 2 / 2 . ECB Working Paper Series No 2381 / March 2020 43
We sample ( σ i +1 e ) 2 from this posterior.

#### You've reached the end of your free preview.

Want to read all 60 pages?

• Fall '19
• Economics, Recession, Late-2000s recession, GWI

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes