Skip to content

Commit 089e35c

Browse files
authored
Fix: Add trailing slash to quantecon-py URLs and upgrade quantecon-book-theme==0.13.2 (jupyterbook link fix) (#743)
* fix: add trailing slash to quantecon-py URLs Fixes redirect warnings from link checker by updating all https://quantecon.org/quantecon-py URLs to include trailing slash. Affected files: - finite_markov.md (10 links) - kalman.md (3 links) - linear_models.md (1 link) - lqcontrol.md (1 link) - markov_perf.md (3 links) - perm_income_cons.md (2 links) - rational_expectations.md (1 link) - samuelson.md (2 links) - troubleshooting.md (1 link) Closes #739 (redirect warnings) * MAINT: update quantecon-book-theme to v0.13.2 Includes jupyterbook.org link fix (redirects to /v1/)
1 parent 19fea82 commit 089e35c

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77
- pip
88
- pip:
99
- jupyter-book==1.0.4post1
10-
- quantecon-book-theme==0.13.1
10+
- quantecon-book-theme==0.13.2
1111
- sphinx-tojupyter==0.4.0
1212
- sphinxext-rediraffe==0.2.7
1313
- sphinx-exercise==1.2.0

lectures/finite_markov.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ One natural way to answer questions about Markov chains is to simulate them.
212212

213213
(To approximate the probability of event $E$, we can simulate many times and count the fraction of times that $E$ occurs).
214214

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/).
216216

217217
* Efficient, bundled with lots of other useful routines for handling Markov chains.
218218

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/).
220220

221221
In these exercises, we'll take the state space to be $S = 0,\ldots, n-1$.
222222

@@ -231,7 +231,7 @@ The Markov chain is then constructed as discussed above. To repeat:
231231

232232
To implement this simulation procedure, we need a method for generating draws from a discrete distribution.
233233

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:
235235

236236
```{code-cell} python3
237237
ψ = (0.3, 0.7) # probabilities over {0, 1}
@@ -294,7 +294,7 @@ always close to 0.25, at least for the `P` matrix above.
294294

295295
### Using QuantEcon's Routines
296296

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.
298298

299299
Here's an illustration using the same P as the preceding example
300300

@@ -306,7 +306,7 @@ X = mc.simulate(ts_length=1_000_000)
306306
np.mean(X == 0)
307307
```
308308

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.
310310

311311
```{code-cell} ipython
312312
%time mc_sample_path(P, sample_size=1_000_000) # Our homemade code version
@@ -556,7 +556,7 @@ $$
556556
It's clear from the graph that this stochastic matrix is irreducible: we can eventually
557557
reach any state from any other state.
558558

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
560560

561561
```{code-cell} python3
562562
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
775775
$\psi$ such that $\psi = \psi P$ is a left eigenvector associated
776776
with the unit eigenvalue $\lambda = 1$.
777777
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/).
779779
780780
This is the one we recommend:
781781
@@ -1322,7 +1322,7 @@ $$
13221322
13231323
Tauchen's method {cite}`Tauchen1986` is the most common method for approximating this continuous state process with a finite state Markov chain.
13241324
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.
13261326
13271327
As a first step, we choose
13281328
@@ -1363,13 +1363,13 @@ The exercise is to write a function `approx_markov(rho, sigma_u, m=3, n=7)` that
13631363
$\{x_0, \ldots, x_{n-1}\} \subset \mathbb R$ and $n \times n$ matrix
13641364
$P$ as described above.
13651365
1366-
* Even better, write a function that returns an instance of [QuantEcon.py's](https://quantecon.org/quantecon-py) MarkovChain class.
1366+
* Even better, write a function that returns an instance of [QuantEcon.py's](https://quantecon.org/quantecon-py/) MarkovChain class.
13671367
```
13681368
13691369
```{solution} fm_ex3
13701370
:class: dropdown
13711371
1372-
A solution from the [QuantEcon.py](https://quantecon.org/quantecon-py) library
1372+
A solution from the [QuantEcon.py](https://quantecon.org/quantecon-py/) library
13731373
can be found [here](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/markov/approximation.py).
13741374
13751375
```

lectures/kalman.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,11 @@ In this case, for any initial choice of $\Sigma_0$ that is both non-negative and
506506
```{index} single: Kalman Filter; Programming Implementation
507507
```
508508

509-
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
510510

511511
* Instance data consists of:
512512
* 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/).
514514

515515
The latter represents a linear state space model of the form
516516

@@ -530,7 +530,7 @@ $$
530530
Q := CC' \quad \text{and} \quad R := HH'
531531
$$
532532

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.
534534
* Methods pertinent for this lecture are:
535535
* `prior_to_filtered`, which updates $(\hat x_t, \Sigma_t)$ to $(\hat x_t^F, \Sigma_t^F)$
536536
* `filtered_to_forecast`, which updates the filtering distribution to the predictive distribution -- which becomes the new prior $(\hat x_{t+1}, \Sigma_{t+1})$

lectures/linear_models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,7 @@ Weaker sufficient conditions for convergence associate eigenvalues equaling or
13341334
## Code
13351335

13361336
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.
13381338

13391339
The code implements a class for handling linear state space models (simulations, calculating moments, etc.).
13401340

lectures/lqcontrol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ for $t = 0, \ldots, T-1$ attains the minimum of {eq}`lq_object` subject to our c
555555
## Implementation
556556

557557
We will use code from [lqcontrol.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqcontrol.py)
558-
in [QuantEcon.py](https://quantecon.org/quantecon-py)
558+
in [QuantEcon.py](https://quantecon.org/quantecon-py/)
559559
to solve finite and infinite horizon linear quadratic control problems.
560560

561561
In the module, the various updating, simulation and fixed point methods

lectures/markov_perf.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ This is the approach we adopt in the next section.
335335

336336
### Implementation
337337

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.
339339

340340
## Application
341341

@@ -439,7 +439,7 @@ From these, we compute the infinite horizon MPE using the preceding code
439439

440440
Running the code produces the following output.
441441

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.
443443

444444
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.
445445

@@ -520,7 +520,7 @@ Replicate the {ref}`pair of figures <mpe_vs_monopolist>` showing the comparison
520520
521521
Parameters are as in duopoly_mpe.py and you can use that code to compute MPE policies under duopoly.
522522
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.
524524
```
525525

526526
```{solution-start} mp_ex1

lectures/perm_income_cons.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ In this lecture, we'll
6060

6161
* show how the solution to the LQ permanent income model can be obtained using LQ control methods.
6262
* 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.
6464

6565
We'll then use these characterizations to construct a simple model of cross-section wealth and
6666
consumption dynamics in the spirit of Truman Bewley {cite}`Bewley86`.
@@ -204,7 +204,7 @@ $$
204204

205205
Here we solve the same model using {doc}`LQ methods <lqcontrol>` based on dynamic programming.
206206

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)
208208
class to illustrate features of the model.
209209

210210
Why solve a model in two distinct ways?

lectures/rational_expectations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ Let the firm's belief function $H$ be as given in {eq}`ree_hlom2`.
575575
576576
Formulate the firm's problem as a discounted optimal linear regulator problem, being careful to describe all of the objects needed.
577577
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:
579579
580580
$$
581581
a_0= 100, a_1= 0.05, \beta = 0.95, \gamma=10, \kappa_0 = 95.5, \kappa_1 = 0.95

lectures/samuelson.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ plt.show()
11591159

11601160
## Using the LinearStateSpace class
11611161

1162-
It turns out that we can use the [QuantEcon.py](https://quantecon.org/quantecon-py)
1162+
It turns out that we can use the [QuantEcon.py](https://quantecon.org/quantecon-py/)
11631163
[LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to do
11641164
much of the work that we have done from scratch above.
11651165

@@ -1410,5 +1410,5 @@ in {cite}`Samuelson1939`.
14101410
We saw that different parameter values led to different output paths, which
14111411
could either be stationary, explosive, or oscillating.
14121412

1413-
We also were able to represent the model using the [QuantEcon.py](https://quantecon.org/quantecon-py)
1413+
We also were able to represent the model using the [QuantEcon.py](https://quantecon.org/quantecon-py/)
14141414
[LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class.

lectures/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ on how to update Anaconda.
4242

4343
Another option is to simply remove Anaconda and reinstall.
4444

45-
You also need to keep the external code libraries, such as [QuantEcon.py](https://quantecon.org/quantecon-py) up to date.
45+
You also need to keep the external code libraries, such as [QuantEcon.py](https://quantecon.org/quantecon-py/) up to date.
4646

4747
For this task you can either
4848

0 commit comments

Comments
 (0)