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
Copy file name to clipboardExpand all lines: lectures/finite_markov.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,11 +212,11 @@ One natural way to answer questions about Markov chains is to simulate them.
212
212
213
213
(To approximate the probability of event $E$, we can simulate many times and count the fraction of times that $E$ occurs).
214
214
215
-
Nice functionality for simulating Markov chains exists in [QuantEcon.py](https://quantecon.org/quantecon-py).
215
+
Nice functionality for simulating Markov chains exists in [QuantEcon.py](https://quantecon.org/quantecon-py/).
216
216
217
217
* Efficient, bundled with lots of other useful routines for handling Markov chains.
218
218
219
-
However, it's also a good exercise to roll our own routines --- let's do that first and then come back to the methods in [QuantEcon.py](https://quantecon.org/quantecon-py).
219
+
However, it's also a good exercise to roll our own routines --- let's do that first and then come back to the methods in [QuantEcon.py](https://quantecon.org/quantecon-py/).
220
220
221
221
In these exercises, we'll take the state space to be $S = 0,\ldots, n-1$.
222
222
@@ -231,7 +231,7 @@ The Markov chain is then constructed as discussed above. To repeat:
231
231
232
232
To implement this simulation procedure, we need a method for generating draws from a discrete distribution.
233
233
234
-
For this task, we'll use `random.draw` from [QuantEcon](https://quantecon.org/quantecon-py), which works as follows:
234
+
For this task, we'll use `random.draw` from [QuantEcon](https://quantecon.org/quantecon-py/), which works as follows:
235
235
236
236
```{code-cell} python3
237
237
ψ = (0.3, 0.7) # probabilities over {0, 1}
@@ -294,7 +294,7 @@ always close to 0.25, at least for the `P` matrix above.
294
294
295
295
### Using QuantEcon's Routines
296
296
297
-
As discussed above, [QuantEcon.py](https://quantecon.org/quantecon-py) has routines for handling Markov chains, including simulation.
297
+
As discussed above, [QuantEcon.py](https://quantecon.org/quantecon-py/) has routines for handling Markov chains, including simulation.
298
298
299
299
Here's an illustration using the same P as the preceding example
300
300
@@ -306,7 +306,7 @@ X = mc.simulate(ts_length=1_000_000)
306
306
np.mean(X == 0)
307
307
```
308
308
309
-
The [QuantEcon.py](https://quantecon.org/quantecon-py) routine is [JIT compiled](https://python-programming.quantecon.org/numba.html#numba-link) and much faster.
309
+
The [QuantEcon.py](https://quantecon.org/quantecon-py/) routine is [JIT compiled](https://python-programming.quantecon.org/numba.html#numba-link) and much faster.
310
310
311
311
```{code-cell} ipython
312
312
%time mc_sample_path(P, sample_size=1_000_000) # Our homemade code version
@@ -556,7 +556,7 @@ $$
556
556
It's clear from the graph that this stochastic matrix is irreducible: we can eventually
557
557
reach any state from any other state.
558
558
559
-
We can also test this using [QuantEcon.py](https://quantecon.org/quantecon-py)'s MarkovChain class
559
+
We can also test this using [QuantEcon.py](https://quantecon.org/quantecon-py/)'s MarkovChain class
560
560
561
561
```{code-cell} python3
562
562
P = [[0.9, 0.1, 0.0],
@@ -775,7 +775,7 @@ One option is to regard solving system {eq}`eq:eqpsifixed` as an eigenvector pr
775
775
$\psi$ such that $\psi = \psi P$ is a left eigenvector associated
776
776
with the unit eigenvalue $\lambda = 1$.
777
777
778
-
A stable and sophisticated algorithm specialized for stochastic matrices is implemented in [QuantEcon.py](https://quantecon.org/quantecon-py).
778
+
A stable and sophisticated algorithm specialized for stochastic matrices is implemented in [QuantEcon.py](https://quantecon.org/quantecon-py/).
779
779
780
780
This is the one we recommend:
781
781
@@ -1322,7 +1322,7 @@ $$
1322
1322
1323
1323
Tauchen's method {cite}`Tauchen1986` is the most common method for approximating this continuous state process with a finite state Markov chain.
1324
1324
1325
-
A routine for this already exists in [QuantEcon.py](https://quantecon.org/quantecon-py) but let's write our own version as an exercise.
1325
+
A routine for this already exists in [QuantEcon.py](https://quantecon.org/quantecon-py/) but let's write our own version as an exercise.
1326
1326
1327
1327
As a first step, we choose
1328
1328
@@ -1363,13 +1363,13 @@ The exercise is to write a function `approx_markov(rho, sigma_u, m=3, n=7)` that
The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package implements the Kalman filter
509
+
The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py/) package implements the Kalman filter
510
510
511
511
* Instance data consists of:
512
512
* the moments $(\hat x_t, \Sigma_t)$ of the current prior.
513
-
* An instance of the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class from [QuantEcon.py](https://quantecon.org/quantecon-py).
513
+
* An instance of the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class from [QuantEcon.py](https://quantecon.org/quantecon-py/).
514
514
515
515
The latter represents a linear state space model of the form
516
516
@@ -530,7 +530,7 @@ $$
530
530
Q := CC' \quad \text{and} \quad R := HH'
531
531
$$
532
532
533
-
* The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package has a number of methods, some that we will wait to use until we study more advanced applications in subsequent lectures.
533
+
* The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py/) package has a number of methods, some that we will wait to use until we study more advanced applications in subsequent lectures.
534
534
* Methods pertinent for this lecture are:
535
535
*`prior_to_filtered`, which updates $(\hat x_t, \Sigma_t)$ to $(\hat x_t^F, \Sigma_t^F)$
536
536
*`filtered_to_forecast`, which updates the filtering distribution to the predictive distribution -- which becomes the new prior $(\hat x_{t+1}, \Sigma_{t+1})$
Copy file name to clipboardExpand all lines: lectures/linear_models.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1334,7 +1334,7 @@ Weaker sufficient conditions for convergence associate eigenvalues equaling or
1334
1334
## Code
1335
1335
1336
1336
Our preceding simulations and calculations are based on code in
1337
-
the file [lss.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from the [QuantEcon.py](https://quantecon.org/quantecon-py) package.
1337
+
the file [lss.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from the [QuantEcon.py](https://quantecon.org/quantecon-py/) package.
1338
1338
1339
1339
The code implements a class for handling linear state space models (simulations, calculating moments, etc.).
Copy file name to clipboardExpand all lines: lectures/markov_perf.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -335,7 +335,7 @@ This is the approach we adopt in the next section.
335
335
336
336
### Implementation
337
337
338
-
We use the function [nnash](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqnash.py) from [QuantEcon.py](https://quantecon.org/quantecon-py) that computes a Markov perfect equilibrium of the infinite horizon linear-quadratic dynamic game in the manner described above.
338
+
We use the function [nnash](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqnash.py) from [QuantEcon.py](https://quantecon.org/quantecon-py/) that computes a Markov perfect equilibrium of the infinite horizon linear-quadratic dynamic game in the manner described above.
339
339
340
340
## Application
341
341
@@ -439,7 +439,7 @@ From these, we compute the infinite horizon MPE using the preceding code
439
439
440
440
Running the code produces the following output.
441
441
442
-
One way to see that $F_i$ is indeed optimal for firm $i$ taking $F_2$ as given is to use [QuantEcon.py](https://quantecon.org/quantecon-py)'s LQ class.
442
+
One way to see that $F_i$ is indeed optimal for firm $i$ taking $F_2$ as given is to use [QuantEcon.py](https://quantecon.org/quantecon-py/)'s LQ class.
443
443
444
444
In particular, let's take F2 as computed above, plug it into {eq}`eq_mpe_p1p` and {eq}`eq_mpe_p1d` to get firm 1's problem and solve it using LQ.
445
445
@@ -520,7 +520,7 @@ Replicate the {ref}`pair of figures <mpe_vs_monopolist>` showing the comparison
520
520
521
521
Parameters are as in duopoly_mpe.py and you can use that code to compute MPE policies under duopoly.
522
522
523
-
The optimal policy in the monopolist case can be computed using [QuantEcon.py](https://quantecon.org/quantecon-py)'s LQ class.
523
+
The optimal policy in the monopolist case can be computed using [QuantEcon.py](https://quantecon.org/quantecon-py/)'s LQ class.
Copy file name to clipboardExpand all lines: lectures/perm_income_cons.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ In this lecture, we'll
60
60
61
61
* show how the solution to the LQ permanent income model can be obtained using LQ control methods.
62
62
* represent the model as a linear state space system as in {doc}`this lecture <linear_models>`.
63
-
* apply [QuantEcon](https://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to characterize statistical features of the consumer's optimal consumption and borrowing plans.
63
+
* apply [QuantEcon](https://quantecon.org/quantecon-py/)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to characterize statistical features of the consumer's optimal consumption and borrowing plans.
64
64
65
65
We'll then use these characterizations to construct a simple model of cross-section wealth and
66
66
consumption dynamics in the spirit of Truman Bewley {cite}`Bewley86`.
@@ -204,7 +204,7 @@ $$
204
204
205
205
Here we solve the same model using {doc}`LQ methods <lqcontrol>` based on dynamic programming.
206
206
207
-
After confirming that answers produced by the two methods agree, we apply [QuantEcon](https://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py)
207
+
After confirming that answers produced by the two methods agree, we apply [QuantEcon](https://quantecon.org/quantecon-py/)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py)
Copy file name to clipboardExpand all lines: lectures/rational_expectations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -575,7 +575,7 @@ Let the firm's belief function $H$ be as given in {eq}`ree_hlom2`.
575
575
576
576
Formulate the firm's problem as a discounted optimal linear regulator problem, being careful to describe all of the objects needed.
577
577
578
-
Use the class `LQ` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package to solve the firm's problem for the following parameter values:
578
+
Use the class `LQ` from the [QuantEcon.py](https://quantecon.org/quantecon-py/) package to solve the firm's problem for the following parameter values:
0 commit comments