Skip to content

Commit 2512bcf

Browse files
authored
Merge branch 'main' into mle_fixes
2 parents b2d4f84 + 39b39c9 commit 2512bcf

38 files changed

+51
-67
lines changed

.github/workflows/cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
auto-update-conda: true
1818
auto-activate-base: true
1919
miniconda-version: 'latest'
20-
python-version: "3.12"
20+
python-version: "3.13"
2121
environment-file: environment.yml
2222
activate-environment: quantecon
2323
- name: Install JAX, Numpyro, PyTorch

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
auto-update-conda: true
1616
auto-activate-base: true
1717
miniconda-version: 'latest'
18-
python-version: "3.12"
18+
python-version: "3.13"
1919
environment-file: environment.yml
2020
activate-environment: quantecon
2121
- name: Install JAX, Numpyro, PyTorch

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
auto-update-conda: true
1717
auto-activate-base: true
1818
miniconda-version: 'latest'
19-
python-version: "3.12"
19+
python-version: "3.13"
2020
environment-file: environment.yml
2121
activate-environment: quantecon
2222
- name: Install JAX, Numpyro, PyTorch

environment.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ name: quantecon
22
channels:
33
- default
44
dependencies:
5-
- python=3.12
6-
- anaconda=2024.10
5+
- python=3.13
6+
- anaconda=2025.06
77
- pip
88
- pip:
9-
- jupyter-book==1.0.3
10-
- quantecon-book-theme==0.7.6
11-
- sphinx-tojupyter==0.3.0
9+
- jupyter-book==1.0.4post1
10+
- quantecon-book-theme==0.9.0
11+
- sphinx-tojupyter==0.3.1
1212
- sphinxext-rediraffe==0.2.7
13-
- sphinx-reredirects==0.1.4
1413
- sphinx-exercise==1.0.1
15-
- sphinx-proof==0.2.0
16-
- ghp-import==1.1.0
17-
- sphinxcontrib-youtube==1.3.0 #Version 1.3.0 is required as quantecon-book-theme is only compatible with sphinx<=5
14+
- sphinx-proof==0.2.1
15+
- sphinxcontrib-youtube==1.4.1
1816
- sphinx-togglebutton==0.3.2
17+
- sphinx-reredirects==0.1.4
18+
19+

lectures/_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ sphinx:
9898
advanced:
9999
- "https://python-advanced.quantecon.org"
100100
- null
101+
jax:
102+
- "https://jax.quantecon.org/"
103+
- null
101104
mathjax3_config:
102105
tex:
103106
macros:

lectures/aiyagari.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Let's start with some imports:
5757

5858
```{code-cell} ipython3
5959
import matplotlib.pyplot as plt
60-
plt.rcParams["figure.figsize"] = (11, 5) #set default figure size
6160
import numpy as np
6261
from quantecon.markov import DiscreteDP
6362
from numba import jit

lectures/cake_eating_problem.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@ In what follows, we require the following imports:
4141

4242
```{code-cell} ipython
4343
import matplotlib.pyplot as plt
44-
plt.rcParams["figure.figsize"] = (11, 5) #set default figure size
4544
import numpy as np
4645
```
4746

48-
## The Model
47+
## The model
4948

5049
We consider an infinite time horizon $t=0, 1, 2, 3..$
5150

@@ -115,7 +114,7 @@ In this problem, the following terminology is standard:
115114
* $c_t$ is called the **control variable** or the **action**
116115
* $\beta$ and $\gamma$ are **parameters**
117116

118-
### Trade-Off
117+
### Trade-off
119118

120119
The key trade-off in the cake-eating problem is this:
121120

@@ -145,14 +144,14 @@ parameters*.
145144

146145
Let's see if this is true.
147146

148-
## The Value Function
147+
## The value function
149148

150149
The first step of our dynamic programming treatment is to obtain the Bellman
151150
equation.
152151

153152
The next step is to use it to calculate the solution.
154153

155-
### The Bellman Equation
154+
### The Bellman equation
156155

157156
To this end, we let $v(x)$ be maximum lifetime utility attainable from
158157
the current time when $x$ units of cake are left.
@@ -199,7 +198,7 @@ If $c$ is chosen optimally using this trade off strategy, then we obtain maximal
199198

200199
Hence, $v(x)$ equals the right hand side of {eq}`bellman-cep`, as claimed.
201200

202-
### An Analytical Solution
201+
### An analytical solution
203202

204203
It has been shown that, with $u$ as the CRRA utility function in
205204
{eq}`crra_utility`, the function
@@ -249,7 +248,7 @@ ax.legend(fontsize=12)
249248
plt.show()
250249
```
251250

252-
## The Optimal Policy
251+
## The optimal policy
253252

254253
Now that we have the value function, it is straightforward to calculate the
255254
optimal action at each state.
@@ -309,7 +308,7 @@ ax.legend()
309308
plt.show()
310309
```
311310

312-
## The Euler Equation
311+
## The Euler equation
313312

314313
In the discussion above we have provided a complete solution to the cake
315314
eating problem in the case of CRRA utility.
@@ -323,7 +322,7 @@ Euler equation.
323322
This is because, for more difficult problems, this equation
324323
provides key insights that are hard to obtain by other methods.
325324

326-
### Statement and Implications
325+
### Statement and implications
327326

328327
The Euler equation for the present problem can be stated as
329328

@@ -376,7 +375,7 @@ see proposition 2.2 of {cite}`ma2020income`.
376375
The following arguments focus on necessity, explaining why an optimal path or
377376
policy should satisfy the Euler equation.
378377

379-
### Derivation I: A Perturbation Approach
378+
### Derivation I: a perturbation approach
380379

381380
Let's write $c$ as a shorthand for consumption path $\{c_t\}_{t=0}^\infty$.
382381

@@ -444,7 +443,7 @@ $$
444443

445444
This is just the Euler equation.
446445

447-
### Derivation II: Using the Bellman Equation
446+
### Derivation II: using the Bellman equation
448447

449448
Another way to derive the Euler equation is to use the Bellman equation {eq}`bellman-cep`.
450449

lectures/career.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ We begin with some imports:
4848

4949
```{code-cell} ipython
5050
import matplotlib.pyplot as plt
51-
plt.rcParams["figure.figsize"] = (11, 5) #set default figure size
5251
import numpy as np
5352
import quantecon as qe
5453
from numba import jit, prange
@@ -370,7 +369,8 @@ when the worker follows the optimal policy.
370369

371370
In particular, modulo randomness, reproduce the following figure (where the horizontal axis represents time)
372371

373-
```{figure} /_static/lecture_specific/career/career_solutions_ex1_py.png
372+
```{image} /_static/lecture_specific/career/career_solutions_ex1_py.png
373+
:align: center
374374
```
375375

376376
```{hint}

lectures/cass_koopmans_2.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Let's start with some standard imports:
6767

6868
```{code-cell} ipython
6969
import matplotlib.pyplot as plt
70-
plt.rcParams["figure.figsize"] = (11, 5) #set default figure size
7170
from numba import jit, float64
7271
from numba.experimental import jitclass
7372
import numpy as np

lectures/exchangeable.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Let’s start with some imports:
7171
tags: [hide-output]
7272
---
7373
import matplotlib.pyplot as plt
74-
plt.rcParams["figure.figsize"] = (11, 5) #set default figure size
7574
from numba import jit, vectorize
7675
from math import gamma
7776
import scipy.optimize as op

0 commit comments

Comments
 (0)