Skip to content

Commit 0e91e00

Browse files
mmckyclaude
andauthored
Update lectures for quantecon 0.13.1 (#393)
quantecon 0.13.1 fixes the Markov-jump Riccati recursion in LQMarkov (QuantEcon/QuantEcon.py#982), so remove the notes in markov_jump_lq and policy_regimes saying that it uses the averaged recursion. In arma, say that ma_poly and ar_poly must be padded to the same length before they are passed to dimpulse, the bug QuantEcon/QuantEcon.py#976 fixed. Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 6de87b7 commit 0e91e00

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎lectures/arma.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,8 @@ where `ma_poly` and `ar_poly` correspond to the polynomials in {eq}`arma_poly` -
864864
* `ma_poly` is the vector $(1, \theta_1, \theta_2, \ldots, \theta_q)$
865865
* `ar_poly` is the vector $(1, -\phi_1, -\phi_2, \ldots, - \phi_p)$
866866

867+
Both vectors must have the same length, so the shorter one is padded with trailing zeros: `dimpulse` reads them as polynomials in positive powers of $z$, and an `ar_poly` longer than `ma_poly` would otherwise delay the response by the difference in their lengths.
868+
867869
To this end, we also maintain the arrays `ma_poly` and `ar_poly` as instance data, with their values computed automatically from the values of `phi` and `theta` supplied by the user.
868870

869871
If the user decides to change the value of either `theta` or `phi` ex-post by assignments

‎lectures/markov_jump_lq.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,6 @@ The conditional expectation $\bar P_i$ appears inside the inverse.
240240

241241
Averaging the quadratic forms $(\beta B_i' P_j A_i + W_i)' (Q_i + \beta B_i' P_j B_i)^{-1} (\beta B_i' P_j A_i + W_i)$ over $j$ instead gives a different and incorrect recursion, except when next period's Markov state is known with certainty or when $Q_i + \beta B_i' P_j B_i$ and $B_i' P_j A_i$ do not vary with $j$.
242242

243-
At the time of writing, `quantecon.LQMarkov` implements that averaged recursion.
244-
245-
In the examples below, its decision rules differ from those of the correct recursion by at most 2 percent.
246-
247243
## Applications
248244

249245
We use the following imports.

‎lectures/policy_regimes.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ The decision rule in regime $i$ is $q_t = -F_i x_t$ with $F_i = (Q_i + \beta B'
196196

197197
We code the iteration directly.
198198

199-
At the time of writing, `quantecon.LQMarkov` averages over next-period Markov states outside the matrix inverse, which gives a different recursion when $\Pi$ has more than one nonzero element in a row.
200-
201199
```{code-cell} python3
202200
def solve_regimes(φs, Π, tol=1e-12, max_iter=20_000):
203201
"Decision rules F_i for regimes with feedback coefficients φs and transition matrix Π."

0 commit comments

Comments
 (0)