Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. i=0;
  2. for i = n+1:n+h
  3. %% structural shocks simulation
  4. if j == 1
  5. eps =randn(1,10)*chol(sigma); % stochastic baseline scenario
  6. elseif j ==2
  7. if i<=n+4
  8. v = randn(1, 10);
  9. v(8) = -0.8; %GDP shock
  10. eps = v*chol(sigma);
  11. else
  12. eps = randn(1,10)*chol(sigma);
  13. end
  14. else
  15. if i<=n+1
  16. v = randn(1, 10);
  17. v(9) = 2.6; %ex. rate depreciation shock
  18. eps = v*chol(sigma);
  19. else
  20. eps = randn(1,10)*chol(sigma);
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement