Skip to content

Commit

Permalink
Merge branch 'main' into centralize_figure
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Jun 21, 2021
2 parents f833153 + 7d072c7 commit 59046d7
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- pip:
- jupyter-book==0.10.2
- sphinx-multitoc-numbering==0.1.3
- quantecon-book-theme==0.2.2
- quantecon-book-theme==0.2.4
- sphinx-tojupyter==0.1.1
- sphinxext-rediraffe==0.2.7
- sphinx-exercise==0.1.1
Expand Down
2 changes: 1 addition & 1 deletion lectures/additive_functionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ The code below adds some functions that generate plots for instances of the `AMF

```{code-cell} python3
---
tags: [output_scroll]
tags: [collapse-20]
---
def plot_given_paths(amf, T, ypath, mpath, spath, tpath,
mbounds, sbounds, horline=0, show_trend=True):
Expand Down
4 changes: 3 additions & 1 deletion lectures/amss.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ on optimal taxation with state-contingent debt sequential allocation implementa
```{code-cell} python3
---
load: _static/lecture_specific/opt_tax_recur/sequential_allocation.py
tags: [output_scroll]
tags: [collapse-20]
---
```

Expand Down Expand Up @@ -759,6 +759,7 @@ Paths with circles are histories in which there is peace, while those with
triangle denote war.

```{code-cell} python3
:tags: ["scroll-output"]
# Initialize μgrid for value function iteration
μ_grid = np.linspace(-0.7, 0.01, 300)
Expand Down Expand Up @@ -882,6 +883,7 @@ state-contingent debt (circles) and the economy with only a risk-free bond
(triangles).

```{code-cell} python3
:tags: ["scroll-output"]
log_example = LogUtility()
log_example.transfers = True # Government can use transfers
log_sequential = SequentialAllocation(log_example) # Solve sequential problem
Expand Down
7 changes: 4 additions & 3 deletions lectures/amss2.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,21 @@ The code is mostly taken or adapted from the earlier lectures {doc}`optimal tax
```{code-cell} python3
---
load: _static/lecture_specific/opt_tax_recur/sequential_allocation.py
tags: [output_scroll]
tags: [collapse-20]
---
```

```{code-cell} python3
---
load: _static/lecture_specific/amss/recursive_allocation.py
tags: [output_scroll]
tags: [collapse-20]
---
```

```{code-cell} python3
---
load: _static/lecture_specific/amss/utilities.py
tags: [output_scroll]
tags: [collapse-20]
---
```

Expand Down Expand Up @@ -433,6 +433,7 @@ debt equal to $b_0 = -1.038698407551764$.
These graphs report outcomes for both the Lucas-Stokey economy with complete markets and the AMSS economy with one-period risk-free debt only.

```{code-cell} python3
:tags: ["scroll-output"]
μ_grid = np.linspace(-0.09, 0.1, 100)
log_example = CRRAutility()
Expand Down
7 changes: 4 additions & 3 deletions lectures/amss3.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,21 @@ Here it is
```{code-cell} python3
---
load: _static/lecture_specific/opt_tax_recur/sequential_allocation.py
tags: [output_scroll]
tags: [collapse-20]
---
```

```{code-cell} python3
---
load: _static/lecture_specific/amss/recursive_allocation.py
tags: [output_scroll]
tags: [collapse-20]
---
```

```{code-cell} python3
---
load: _static/lecture_specific/amss/utilities.py
tags: [output_scroll]
tags: [collapse-20]
---
```

Expand All @@ -176,6 +176,7 @@ government debt equal to $-.5$.
Here is a graph of a long simulation of 102000 periods.

```{code-cell} python3
:tags: ["scroll-output"]
μ_grid = np.linspace(-0.09, 0.1, 100)
log_example = CRRAutility(π=(1 / 3) * np.ones((3, 3)),
Expand Down
2 changes: 1 addition & 1 deletion lectures/chang_credible.md
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ The following code computes sustainable plans
```{code-cell} python3
---
load: _static/lecture_specific/chang_credible/changecon.py
tags: [output_scroll]
tags: [collapse-20]
---
```

Expand Down
4 changes: 2 additions & 2 deletions lectures/matsuyama.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ Dark colors indicate synchronization, while light colors indicate failure to syn

(matsrep)=
```{figure} /_static/lecture_specific/matsuyama/matsuyama_14.png
:scale: 60
:scale: 50
```

As you can see, larger values of $\rho$ translate to more synchronization.
Expand All @@ -723,7 +723,7 @@ In the solution to the exercises, you'll also find a figure with sliders, allowi
Here's one snapshot from the interactive figure

```{figure} /_static/lecture_specific/matsuyama/matsuyama_18.png
:scale: 80
```

## Exercises
Expand Down
4 changes: 2 additions & 2 deletions lectures/orth_proj.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ $$

Evidently $Py$ is a linear function from $y \in \mathbb R^n$ to $P y \in \mathbb R^n$.

This reference is useful [https://en.wikipedia.org/wiki/Linear_map#Matrices](https://en.wikipedia.org/wiki/Linear_map#Matrices).
[This reference](https://en.wikipedia.org/wiki/Linear_map#Matrices) is useful.

**Theorem.** Let the columns of $n \times k$ matrix $X$ form a basis of $S$. Then

Expand All @@ -340,7 +340,7 @@ $$
Proof: Given arbitrary $y \in \mathbb R^n$ and $P = X (X'X)^{-1} X'$, our claim is that

1. $P y \in S$, and
1. $y - P y \perp S$
2. $y - P y \perp S$

Claim 1 is true because

Expand Down
2 changes: 1 addition & 1 deletion lectures/smoothing.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ payoffs depend on next period's realization of the Markov state.
* In an $N$ state Markov state version, $N$ such securities are traded each period.
* In a continuous state Markov state version, a continuum of such securities are traded each period.

These state-contingent securities are commonly called Arrow securities, after Kenneth Arrow <https://en.wikipedia.org/wiki/Kenneth_Arrow>
These state-contingent securities are commonly called Arrow securities, after [Kenneth Arrow](https://en.wikipedia.org/wiki/Kenneth_Arrow).

In the **incomplete markets version**, the consumer can buy and sell only one security each period, a risk-free one-period bond with gross
one-period return $\beta^{-1}$.
Expand Down
2 changes: 1 addition & 1 deletion lectures/von_neumann_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The code below provides the `Neumann` class

```{code-cell} python3
---
tags: [output_scroll]
tags: [collapse-20]
---
class Neumann(object):
Expand Down

1 comment on commit 59046d7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.