From 7e028b197a6ceeb593c38f5c36d27da4641a0ac2 Mon Sep 17 00:00:00 2001 From: Shu Hu Date: Fri, 18 Jun 2021 13:13:51 +1000 Subject: [PATCH 1/5] [matsuyama] resize inserted figures (#70) --- lectures/matsuyama.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lectures/matsuyama.md b/lectures/matsuyama.md index 56fb20ba..aa26b38e 100644 --- a/lectures/matsuyama.md +++ b/lectures/matsuyama.md @@ -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. @@ -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 From f489ae7ec41c6d1beaf36f8d00dc4d31aa68171b Mon Sep 17 00:00:00 2001 From: Shu Hu Date: Sun, 20 Jun 2021 11:57:32 +1000 Subject: [PATCH 2/5] [orth_proj] [smoothing] write links implicitly (#71) --- lectures/orth_proj.md | 4 ++-- lectures/smoothing.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lectures/orth_proj.md b/lectures/orth_proj.md index 78e19ae6..ba38b73f 100644 --- a/lectures/orth_proj.md +++ b/lectures/orth_proj.md @@ -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 @@ -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 diff --git a/lectures/smoothing.md b/lectures/smoothing.md index 2deefb46..16df73b6 100644 --- a/lectures/smoothing.md +++ b/lectures/smoothing.md @@ -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 +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}$. From 0e1ecbe24797b669abeb9ed469a32e189c3c00c0 Mon Sep 17 00:00:00 2001 From: mmcky Date: Mon, 21 Jun 2021 15:25:23 +1000 Subject: [PATCH 3/5] Upgrade to quantecon-book-theme=0.2.4 (#73) --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index d4ea6cd2..513f6aa1 100644 --- a/environment.yml +++ b/environment.yml @@ -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 From c9829fec33f80919431bffa30fb0e63224e5b88b Mon Sep 17 00:00:00 2001 From: Shu Hu Date: Mon, 21 Jun 2021 15:56:06 +1000 Subject: [PATCH 4/5] [amss] [amss2] [amss3] scroll outputs (#69) * [amss] [amss2] [amss3] scroll outputs * fix tags for code-cells Co-authored-by: mmcky --- lectures/amss.md | 4 +++- lectures/amss2.md | 7 ++++--- lectures/amss3.md | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lectures/amss.md b/lectures/amss.md index b1279fcf..ce000759 100644 --- a/lectures/amss.md +++ b/lectures/amss.md @@ -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] --- ``` @@ -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) @@ -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 diff --git a/lectures/amss2.md b/lectures/amss2.md index 3b436039..849950c6 100644 --- a/lectures/amss2.md +++ b/lectures/amss2.md @@ -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] --- ``` @@ -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() diff --git a/lectures/amss3.md b/lectures/amss3.md index 4213ab3d..a03212f3 100644 --- a/lectures/amss3.md +++ b/lectures/amss3.md @@ -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] --- ``` @@ -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)), From 7d072c7d40e19f81d6125c8dcb8fbff0cab77874 Mon Sep 17 00:00:00 2001 From: mmcky Date: Mon, 21 Jun 2021 16:12:51 +1000 Subject: [PATCH 5/5] Fix scroll_output and collapse-20 tags for file imports (#72) * Fix scoll_output and collapse-20 tags for file imports * should be collapse-20 --- lectures/additive_functionals.md | 2 +- lectures/chang_credible.md | 2 +- lectures/von_neumann_model.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lectures/additive_functionals.md b/lectures/additive_functionals.md index 3d4893f5..7aace886 100644 --- a/lectures/additive_functionals.md +++ b/lectures/additive_functionals.md @@ -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): diff --git a/lectures/chang_credible.md b/lectures/chang_credible.md index 2c8adbd0..fd8e8a2d 100644 --- a/lectures/chang_credible.md +++ b/lectures/chang_credible.md @@ -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] --- ``` diff --git a/lectures/von_neumann_model.md b/lectures/von_neumann_model.md index 0aec38e4..8fd23d66 100644 --- a/lectures/von_neumann_model.md +++ b/lectures/von_neumann_model.md @@ -61,7 +61,7 @@ The code below provides the `Neumann` class ```{code-cell} python3 --- -tags: [output_scroll] +tags: [collapse-20] --- class Neumann(object):