@@ -642,7 +642,7 @@ mystnb:
|
642 | 642 | caption: Standard vs robust consumption paths |
643 | 643 | name: fig-std-vs-robust-paths |
644 | 644 | --- |
645 | | -np.random.seed(0) |
| 645 | +rng = np.random.default_rng(0) |
646 | 646 | T_sim = 100 |
647 | 647 | |
648 | 648 | def simulate_ar1(φ, ν, shocks, mu0=0.0): |
@@ -652,7 +652,7 @@ def simulate_ar1(φ, ν, shocks, mu0=0.0):
|
652 | 652 | path[t] = φ * path[t-1] + ν * ε |
653 | 653 | return path |
654 | 654 | |
655 | | -shock_path = np.random.randn(T_sim - 1) |
| 655 | +shock_path = rng.standard_normal(T_sim - 1) |
656 | 656 | mu0_init = 10.0 |
657 | 657 | mu_std_path = simulate_ar1(φ_std, ν_std, shock_path, mu0=mu0_init) |
658 | 658 | mu_rob_path = simulate_ar1(φ_rob, ν_rob, shock_path, mu0=mu0_init) |
|