You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, we just plot $y_t$ and $x_t$, postponing until later a description of exactly how we compute them.
683
684
684
685
(addfunc_egcode)=
685
-
```{code-cell} python3
686
+
687
+
```{code-cell} ipython3
686
688
ϕ_1, ϕ_2, ϕ_3, ϕ_4 = 0.5, -0.2, 0, 0.5
687
689
σ = 0.01
688
690
ν = 0.01 # Growth rate
@@ -860,7 +862,7 @@ Let's use this code (embedded above) to explore the {ref}`example process descri
860
862
If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call
861
863
you will generate (modulo randomness) the plot
862
864
863
-
```{code-cell}python3
865
+
```{code-cell}ipython3
864
866
plot_additive(amf, T)
865
867
plt.show()
866
868
```
@@ -916,7 +918,7 @@ Let's plot this multiplicative functional for our example.
916
918
If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call in the cell below you'll
917
919
obtain the graph in the next cell.
918
920
919
-
```{code-cell}python3
921
+
```{code-cell}ipython3
920
922
plot_multiplicative(amf, T)
921
923
plt.show()
922
924
```
@@ -950,7 +952,7 @@ The second is a **peculiar property** noted and proved by Hansen and Sargent {ci
950
952
951
953
The following simulation of many paths of $\widetilde M_t$ illustrates both properties
952
954
953
-
```{code-cell}python3
955
+
```{code-cell}ipython3
954
956
np.random.seed(10021987)
955
957
plot_martingales(amf, 12000)
956
958
plt.show()
@@ -994,7 +996,7 @@ Let's write a program to simulate sample paths of $\{ x_t, y_{t} \}_{t=0}^{\inft
994
996
995
997
We'll do this by formulating the additive functional as a linear state space model and putting the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to work.
996
998
997
-
```{code-cell}python3
999
+
```{code-cell}ipython3
998
1000
class AMF_LSS_VAR:
999
1001
"""
1000
1002
This class is written to transform a scalar additive functional
0 commit comments