From f8fda8f05f7a34583f5fb3b4e3a987a518bc3573 Mon Sep 17 00:00:00 2001 From: quantecon-services Date: Tue, 8 Oct 2024 06:45:36 +0000 Subject: [PATCH] auto publishing updates to notebooks --- BCG_complete_mkts.ipynb | 80 +++---- BCG_incomplete_mkts.ipynb | 108 +++++----- additive_functionals.ipynb | 92 ++++---- amss.ipynb | 104 ++++----- amss2.ipynb | 128 ++++++------ amss3.ipynb | 166 +++++++-------- arellano.ipynb | 92 ++++---- arma.ipynb | 108 +++++----- asset_pricing_lph.ipynb | 124 +++++------ black_litterman.ipynb | 72 +++---- calvo.ipynb | 190 ++++++++--------- calvo_machine_learn.ipynb | 336 +++++++++++++++--------------- cattle_cycles.ipynb | 62 +++--- chang_credible.ipynb | 66 +++--- chang_ramsey.ipynb | 92 ++++---- classical_filtering.ipynb | 86 ++++---- coase.ipynb | 88 ++++---- cons_news.ipynb | 82 ++++---- discrete_dp.ipynb | 216 +++++++++---------- dyn_stack.ipynb | 130 ++++++------ entropy.ipynb | 58 +++--- estspec.ipynb | 52 ++--- five_preferences.ipynb | 174 ++++++++-------- growth_in_dles.ipynb | 100 ++++----- hs_invertibility_example.ipynb | 46 ++-- hs_recursive_models.ipynb | 126 +++++------ intro.ipynb | 22 +- irfs_in_hall_model.ipynb | 54 ++--- knowing_forecasts_of_others.ipynb | 202 +++++++++--------- lqramsey.ipynb | 82 ++++---- lu_tricks.ipynb | 68 +++--- lucas_asset_pricing_dles.ipynb | 60 +++--- lucas_model.ipynb | 62 +++--- markov_jump_lq.ipynb | 126 +++++------ matsuyama.ipynb | 54 ++--- muth_kalman.ipynb | 58 +++--- opt_tax_recur.ipynb | 104 ++++----- orth_proj.ipynb | 90 ++++---- permanent_income_dles.ipynb | 32 +-- rob_markov_perf.ipynb | 76 +++---- robustness.ipynb | 66 +++--- rosen_schooling_model.ipynb | 50 ++--- smoothing.ipynb | 62 +++--- smoothing_tax.ipynb | 110 +++++----- stationary_densities.ipynb | 92 ++++---- status.ipynb | 108 +++++----- tax_smoothing_1.ipynb | 78 +++---- tax_smoothing_2.ipynb | 56 ++--- tax_smoothing_3.ipynb | 38 ++-- troubleshooting.ipynb | 10 +- un_insure.ipynb | 92 ++++---- zreferences.ipynb | 213 +++++++++---------- 52 files changed, 2528 insertions(+), 2515 deletions(-) diff --git a/BCG_complete_mkts.ipynb b/BCG_complete_mkts.ipynb index 0b386e6..ac317aa 100644 --- a/BCG_complete_mkts.ipynb +++ b/BCG_complete_mkts.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "fea5287e", + "id": "8dbe2d10", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "f187a184", + "id": "7a190309", "metadata": {}, "source": [ "# Irrelevance of Capital Structures with Complete Markets\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04a85532", + "id": "5cebe13a", "metadata": { "hide-output": false }, @@ -34,13 +34,13 @@ }, { "cell_type": "markdown", - "id": "b33bc75d", + "id": "f62cc309", "metadata": {}, "source": [ "## Introduction\n", "\n", "This is a prolegomenon to another lecture [Equilibrium Capital Structures with Incomplete Markets](https://python-advanced.quantecon.org/BCG_incomplete_mkts.html) about a model with\n", - "incomplete markets authored by Bisin, Clementi, and Gottardi [[Bisin *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id29)].\n", + "incomplete markets authored by Bisin, Clementi, and Gottardi [[Bisin *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id30)].\n", "\n", "We adopt specifications of preferences and technologies very close to\n", "Bisin, Clemente, and Gottardi’s but unlike them assume that there are complete\n", @@ -56,7 +56,7 @@ "- illustrating classic complete markets outcomes that include \n", " - indeterminacy of consumers’ portfolio choices \n", " - indeterminacy of firms’ financial structures that underlies a\n", - " Modigliani-Miller theorem [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id30)] \n", + " Modigliani-Miller theorem [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id31)] \n", "- introducing `Big K, little k` issues in a simple context that will\n", " recur in the BCG incomplete markets environment \n", "\n", @@ -67,7 +67,7 @@ }, { "cell_type": "markdown", - "id": "90866abb", + "id": "aa4ee140", "metadata": {}, "source": [ "### Setup\n", @@ -100,7 +100,7 @@ }, { "cell_type": "markdown", - "id": "7bca736f", + "id": "c63c69e9", "metadata": {}, "source": [ "### Endowments\n", @@ -125,7 +125,7 @@ }, { "cell_type": "markdown", - "id": "0031becf", + "id": "a50ec750", "metadata": {}, "source": [ "### Technology:\n", @@ -142,7 +142,7 @@ }, { "cell_type": "markdown", - "id": "bfffeecb", + "id": "9785559f", "metadata": {}, "source": [ "### Preferences:\n", @@ -167,7 +167,7 @@ }, { "cell_type": "markdown", - "id": "d3c99898", + "id": "97c078cc", "metadata": {}, "source": [ "### Parameterizations\n", @@ -190,7 +190,7 @@ }, { "cell_type": "markdown", - "id": "0b911518", + "id": "13b637a3", "metadata": {}, "source": [ "### Pareto criterion and planning problem\n", @@ -248,7 +248,7 @@ }, { "cell_type": "markdown", - "id": "947213a7", + "id": "1ee74d5a", "metadata": {}, "source": [ "### Helpful observations and bookkeeping\n", @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "6306f398", + "id": "6caa3524", "metadata": {}, "source": [ "#### Remarks\n", @@ -348,7 +348,7 @@ }, { "cell_type": "markdown", - "id": "c1f60461", + "id": "6c09cb5b", "metadata": {}, "source": [ "## Competitive equilibrium\n", @@ -367,7 +367,7 @@ }, { "cell_type": "markdown", - "id": "612b14a8", + "id": "6799104a", "metadata": {}, "source": [ "### Measures of agents and firms\n", @@ -419,7 +419,7 @@ }, { "cell_type": "markdown", - "id": "2b71afd5", + "id": "4ba71217", "metadata": {}, "source": [ "#### Ownership\n", @@ -459,7 +459,7 @@ }, { "cell_type": "markdown", - "id": "586e1ae6", + "id": "c578d4c0", "metadata": {}, "source": [ "#### Asset markets\n", @@ -478,7 +478,7 @@ }, { "cell_type": "markdown", - "id": "ef40b69a", + "id": "27b8d073", "metadata": {}, "source": [ "### Objects appearing in a competitive equilibrium\n", @@ -507,7 +507,7 @@ }, { "cell_type": "markdown", - "id": "472550a2", + "id": "be0b84b6", "metadata": {}, "source": [ "### A representative firm’s problem\n", @@ -554,7 +554,7 @@ }, { "cell_type": "markdown", - "id": "59b4fc2b", + "id": "8dfe0b80", "metadata": {}, "source": [ "### A consumer’s problem\n", @@ -727,7 +727,7 @@ }, { "cell_type": "markdown", - "id": "58c5c404", + "id": "65fefb84", "metadata": {}, "source": [ "### Computing competitive equilibrium prices and quantities\n", @@ -822,7 +822,7 @@ }, { "cell_type": "markdown", - "id": "d888ed5d", + "id": "5884b29a", "metadata": {}, "source": [ "### Modigliani-Miller theorem\n", @@ -879,7 +879,7 @@ "which is the same expression that we obtained above when we assumed that\n", "the firm issued only equity.\n", "\n", - "We thus obtain a version of the celebrated Modigliani-Miller theorem [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id30)]\n", + "We thus obtain a version of the celebrated Modigliani-Miller theorem [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id31)]\n", "about firms’ finance:\n", "\n", "**Modigliani-Miller theorem:**\n", @@ -904,7 +904,7 @@ }, { "cell_type": "markdown", - "id": "c0fa5ef0", + "id": "d9478b73", "metadata": {}, "source": [ "## Code\n", @@ -978,7 +978,7 @@ { "cell_type": "code", "execution_count": null, - "id": "024ebc28", + "id": "1ae11a90", "metadata": { "hide-output": false }, @@ -994,7 +994,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ebeaf90", + "id": "27489317", "metadata": { "hide-output": false }, @@ -1189,7 +1189,7 @@ }, { "cell_type": "markdown", - "id": "2bbd853a", + "id": "2012e598", "metadata": {}, "source": [ "### Examples\n", @@ -1199,7 +1199,7 @@ }, { "cell_type": "markdown", - "id": "de2a9267", + "id": "d097b234", "metadata": {}, "source": [ "#### 1st example\n", @@ -1218,7 +1218,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0d19519c", + "id": "39911897", "metadata": { "hide-output": false }, @@ -1231,7 +1231,7 @@ }, { "cell_type": "markdown", - "id": "a5f707e1", + "id": "c9bda2c7", "metadata": {}, "source": [ "Let’s plot the agents’ time-1 endowments with respect to shocks to see\n", @@ -1241,7 +1241,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c7f7f19", + "id": "6198bcf2", "metadata": { "hide-output": false }, @@ -1278,7 +1278,7 @@ }, { "cell_type": "markdown", - "id": "6134bcc5", + "id": "776ca2cc", "metadata": {}, "source": [ "Let’s also compare the optimal capital stock, $ k $, and optimal\n", @@ -1288,7 +1288,7 @@ { "cell_type": "code", "execution_count": null, - "id": "74abae50", + "id": "9a303e5f", "metadata": { "hide-output": false }, @@ -1311,7 +1311,7 @@ }, { "cell_type": "markdown", - "id": "b4773f6b", + "id": "44bf72a2", "metadata": {}, "source": [ "#### 2nd example\n", @@ -1326,7 +1326,7 @@ { "cell_type": "code", "execution_count": null, - "id": "afcbb87d", + "id": "39820c9a", "metadata": { "hide-output": false }, @@ -1358,7 +1358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84f802a8", + "id": "64411679", "metadata": { "hide-output": false }, @@ -1371,7 +1371,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bc32c11b", + "id": "72474c0b", "metadata": { "hide-output": false }, @@ -1385,7 +1385,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f137ef5b", + "id": "06d570ed", "metadata": { "hide-output": false }, @@ -1416,7 +1416,7 @@ } ], "metadata": { - "date": 1724218392.944995, + "date": 1728369867.2445648, "filename": "BCG_complete_mkts.md", "kernelspec": { "display_name": "Python", diff --git a/BCG_incomplete_mkts.ipynb b/BCG_incomplete_mkts.ipynb index 1147fae..eeb19d8 100644 --- a/BCG_incomplete_mkts.ipynb +++ b/BCG_incomplete_mkts.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "43725a98", + "id": "ac3f75e7", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "06fdcd4c", + "id": "cc142de3", "metadata": {}, "source": [ "# Equilibrium Capital Structures with Incomplete Markets\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "303fc414", + "id": "1224e0ba", "metadata": { "hide-output": false }, @@ -34,7 +34,7 @@ }, { "cell_type": "markdown", - "id": "cfafe81a", + "id": "49cecc94", "metadata": {}, "source": [ "## Introduction\n", @@ -42,7 +42,7 @@ "This is an extension of an earlier lecture [Irrelevance of Capital Structure with Complete Markets](https://python-advanced.quantecon.org/BCG_complete_mkts.html) about a **complete markets**\n", "model.\n", "\n", - "In contrast to that lecture, this one describes an instance of a model authored by Bisin, Clementi, and Gottardi [[Bisin *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id29)]\n", + "In contrast to that lecture, this one describes an instance of a model authored by Bisin, Clementi, and Gottardi [[Bisin *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id30)]\n", "in which financial markets are **incomplete**.\n", "\n", "Instead of being able to trade equities and a full set of one-period\n", @@ -54,7 +54,7 @@ "\n", "- there is a unique stochastic discount factor that prices all assets \n", "- consumers’ portfolio choices are indeterminate \n", - "- firms’ financial structures are indeterminate, so the model embodies an instance of a Modigliani-Miller irrelevance theorem [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id30)] \n", + "- firms’ financial structures are indeterminate, so the model embodies an instance of a Modigliani-Miller irrelevance theorem [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id31)] \n", "- the aggregate of all firms’ financial structures are indeterminate, a consequence of there being redundant assets \n", "\n", "\n", @@ -64,7 +64,7 @@ "- different stochastic discount factors price different assets \n", "- consumers’ portfolio choices are determinate \n", "- while **individual** firms’ financial structures are indeterminate, thus conforming to part of a Modigliani-Miller theorem,\n", - " [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id30)], the **aggregate** of all firms’ financial structures **is** determinate. \n", + " [[Modigliani and Miller, 1958](https://python-advanced.quantecon.org/zreferences.html#id31)], the **aggregate** of all firms’ financial structures **is** determinate. \n", "\n", "\n", "A `Big K, little k` analysis played an important role in the previous lecture [Irrelevance of Capital Structure with Complete Markets](https://python-advanced.quantecon.org/BCG_complete_mkts.html).\n", @@ -84,13 +84,13 @@ }, { "cell_type": "markdown", - "id": "cc61b476", + "id": "76fe500b", "metadata": {}, "source": [ "### Setup\n", "\n", "We adopt specifications of preferences and technologies used by Bisin,\n", - "Clemente, and Gottardi (2018) [[Bisin *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id29)] and in our earlier lecture on a complete markets\n", + "Clemente, and Gottardi (2018) [[Bisin *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id30)] and in our earlier lecture on a complete markets\n", "version of their model.\n", "\n", "The economy lasts for two periods, $ t=0, 1 $.\n", @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "cf591717", + "id": "e629e9d9", "metadata": {}, "source": [ "### Ownership\n", @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "35b03175", + "id": "f0e6c754", "metadata": {}, "source": [ "### Measures of agents and firms\n", @@ -200,7 +200,7 @@ }, { "cell_type": "markdown", - "id": "8acb0b05", + "id": "483c2974", "metadata": {}, "source": [ "### Endowments\n", @@ -217,7 +217,7 @@ }, { "cell_type": "markdown", - "id": "5d4d57b8", + "id": "16d1a6a2", "metadata": {}, "source": [ "### Feasibility:\n", @@ -236,7 +236,7 @@ }, { "cell_type": "markdown", - "id": "6a0890a1", + "id": "b86c2ab3", "metadata": {}, "source": [ "### Parameterizations\n", @@ -259,7 +259,7 @@ }, { "cell_type": "markdown", - "id": "a2e6ec18", + "id": "5253384b", "metadata": {}, "source": [ "### Preferences:\n", @@ -284,7 +284,7 @@ }, { "cell_type": "markdown", - "id": "0232aff6", + "id": "2dbd7c0a", "metadata": {}, "source": [ "### Risk-sharing motives\n", @@ -304,7 +304,7 @@ }, { "cell_type": "markdown", - "id": "6ea0d0c9", + "id": "09b27d14", "metadata": {}, "source": [ "## Asset Markets\n", @@ -360,7 +360,7 @@ }, { "cell_type": "markdown", - "id": "ce560d43", + "id": "85b71dc8", "metadata": {}, "source": [ "### Consumers\n", @@ -451,7 +451,7 @@ }, { "cell_type": "markdown", - "id": "0509410f", + "id": "c7bb9563", "metadata": {}, "source": [ "### Pricing functions\n", @@ -490,7 +490,7 @@ }, { "cell_type": "markdown", - "id": "e3e3a7c5", + "id": "421a50ec", "metadata": {}, "source": [ "### Firms\n", @@ -547,7 +547,7 @@ }, { "cell_type": "markdown", - "id": "d8543be4", + "id": "0f5bcd2c", "metadata": {}, "source": [ "#### Firm’s optimization problem\n", @@ -620,7 +620,7 @@ }, { "cell_type": "markdown", - "id": "8ae3af07", + "id": "5bcbad90", "metadata": {}, "source": [ "## Equilibrium verification\n", @@ -647,7 +647,7 @@ }, { "cell_type": "markdown", - "id": "1d38b0aa", + "id": "f1d06955", "metadata": {}, "source": [ "## Pseudo Code\n", @@ -745,7 +745,7 @@ }, { "cell_type": "markdown", - "id": "ba9394e8", + "id": "093e5a6e", "metadata": {}, "source": [ "## Code\n", @@ -792,7 +792,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ee259f0", + "id": "a2544956", "metadata": { "hide-output": false }, @@ -807,7 +807,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ae408f8", + "id": "04ae3ac9", "metadata": { "hide-output": false }, @@ -1300,7 +1300,7 @@ }, { "cell_type": "markdown", - "id": "cf6fb9d0", + "id": "e7a01c41", "metadata": {}, "source": [ "## Examples\n", @@ -1310,7 +1310,7 @@ }, { "cell_type": "markdown", - "id": "f41f56be", + "id": "62a13465", "metadata": {}, "source": [ "### First example\n", @@ -1322,7 +1322,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6d1e311f", + "id": "c8a7cc1f", "metadata": { "hide-output": false }, @@ -1335,7 +1335,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0f407f2e", + "id": "f2c70093", "metadata": { "hide-output": false }, @@ -1348,7 +1348,7 @@ }, { "cell_type": "markdown", - "id": "8e8a2b98", + "id": "f1541ac2", "metadata": {}, "source": [ "Python reports to us that the equilibrium firm value is $ V=0.101 $,\n", @@ -1365,7 +1365,7 @@ { "cell_type": "code", "execution_count": null, - "id": "317c0168", + "id": "3d37b9eb", "metadata": { "hide-output": false }, @@ -1379,7 +1379,7 @@ }, { "cell_type": "markdown", - "id": "464b50ae", + "id": "8b9b32ba", "metadata": {}, "source": [ "Up to the approximation involved in using a discrete grid, these numbers\n", @@ -1396,7 +1396,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3f1a78a9", + "id": "dcbe44f5", "metadata": { "hide-output": false }, @@ -1437,7 +1437,7 @@ }, { "cell_type": "markdown", - "id": "8a7b5059", + "id": "620922ef", "metadata": {}, "source": [ "#### A Modigliani-Miller theorem?\n", @@ -1532,7 +1532,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d38d4695", + "id": "779c9cca", "metadata": { "hide-output": false }, @@ -1756,7 +1756,7 @@ }, { "cell_type": "markdown", - "id": "81709df4", + "id": "ba6a125f", "metadata": {}, "source": [ "Here is our strategy for checking *stability* of an equilibrium.\n", @@ -1782,7 +1782,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7c390c56", + "id": "9a3bb7f6", "metadata": { "hide-output": false }, @@ -1830,7 +1830,7 @@ }, { "cell_type": "markdown", - "id": "ca847749", + "id": "16cf7e80", "metadata": {}, "source": [ "In the above 3D surface of prospective firm valuations, the perturbed\n", @@ -1848,7 +1848,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b5ac30bd", + "id": "f8b7c644", "metadata": { "hide-output": false }, @@ -1895,7 +1895,7 @@ }, { "cell_type": "markdown", - "id": "e85a8af2", + "id": "994b962a", "metadata": {}, "source": [ "In contrast to $ (k^*,b^* - e) $, the 3D surface for\n", @@ -1915,7 +1915,7 @@ { "cell_type": "code", "execution_count": null, - "id": "74985a91", + "id": "d24d6a4d", "metadata": { "hide-output": false }, @@ -1926,7 +1926,7 @@ }, { "cell_type": "markdown", - "id": "d0c86ea0", + "id": "4e66a8f8", "metadata": {}, "source": [ "Our two *stability experiments* suggest that the equilibrium capital\n", @@ -1940,7 +1940,7 @@ }, { "cell_type": "markdown", - "id": "3110988c", + "id": "3e0403c8", "metadata": {}, "source": [ "#### Equilibrium equity and bond price functions\n", @@ -1953,7 +1953,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7746545e", + "id": "de3834f4", "metadata": { "hide-output": false }, @@ -1991,7 +1991,7 @@ { "cell_type": "code", "execution_count": null, - "id": "152bef40", + "id": "66665e95", "metadata": { "hide-output": false }, @@ -2028,7 +2028,7 @@ }, { "cell_type": "markdown", - "id": "6c12213a", + "id": "baabfb55", "metadata": {}, "source": [ "### Comments on equilibrium pricing functions\n", @@ -2044,7 +2044,7 @@ }, { "cell_type": "markdown", - "id": "5b2661c1", + "id": "be611c68", "metadata": {}, "source": [ "### Another example economy\n", @@ -2070,7 +2070,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4fc525fe", + "id": "622be040", "metadata": { "hide-output": false }, @@ -2125,7 +2125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9690ec3", + "id": "932f8b94", "metadata": { "hide-output": false }, @@ -2164,7 +2164,7 @@ }, { "cell_type": "markdown", - "id": "ac38aadd", + "id": "46251000", "metadata": {}, "source": [ "## A picture worth a thousand words\n", @@ -2184,7 +2184,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6a1d216a", + "id": "c81f464d", "metadata": { "hide-output": false }, @@ -2216,7 +2216,7 @@ }, { "cell_type": "markdown", - "id": "4208c9e6", + "id": "2301597a", "metadata": {}, "source": [ "It is rewarding to stare at the above plots too.\n", @@ -2232,7 +2232,7 @@ } ], "metadata": { - "date": 1724218393.0077183, + "date": 1728369867.305326, "filename": "BCG_incomplete_mkts.md", "kernelspec": { "display_name": "Python", diff --git a/additive_functionals.ipynb b/additive_functionals.ipynb index 5d9a65d..ba60b79 100644 --- a/additive_functionals.ipynb +++ b/additive_functionals.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0cb0be6d", + "id": "16720ae7", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "d2e5631e", + "id": "0e6e4d6e", "metadata": {}, "source": [ "# Additive and Multiplicative Functionals\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97a3ce3c", + "id": "6b0e6428", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "9c422afa", + "id": "418e4c3f", "metadata": {}, "source": [ "## Overview\n", @@ -48,7 +48,7 @@ "\n", "But there are good ways to model time series that have persistent growth that still enable statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.\n", "\n", - "Thus, [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id240)] described two classes of time series models that accommodate growth.\n", + "Thus, [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id241)] described two classes of time series models that accommodate growth.\n", "\n", "They are\n", "\n", @@ -72,7 +72,7 @@ "\n", "We describe how to construct, simulate, and interpret these components.\n", "\n", - "More details about these concepts and algorithms can be found in Hansen [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id240)] and Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id241)].\n", + "More details about these concepts and algorithms can be found in Hansen [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id241)] and Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id242)].\n", "\n", "Let’s start with some imports:" ] @@ -80,7 +80,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1e1461b0", + "id": "481e0dda", "metadata": { "hide-output": false }, @@ -95,12 +95,12 @@ }, { "cell_type": "markdown", - "id": "4d4700b4", + "id": "96b3270c", "metadata": {}, "source": [ "## A Particular Additive Functional\n", "\n", - "[[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id240)] describes a general class of additive functionals.\n", + "[[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id241)] describes a general class of additive functionals.\n", "\n", "This lecture focuses on a subclass of these: a scalar process $ \\{y_t\\}_{t=0}^\\infty $ whose increments are driven by a Gaussian vector autoregression.\n", "\n", @@ -149,7 +149,7 @@ }, { "cell_type": "markdown", - "id": "f5439968", + "id": "0aff88d0", "metadata": {}, "source": [ "### Linear State-Space Representation\n", @@ -220,7 +220,7 @@ }, { "cell_type": "markdown", - "id": "54627e4d", + "id": "e151067c", "metadata": {}, "source": [ "## Dynamics\n", @@ -269,14 +269,14 @@ }, { "cell_type": "markdown", - "id": "0d56afd6", + "id": "31de353c", "metadata": {}, "source": [ "### Simulation\n", "\n", "When simulating we embed our variables into a bigger system.\n", "\n", - "This system also constructs the components of the decompositions of $ y_t $ and of $ \\exp(y_t) $ proposed by Hansen [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id240)].\n", + "This system also constructs the components of the decompositions of $ y_t $ and of $ \\exp(y_t) $ proposed by Hansen [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id241)].\n", "\n", "All of these objects are computed using the code below\n", "\n", @@ -287,7 +287,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7711f4bd", + "id": "2d53ba69", "metadata": { "hide-output": false }, @@ -447,7 +447,7 @@ }, { "cell_type": "markdown", - "id": "576187a1", + "id": "d8388619", "metadata": {}, "source": [ "#### Plotting\n", @@ -458,7 +458,7 @@ { "cell_type": "code", "execution_count": null, - "id": "319da315", + "id": "2be5a07c", "metadata": { "hide-output": false }, @@ -741,7 +741,7 @@ }, { "cell_type": "markdown", - "id": "e06fcace", + "id": "a21b3cd8", "metadata": {}, "source": [ "For now, we just plot $ y_t $ and $ x_t $, postponing until later a description of exactly how we compute them.\n", @@ -753,7 +753,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cfa98a6c", + "id": "c62d2747", "metadata": { "hide-output": false }, @@ -792,7 +792,7 @@ }, { "cell_type": "markdown", - "id": "24906896", + "id": "5d0dad0f", "metadata": {}, "source": [ "Notice the irregular but persistent growth in $ y_t $." @@ -800,12 +800,12 @@ }, { "cell_type": "markdown", - "id": "bba96fed", + "id": "bf17f847", "metadata": {}, "source": [ "### Decomposition\n", "\n", - "Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id241)] describe how to construct a decomposition of\n", + "Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id242)] describe how to construct a decomposition of\n", "an additive functional into four parts:\n", "\n", "- a constant inherited from initial values $ x_0 $ and $ y_0 $ \n", @@ -825,7 +825,7 @@ "\\end{aligned}\n", "$$\n", "\n", - "Then the Hansen [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id240)], [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id241)] decomposition is\n", + "Then the Hansen [[Hansen, 2012](https://python-advanced.quantecon.org/zreferences.html#id241)], [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id242)] decomposition is\n", "\n", "$$\n", "\\begin{aligned}\n", @@ -936,7 +936,7 @@ }, { "cell_type": "markdown", - "id": "607f4aff", + "id": "5a8ed0a3", "metadata": {}, "source": [ "## Code\n", @@ -959,7 +959,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46beb7df", + "id": "12e0640d", "metadata": { "hide-output": false }, @@ -971,7 +971,7 @@ }, { "cell_type": "markdown", - "id": "76cd703b", + "id": "c75adb39", "metadata": {}, "source": [ "When we plot multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plot the population 95% probability coverage sets computed using the LinearStateSpace class.\n", @@ -988,7 +988,7 @@ }, { "cell_type": "markdown", - "id": "9e9750fe", + "id": "0aa88715", "metadata": {}, "source": [ "### Associated Multiplicative Functional\n", @@ -1035,7 +1035,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f17cde09", + "id": "fa955ab5", "metadata": { "hide-output": false }, @@ -1047,7 +1047,7 @@ }, { "cell_type": "markdown", - "id": "7715aa9c", + "id": "8ed7a52b", "metadata": {}, "source": [ "As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plotted population 95% confidence bands computed using the LinearStateSpace class.\n", @@ -1065,12 +1065,12 @@ }, { "cell_type": "markdown", - "id": "50a85e51", + "id": "8445ecee", "metadata": {}, "source": [ "### Peculiar Large Sample Property\n", "\n", - "Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id241)] (ch. 8) describe the following two properties of the martingale component\n", + "Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id242)] (ch. 8) describe the following two properties of the martingale component\n", "$ \\widetilde M_t $ of the multiplicative decomposition\n", "\n", "- while $ E_0 \\widetilde M_t = 1 $ for all $ t \\geq 0 $,\n", @@ -1082,7 +1082,7 @@ "The first property follows from the fact that $ \\widetilde M_t $ is a multiplicative martingale with initial condition\n", "$ \\widetilde M_0 = 1 $.\n", "\n", - "The second is a **peculiar property** noted and proved by Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id241)].\n", + "The second is a **peculiar property** noted and proved by Hansen and Sargent [[Hansen and Sargent, 2024](https://python-advanced.quantecon.org/zreferences.html#id242)].\n", "\n", "The following simulation of many paths of $ \\widetilde M_t $ illustrates both properties" ] @@ -1090,7 +1090,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72c8ed75", + "id": "96a629c7", "metadata": { "hide-output": false }, @@ -1103,7 +1103,7 @@ }, { "cell_type": "markdown", - "id": "3c08b0bf", + "id": "132a50d0", "metadata": {}, "source": [ "The dotted line in the above graph is the mean $ E \\tilde M_t = 1 $ of the martingale.\n", @@ -1115,7 +1115,7 @@ }, { "cell_type": "markdown", - "id": "b5133c3e", + "id": "8a458c5b", "metadata": {}, "source": [ "## More About the Multiplicative Martingale\n", @@ -1136,7 +1136,7 @@ }, { "cell_type": "markdown", - "id": "404b7f22", + "id": "2599f0ba", "metadata": {}, "source": [ "### Simulating a Multiplicative Martingale Again\n", @@ -1153,7 +1153,7 @@ }, { "cell_type": "markdown", - "id": "4a3c8715", + "id": "b8e5630e", "metadata": {}, "source": [ "### Sample Paths\n", @@ -1166,7 +1166,7 @@ { "cell_type": "code", "execution_count": null, - "id": "270fc4c5", + "id": "090b4aeb", "metadata": { "hide-output": false }, @@ -1278,7 +1278,7 @@ }, { "cell_type": "markdown", - "id": "53815eae", + "id": "a66c0e33", "metadata": {}, "source": [ "The heavy lifting is done inside the `AMF_LSS_VAR` class.\n", @@ -1289,7 +1289,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8df838ff", + "id": "e1606540", "metadata": { "hide-output": false }, @@ -1339,7 +1339,7 @@ }, { "cell_type": "markdown", - "id": "52a90f62", + "id": "51a3bf81", "metadata": {}, "source": [ "Now that we have these functions in our toolkit, let’s apply them to run some\n", @@ -1349,7 +1349,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90783c0c", + "id": "6f7ec8e4", "metadata": { "hide-output": false }, @@ -1392,7 +1392,7 @@ }, { "cell_type": "markdown", - "id": "055fdad3", + "id": "179b1c12", "metadata": {}, "source": [ "Let’s plot the probability density functions for $ \\log {\\widetilde M}_t $ for\n", @@ -1419,7 +1419,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d94d51d0", + "id": "bb289659", "metadata": { "hide-output": false }, @@ -1474,7 +1474,7 @@ }, { "cell_type": "markdown", - "id": "9db3953a", + "id": "dc96df13", "metadata": {}, "source": [ "These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale\n", @@ -1489,7 +1489,7 @@ }, { "cell_type": "markdown", - "id": "4df89b91", + "id": "c86ffe1f", "metadata": {}, "source": [ "### Multiplicative Martingale as Likelihood Ratio Process\n", @@ -1505,7 +1505,7 @@ } ], "metadata": { - "date": 1724218393.0449455, + "date": 1728369867.3433933, "filename": "additive_functionals.md", "kernelspec": { "display_name": "Python", diff --git a/amss.ipynb b/amss.ipynb index a9b2e2a..9b497e2 100644 --- a/amss.ipynb +++ b/amss.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "263c1f77", + "id": "7d1823a3", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "2304ea9b", + "id": "93eb9b49", "metadata": {}, "source": [ "# Optimal Taxation without State-Contingent Debt\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c33bf9ce", + "id": "3e863c37", "metadata": { "hide-output": false }, @@ -34,7 +34,7 @@ }, { "cell_type": "markdown", - "id": "4b31da6a", + "id": "7f6d2121", "metadata": {}, "source": [ "## Overview\n", @@ -45,7 +45,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ca4bbf23", + "id": "73a4383d", "metadata": { "hide-output": false }, @@ -62,14 +62,14 @@ }, { "cell_type": "markdown", - "id": "6e161596", + "id": "4712840f", "metadata": {}, "source": [ "In [an earlier lecture](https://python-advanced.quantecon.org/opt_tax_recur.html), we described a model of\n", "optimal taxation with state-contingent debt due to\n", - "Robert E. Lucas, Jr., and Nancy Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)].\n", + "Robert E. Lucas, Jr., and Nancy Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)].\n", "\n", - "Aiyagari, Marcet, Sargent, and Seppälä [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] (hereafter, AMSS)\n", + "Aiyagari, Marcet, Sargent, and Seppälä [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] (hereafter, AMSS)\n", "studied optimal taxation in a model without state-contingent debt.\n", "\n", "In this lecture, we\n", @@ -86,7 +86,7 @@ }, { "cell_type": "markdown", - "id": "f0511fdc", + "id": "13ec2d16", "metadata": {}, "source": [ "## Competitive Equilibrium with Distorting Taxes\n", @@ -141,16 +141,16 @@ "\n", "Lucas and Stokey assumed that there are complete markets in one-period Arrow securities; also see [smoothing models](https://python-advanced.quantecon.org/smoothing.html).\n", "\n", - "It is at this point that AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] modify the Lucas and Stokey economy.\n", + "It is at this point that AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] modify the Lucas and Stokey economy.\n", "\n", "AMSS allow the government to issue only one-period risk-free debt each period.\n", "\n", - "Ruling out complete markets in this way is a step in the direction of making total tax collections behave more like that prescribed in Robert Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] than they do in Lucas and Stokey (1983) [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)]." + "Ruling out complete markets in this way is a step in the direction of making total tax collections behave more like that prescribed in Robert Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] than they do in Lucas and Stokey (1983) [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)]." ] }, { "cell_type": "markdown", - "id": "56953861", + "id": "566ca7c6", "metadata": {}, "source": [ "### Risk-free One-Period Debt Only\n", @@ -284,7 +284,7 @@ }, { "cell_type": "markdown", - "id": "40eda5a3", + "id": "1a3cabbc", "metadata": {}, "source": [ "### Comparison with Lucas-Stokey Economy\n", @@ -300,7 +300,7 @@ }, { "cell_type": "markdown", - "id": "6853678d", + "id": "ebc8904d", "metadata": {}, "source": [ "### Ramsey Problem Without State-contingent Debt\n", @@ -338,7 +338,7 @@ }, { "cell_type": "markdown", - "id": "3f453064", + "id": "ae31ac9e", "metadata": {}, "source": [ "#### Lagrangian Formulation\n", @@ -374,7 +374,7 @@ }, { "cell_type": "markdown", - "id": "2286946b", + "id": "3ad4aa14", "metadata": {}, "source": [ "### Some Calculations\n", @@ -464,7 +464,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1446e783", + "id": "efe062f9", "metadata": { "hide-output": false }, @@ -672,7 +672,7 @@ }, { "cell_type": "markdown", - "id": "24381bbb", + "id": "77dd243a", "metadata": {}, "source": [ "To analyze the AMSS model, we find it useful to adopt a recursive formulation\n", @@ -681,7 +681,7 @@ }, { "cell_type": "markdown", - "id": "e57d12f4", + "id": "dcb2a923", "metadata": {}, "source": [ "## Recursive Version of AMSS Model\n", @@ -704,7 +704,7 @@ }, { "cell_type": "markdown", - "id": "649abb15", + "id": "9f19925f", "metadata": {}, "source": [ "### Recasting State Variables\n", @@ -718,7 +718,7 @@ "where $ R_t(s^t) $ is the gross risk-free rate of interest between $ t $\n", "and $ t+1 $ at history $ s^t $ and $ T_t(s^t) $ are non-negative transfers.\n", "\n", - "Throughout this lecture, we shall set transfers to zero (for some issues about the limiting behavior of debt, this is possibly an important difference from AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)], who restricted transfers\n", + "Throughout this lecture, we shall set transfers to zero (for some issues about the limiting behavior of debt, this is possibly an important difference from AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)], who restricted transfers\n", "to be non-negative).\n", "\n", "In this case, the household faces a sequence of budget constraints\n", @@ -773,7 +773,7 @@ }, { "cell_type": "markdown", - "id": "6a037852", + "id": "c3242da7", "metadata": {}, "source": [ "### Measurability Constraints\n", @@ -802,7 +802,7 @@ }, { "cell_type": "markdown", - "id": "827aa498", + "id": "4467795e", "metadata": {}, "source": [ "### Two Bellman Equations\n", @@ -866,7 +866,7 @@ }, { "cell_type": "markdown", - "id": "1f75d212", + "id": "19c68b6d", "metadata": {}, "source": [ "### Martingale Supercedes State-Variable Degeneracy\n", @@ -915,7 +915,7 @@ }, { "cell_type": "markdown", - "id": "395b700b", + "id": "bebea2cc", "metadata": {}, "source": [ "### Exercise 44.1\n", @@ -927,7 +927,7 @@ }, { "cell_type": "markdown", - "id": "9dc4048b", + "id": "948294a7", "metadata": {}, "source": [ "### Absence of State Variable Degeneracy\n", @@ -956,14 +956,14 @@ }, { "cell_type": "markdown", - "id": "d8f3117b", + "id": "482e6b36", "metadata": {}, "source": [ "### Digression on Non-negative Transfers\n", "\n", "Throughout this lecture, we have imposed that transfers $ T_t = 0 $.\n", "\n", - "AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] instead imposed a nonnegativity\n", + "AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] instead imposed a nonnegativity\n", "constraint $ T_t\\geq 0 $ on transfers.\n", "\n", "They also considered a special case of quasi-linear preferences,\n", @@ -993,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "be7d4b28", + "id": "fd100929", "metadata": {}, "source": [ "### Code\n", @@ -1004,7 +1004,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0c1f2d89", + "id": "3ab96500", "metadata": { "hide-output": false }, @@ -1226,7 +1226,7 @@ }, { "cell_type": "markdown", - "id": "0600106e", + "id": "d0afcb12", "metadata": {}, "source": [ "## Examples\n", @@ -1236,7 +1236,7 @@ }, { "cell_type": "markdown", - "id": "b8688b2d", + "id": "ed20edcd", "metadata": {}, "source": [ "### Anticipated One-Period War\n", @@ -1302,7 +1302,7 @@ { "cell_type": "code", "execution_count": null, - "id": "08be2984", + "id": "1f044738", "metadata": { "hide-output": false }, @@ -1358,7 +1358,7 @@ }, { "cell_type": "markdown", - "id": "c6723e4c", + "id": "7f8513e6", "metadata": {}, "source": [ "The following figure plots Ramsey plans under complete and incomplete\n", @@ -1374,7 +1374,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35bcd063", + "id": "639d3428", "metadata": { "hide-output": false }, @@ -1410,7 +1410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b59c6c86", + "id": "0b062b14", "metadata": { "hide-output": false }, @@ -1432,7 +1432,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9fa8b73e", + "id": "0af5495a", "metadata": { "hide-output": false }, @@ -1446,7 +1446,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c8869bc", + "id": "b9110958", "metadata": { "hide-output": false }, @@ -1459,7 +1459,7 @@ { "cell_type": "code", "execution_count": null, - "id": "76af8815", + "id": "d9409b76", "metadata": { "hide-output": false }, @@ -1493,7 +1493,7 @@ }, { "cell_type": "markdown", - "id": "35931a59", + "id": "c4d71522", "metadata": {}, "source": [ "How a Ramsey planner responds to war depends on the structure of the asset market.\n", @@ -1537,7 +1537,7 @@ }, { "cell_type": "markdown", - "id": "b847783f", + "id": "83178bdc", "metadata": {}, "source": [ "#### Perpetual War Alert\n", @@ -1562,7 +1562,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a0bf340c", + "id": "ecde9c6f", "metadata": { "hide-output": false }, @@ -1608,7 +1608,7 @@ }, { "cell_type": "markdown", - "id": "ed5c485d", + "id": "142d992a", "metadata": {}, "source": [ "With these preferences, Ramsey tax rates will vary even in the Lucas-Stokey\n", @@ -1622,7 +1622,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82a26db6", + "id": "089a5c91", "metadata": { "hide-output": false }, @@ -1659,7 +1659,7 @@ { "cell_type": "code", "execution_count": null, - "id": "138557ab", + "id": "91f324d6", "metadata": { "hide-output": false }, @@ -1674,7 +1674,7 @@ { "cell_type": "code", "execution_count": null, - "id": "731e17ac", + "id": "3f134aa6", "metadata": { "hide-output": false }, @@ -1686,7 +1686,7 @@ { "cell_type": "code", "execution_count": null, - "id": "148cc884", + "id": "d5c68b9a", "metadata": { "hide-output": false }, @@ -1718,7 +1718,7 @@ }, { "cell_type": "markdown", - "id": "ee5e5a48", + "id": "c2e6d5ac", "metadata": {}, "source": [ "When the government experiences a prolonged period of peace, it is able to reduce\n", @@ -1740,7 +1740,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eda9691e", + "id": "fd126f1d", "metadata": { "hide-output": false }, @@ -1756,7 +1756,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc310e92", + "id": "a039c108", "metadata": { "hide-output": false }, @@ -1784,7 +1784,7 @@ }, { "cell_type": "markdown", - "id": "0f3d26fd", + "id": "afe29240", "metadata": {}, "source": [ "

[1] In an allocation that solves the Ramsey problem and that levies distorting\n", @@ -1804,7 +1804,7 @@ } ], "metadata": { - "date": 1724218393.097513, + "date": 1728369867.3968031, "filename": "amss.md", "kernelspec": { "display_name": "Python", diff --git a/amss2.ipynb b/amss2.ipynb index 3c7598d..93f1e11 100644 --- a/amss2.ipynb +++ b/amss2.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "9216383d", + "id": "57067fac", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "c6eea145", + "id": "71ff3916", "metadata": {}, "source": [ "# Fluctuating Interest Rates Deliver Fiscal Insurance\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf4c5b94", + "id": "5df33209", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "3ae528ef", + "id": "9ecbe41b", "metadata": {}, "source": [ "## Overview\n", @@ -41,8 +41,8 @@ "This lecture extends our investigations of how optimal policies for levying a flat-rate tax on labor income and issuing government debt depend\n", "on whether there are complete markets for debt.\n", "\n", - "A Ramsey allocation and Ramsey policy in the AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] model described in [optimal taxation without state-contingent debt](https://python-advanced.quantecon.org/amss.html) generally differs\n", - "from a Ramsey allocation and Ramsey policy in the Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] model described in [optimal taxation with state-contingent debt](https://python-advanced.quantecon.org/opt_tax_recur.html).\n", + "A Ramsey allocation and Ramsey policy in the AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] model described in [optimal taxation without state-contingent debt](https://python-advanced.quantecon.org/amss.html) generally differs\n", + "from a Ramsey allocation and Ramsey policy in the Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] model described in [optimal taxation with state-contingent debt](https://python-advanced.quantecon.org/opt_tax_recur.html).\n", "\n", "This is because the implementability restriction that a competitive equilibrium with a distorting tax imposes on allocations in the Lucas-Stokey model is just one among a set of\n", "implementability conditions imposed in the AMSS model.\n", @@ -54,7 +54,7 @@ "can be traded.\n", "\n", "Differences between the Ramsey allocations in the two models indicate that at least some of the **implementability constraints** of the AMSS model of\n", - "[optimal taxation without state-contingent debt](https://python-advanced.quantecon.org/amss.html) are violated at the Ramsey allocation of a corresponding [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] model with state-contingent debt.\n", + "[optimal taxation without state-contingent debt](https://python-advanced.quantecon.org/amss.html) are violated at the Ramsey allocation of a corresponding [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] model with state-contingent debt.\n", "\n", "Another way to say this is that differences between the Ramsey allocations of the two models indicate that some of the **measurability constraints** imposed by the\n", "AMSS model are violated at the Ramsey allocation of the Lucas-Stokey model.\n", @@ -80,7 +80,7 @@ " - the **market value** $ \\frac{\\bar b}{R_t(s_t)} $ of government debt at time $ t $ varies as a time-invariant function of the Markov state $ s_t $. \n", " - fluctuations in the interest rate make gross earnings on government debt $ \\frac{\\bar b}{R_t(s_t)} $ fully insure the gross-of-gross-interest-payments government budget against fluctuations in government expenditures. \n", " - the state variable $ x $ in a recursive representation of a Ramsey plan is a time-invariant function of the Markov state for $ t \\geq 0 $. \n", - "- In this special case, the Ramsey allocation in the AMSS model agrees with that in a Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] complete markets model in which\n", + "- In this special case, the Ramsey allocation in the AMSS model agrees with that in a Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] complete markets model in which\n", " the same amount of state-contingent debt falls due in all states tomorrow \n", " - it is a situation in which the Ramsey planner loses nothing from not being able to trade state-contingent debt and being restricted to exchange only risk-free debt debt. \n", "- This outcome emerges only when we initialize government debt at a particular $ b_0 < 0 $. \n", @@ -95,7 +95,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e7bb2a48", + "id": "e9a6d93a", "metadata": { "hide-output": false }, @@ -107,12 +107,12 @@ }, { "cell_type": "markdown", - "id": "da40ad83", + "id": "d5956dac", "metadata": {}, "source": [ "## Forces at Work\n", "\n", - "The forces driving asymptotic outcomes here are examples of dynamics present in a more general class of incomplete markets models analyzed in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] (BEGS).\n", + "The forces driving asymptotic outcomes here are examples of dynamics present in a more general class of incomplete markets models analyzed in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] (BEGS).\n", "\n", "BEGS provide conditions under which government debt under a Ramsey plan converges to an invariant distribution.\n", "\n", @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "80c9b37c", + "id": "829747ff", "metadata": {}, "source": [ "## Logical Flow of Lecture\n", @@ -157,12 +157,12 @@ }, { "cell_type": "markdown", - "id": "ebb98b02", + "id": "3eebf9d5", "metadata": {}, "source": [ "### Equations from Lucas-Stokey (1983) Model\n", "\n", - "Although we are studying an AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] economy, a Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] economy plays\n", + "Although we are studying an AMSS [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] economy, a Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] economy plays\n", "an important role in the reverse-engineering calculation to be described below.\n", "\n", "For that reason, it is helpful to have key equations underlying a Ramsey plan for the Lucas-Stokey economy readily available.\n", @@ -226,7 +226,7 @@ }, { "cell_type": "markdown", - "id": "24e19936", + "id": "80806fa8", "metadata": {}, "source": [ "### Specification with CRRA Utility\n", @@ -284,7 +284,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4cbdf0de", + "id": "2f0a62cf", "metadata": { "hide-output": false }, @@ -332,7 +332,7 @@ }, { "cell_type": "markdown", - "id": "4926d1c0", + "id": "095d25f3", "metadata": {}, "source": [ "## Example Economy\n", @@ -366,7 +366,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4f8112a", + "id": "0f0b1dd0", "metadata": { "hide-output": false }, @@ -535,7 +535,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d03cb9a6", + "id": "08866df0", "metadata": { "hide-output": false }, @@ -844,7 +844,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41c182e6", + "id": "93ef260f", "metadata": { "hide-output": false }, @@ -923,7 +923,7 @@ }, { "cell_type": "markdown", - "id": "0d3e5766", + "id": "88eb1ee0", "metadata": {}, "source": [ "## Reverse Engineering Strategy\n", @@ -934,10 +934,10 @@ "with that for a Lucas-Stokey economy in which for each period $ t \\geq 0 $, the government promises to pay the **same** state-contingent\n", "amount $ \\bar b $ in each state tomorrow.\n", "\n", - "This insight tells us to find a $ b_0 $ and other fundamentals for the Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] model that make the Ramsey planner\n", + "This insight tells us to find a $ b_0 $ and other fundamentals for the Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] model that make the Ramsey planner\n", "want to borrow the same value $ \\bar b $ next period for all states and all dates.\n", "\n", - "We accomplish this by using various equations for the Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] model\n", + "We accomplish this by using various equations for the Lucas-Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] model\n", "presented in [optimal taxation with state-contingent debt](https://python-advanced.quantecon.org/opt_tax_recur.html).\n", "\n", "We use the following steps.\n", @@ -974,7 +974,7 @@ }, { "cell_type": "markdown", - "id": "2ca9c47e", + "id": "16b905bb", "metadata": {}, "source": [ "## Code for Reverse Engineering\n", @@ -985,7 +985,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f2f51e80", + "id": "d0fecd97", "metadata": { "hide-output": false }, @@ -1031,7 +1031,7 @@ }, { "cell_type": "markdown", - "id": "9791d14a", + "id": "73b1a339", "metadata": {}, "source": [ "To recover and print out $ \\bar b $" @@ -1040,7 +1040,7 @@ { "cell_type": "code", "execution_count": null, - "id": "593c5f31", + "id": "1c9b5727", "metadata": { "hide-output": false }, @@ -1052,7 +1052,7 @@ }, { "cell_type": "markdown", - "id": "2b7e0022", + "id": "e5bd194e", "metadata": {}, "source": [ "To complete the reverse engineering exercise by jointly determining $ c_0, b_0 $, we\n", @@ -1062,7 +1062,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8381cebe", + "id": "54e692bd", "metadata": { "hide-output": false }, @@ -1089,7 +1089,7 @@ }, { "cell_type": "markdown", - "id": "45dd5fbd", + "id": "3487dadb", "metadata": {}, "source": [ "To solve the equations for $ c_0, b_0 $, we use SciPy’s fsolve function" @@ -1098,7 +1098,7 @@ { "cell_type": "code", "execution_count": null, - "id": "084fc9f6", + "id": "50f97168", "metadata": { "hide-output": false }, @@ -1111,7 +1111,7 @@ }, { "cell_type": "markdown", - "id": "3f7ebd7c", + "id": "37677604", "metadata": {}, "source": [ "Thus, we have reverse engineered an initial $ b0 = -1.038698407551764 $ that ought to render the AMSS measurability constraints slack." @@ -1119,7 +1119,7 @@ }, { "cell_type": "markdown", - "id": "850a0630", + "id": "e4110dfe", "metadata": {}, "source": [ "## Short Simulation for Reverse-engineered: Initial Debt\n", @@ -1133,7 +1133,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f2d4a16", + "id": "943333a8", "metadata": { "hide-output": false }, @@ -1181,7 +1181,7 @@ }, { "cell_type": "markdown", - "id": "7b9652f8", + "id": "c2359722", "metadata": {}, "source": [ "The Ramsey allocations and Ramsey outcomes are **identical** for the Lucas-Stokey and AMSS economies.\n", @@ -1195,7 +1195,7 @@ }, { "cell_type": "markdown", - "id": "8a03bf33", + "id": "dd544b31", "metadata": {}, "source": [ "## Long Simulation\n", @@ -1230,7 +1230,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90a2b4ca", + "id": "8a4fa14a", "metadata": { "hide-output": false }, @@ -1258,7 +1258,7 @@ }, { "cell_type": "markdown", - "id": "aba2bd1c", + "id": "b1d0c5ac", "metadata": {}, "source": [ "### Remarks about Long Simulation\n", @@ -1279,14 +1279,14 @@ }, { "cell_type": "markdown", - "id": "83cf74b3", + "id": "9ac53d32", "metadata": {}, "source": [ "## BEGS Approximations of Limiting Debt and Convergence Rate\n", "\n", - "It is useful to link the outcome of our reverse engineering exercise to limiting approximations constructed by BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)].\n", + "It is useful to link the outcome of our reverse engineering exercise to limiting approximations constructed by BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)].\n", "\n", - "BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] used a slightly different notation to represent a generalization of the AMSS model.\n", + "BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] used a slightly different notation to represent a generalization of the AMSS model.\n", "\n", "We’ll introduce a version of their notation so that readers can quickly relate notation that appears in their key formulas to the notation\n", "that we have used.\n", @@ -1303,7 +1303,7 @@ "\\end{aligned}\n", "$$\n", "\n", - "In terms of their notation, equation (44) of [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] expresses the time $ t $ state $ s $ government budget constraint as\n", + "In terms of their notation, equation (44) of [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] expresses the time $ t $ state $ s $ government budget constraint as\n", "\n", "\n", "\n", @@ -1322,7 +1322,7 @@ }, { "cell_type": "markdown", - "id": "1a43c6fa", + "id": "ef24b363", "metadata": {}, "source": [ "### Asymptotic Mean\n", @@ -1362,7 +1362,7 @@ }, { "cell_type": "markdown", - "id": "ab72ef17", + "id": "95ceca2c", "metadata": {}, "source": [ "### Rate of Convergence\n", @@ -1375,12 +1375,12 @@ "\\frac{ E_t ( {\\mathcal B}_{t+1} - {\\mathcal B}^{*} )} { ( {\\mathcal B}_{t} - {\\mathcal B}^{*} )} \\approx \\frac{1}{1 + \\beta^2 {\\rm var} ({\\mathcal R} )} \\tag{45.12}\n", "$$\n", "\n", - "(See the equation above equation (47) in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)])" + "(See the equation above equation (47) in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)])" ] }, { "cell_type": "markdown", - "id": "848a8043", + "id": "75e30725", "metadata": {}, "source": [ "### Formulas and Code Details\n", @@ -1428,7 +1428,7 @@ { "cell_type": "code", "execution_count": null, - "id": "51936fd1", + "id": "2a7be383", "metadata": { "hide-output": false }, @@ -1450,7 +1450,7 @@ }, { "cell_type": "markdown", - "id": "9b28a7bd", + "id": "540e9aea", "metadata": {}, "source": [ "Now let’s form the two random variables $ {\\mathcal R}, {\\mathcal X} $ appearing in the BEGS approximating formulas" @@ -1459,7 +1459,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2eeeb31f", + "id": "941eb0f6", "metadata": { "hide-output": false }, @@ -1485,7 +1485,7 @@ }, { "cell_type": "markdown", - "id": "9232101b", + "id": "b6d55405", "metadata": {}, "source": [ "Now let’s compute the ingredient of the approximating limit and the approximating rate of convergence" @@ -1494,7 +1494,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f85ee5d", + "id": "056577a8", "metadata": { "hide-output": false }, @@ -1508,7 +1508,7 @@ }, { "cell_type": "markdown", - "id": "7adf7890", + "id": "b810dda2", "metadata": {}, "source": [ "Print out $ \\hat b $ and $ \\bar b $" @@ -1517,7 +1517,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9e72676b", + "id": "6fe3352c", "metadata": { "hide-output": false }, @@ -1528,7 +1528,7 @@ }, { "cell_type": "markdown", - "id": "120afe7a", + "id": "1b7ba24c", "metadata": {}, "source": [ "So we have" @@ -1537,7 +1537,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e8e78abf", + "id": "83f4f453", "metadata": { "hide-output": false }, @@ -1548,7 +1548,7 @@ }, { "cell_type": "markdown", - "id": "0eca670f", + "id": "ff8f7bd6", "metadata": {}, "source": [ "These outcomes show that $ \\hat b $ does a remarkably good job of approximating $ \\bar b $.\n", @@ -1559,7 +1559,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21c779cc", + "id": "d291d98e", "metadata": { "hide-output": false }, @@ -1571,19 +1571,19 @@ }, { "cell_type": "markdown", - "id": "d7cac0ed", + "id": "38f869fd", "metadata": {}, "source": [ "This is *machine zero*, a verification that $ \\hat b $ succeeds in minimizing the nonnegative fiscal cost criterion $ J ( {\\mathcal B}^*) $ defined in\n", "BEGS and in equation [(45.13)](#equation-eqn-jcriterion) above.\n", "\n", - "Let’s push our luck and compute the mean reversion speed in the formula above equation (47) in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)]." + "Let’s push our luck and compute the mean reversion speed in the formula above equation (47) in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)]." ] }, { "cell_type": "code", "execution_count": null, - "id": "241feece", + "id": "1b46e252", "metadata": { "hide-output": false }, @@ -1596,7 +1596,7 @@ }, { "cell_type": "markdown", - "id": "c7afecd8", + "id": "f3ea9ccc", "metadata": {}, "source": [ "Now let’s compute the implied meantime to get to within 0.01 of the limit" @@ -1605,7 +1605,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3fee0314", + "id": "5d527921", "metadata": { "hide-output": false }, @@ -1617,7 +1617,7 @@ }, { "cell_type": "markdown", - "id": "b3334f5c", + "id": "188868ee", "metadata": {}, "source": [ "The slow rate of convergence and the implied time of getting within one percent of the limiting value do a good job of approximating\n", @@ -1628,7 +1628,7 @@ } ], "metadata": { - "date": 1724218393.3083384, + "date": 1728369867.449351, "filename": "amss2.md", "kernelspec": { "display_name": "Python", diff --git a/amss3.ipynb b/amss3.ipynb index c7bc22d..4d837b4 100644 --- a/amss3.ipynb +++ b/amss3.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "508d8cd8", + "id": "24b8fcd4", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "81b83199", + "id": "795f1f48", "metadata": {}, "source": [ "# Fiscal Risk and Government Debt\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87bf65e5", + "id": "8f9c33ce", "metadata": { "hide-output": false }, @@ -33,13 +33,13 @@ }, { "cell_type": "markdown", - "id": "4d8550eb", + "id": "280aeb1e", "metadata": {}, "source": [ "## Overview\n", "\n", "This lecture studies government debt in an AMSS\n", - "economy [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] of the type described in [Optimal Taxation without State-Contingent Debt](https://python-advanced.quantecon.org/amss.html).\n", + "economy [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] of the type described in [Optimal Taxation without State-Contingent Debt](https://python-advanced.quantecon.org/amss.html).\n", "\n", "We study the behavior of government debt as time $ t \\rightarrow + \\infty $.\n", "\n", @@ -53,9 +53,9 @@ "\n", "\n", "We apply tools that are applicable to more general incomplete markets economies that are presented on pages 648 - 650 in section III.D\n", - "of [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] (BEGS).\n", + "of [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] (BEGS).\n", "\n", - "We study an AMSS economy [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)] with three Markov states driving government expenditures.\n", + "We study an AMSS economy [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)] with three Markov states driving government expenditures.\n", "\n", "- In a [previous lecture](https://python-advanced.quantecon.org/amss2.html), we showed that with only two Markov states, it is possible that endogenous\n", " interest rate fluctuations eventually can support complete markets allocations and Ramsey outcomes. \n", @@ -66,14 +66,14 @@ "The lack of full spanning means that the ergodic distribution of the par value of government debt is nontrivial, in contrast to the situation\n", "in [Fiscal Insurance via Fluctuating Interest Rates](https://python-advanced.quantecon.org/amss2.html) in which the ergodic distribution of the par value of government debt is concentrated on one point.\n", "\n", - "Nevertheless, [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] (BEGS) establish that, for general settings that include ours, the Ramsey\n", + "Nevertheless, [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] (BEGS) establish that, for general settings that include ours, the Ramsey\n", "planner steers government assets to a level that comes\n", "**as close as possible** to providing full spanning in a precise a sense defined by\n", "BEGS that we describe below.\n", "\n", "We use code constructed in [Fluctuating Interest Rates Deliver Fiscal Insurance](https://python-advanced.quantecon.org/amss2.html).\n", "\n", - "**Warning:** Key equations in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] section III.D carry typos that we correct below.\n", + "**Warning:** Key equations in [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] section III.D carry typos that we correct below.\n", "\n", "Let’s start with some imports:" ] @@ -81,7 +81,7 @@ { "cell_type": "code", "execution_count": null, - "id": "83206440", + "id": "9bcafc17", "metadata": { "hide-output": false }, @@ -93,7 +93,7 @@ }, { "cell_type": "markdown", - "id": "d6278abb", + "id": "2763fdb0", "metadata": {}, "source": [ "## The Economy\n", @@ -138,7 +138,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4eae729a", + "id": "265a563c", "metadata": { "hide-output": false }, @@ -186,7 +186,7 @@ }, { "cell_type": "markdown", - "id": "51296607", + "id": "7c56fa11", "metadata": {}, "source": [ "### First and Second Moments\n", @@ -199,7 +199,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3913c634", + "id": "3ee235a7", "metadata": { "hide-output": false }, @@ -221,7 +221,7 @@ }, { "cell_type": "markdown", - "id": "04fdffc2", + "id": "c6e894fa", "metadata": {}, "source": [ "## Long Simulation\n", @@ -236,7 +236,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2a54940f", + "id": "f86ff6a2", "metadata": { "hide-output": false }, @@ -405,7 +405,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d215edf", + "id": "9956e00c", "metadata": { "hide-output": false }, @@ -714,7 +714,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9bbc77f2", + "id": "cde19618", "metadata": { "hide-output": false }, @@ -793,7 +793,7 @@ }, { "cell_type": "markdown", - "id": "b9230b56", + "id": "287c10db", "metadata": {}, "source": [ "Next, we show the code that we use to generate a very long simulation starting from initial\n", @@ -805,7 +805,7 @@ { "cell_type": "code", "execution_count": null, - "id": "07b86de9", + "id": "a60986cd", "metadata": { "hide-output": false }, @@ -846,7 +846,7 @@ }, { "cell_type": "markdown", - "id": "b2c6d2f9", + "id": "3badf9e3", "metadata": {}, "source": [ "![https://python-advanced.quantecon.org/_static/lecture_specific/amss3/amss3_g1.png](https://python-advanced.quantecon.org/_static/lecture_specific/amss3/amss3_g1.png)\n", @@ -855,7 +855,7 @@ "The long simulation apparently indicates eventual convergence to an ergodic distribution.\n", "\n", "It takes about 1000 periods to reach the ergodic distribution – an outcome that is forecast by\n", - "approximations to rates of convergence that appear in BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] and that we discuss in [Fluctuating Interest Rates Deliver Fiscal Insurance](https://python-advanced.quantecon.org/amss2.html).\n", + "approximations to rates of convergence that appear in BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] and that we discuss in [Fluctuating Interest Rates Deliver Fiscal Insurance](https://python-advanced.quantecon.org/amss2.html).\n", "\n", "Let’s discard the first 2000 observations of the simulation and construct the histogram of\n", "the par value of government debt.\n", @@ -867,7 +867,7 @@ " \n", "The black vertical line denotes the sample mean for the last 100,000 observations included in the histogram; the green vertical line denotes the\n", "value of $ \\frac{ {\\mathcal B}^*}{E u_c} $, associated with a sample from our approximation to\n", - "the ergodic distribution where $ {\\mathcal B}^* $ is a regression coefficient to be described below; the red vertical line denotes an approximation by [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] to the mean of the ergodic\n", + "the ergodic distribution where $ {\\mathcal B}^* $ is a regression coefficient to be described below; the red vertical line denotes an approximation by [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] to the mean of the ergodic\n", "distribution that can be computed **before** the ergodic distribution has been approximated, as described below.\n", "\n", "Before moving on to discuss the histogram and the vertical lines approximating the ergodic mean of government debt in more detail, the following graphs show\n", @@ -878,7 +878,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c6ebffae", + "id": "891dd170", "metadata": { "hide-output": false }, @@ -906,7 +906,7 @@ }, { "cell_type": "markdown", - "id": "84bcfe51", + "id": "6a3be4b5", "metadata": {}, "source": [ "![https://python-advanced.quantecon.org/_static/lecture_specific/amss3/amss3_g2.png](https://python-advanced.quantecon.org/_static/lecture_specific/amss3/amss3_g2.png)\n", @@ -922,24 +922,24 @@ }, { "cell_type": "markdown", - "id": "4e9596ae", + "id": "25861811", "metadata": {}, "source": [ "## Asymptotic Mean and Rate of Convergence\n", "\n", - "We apply the results of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] to interpret\n", + "We apply the results of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] to interpret\n", "\n", "- the mean of the ergodic distribution of government debt \n", "- the rate of convergence to the ergodic distribution from an arbitrary initial government debt \n", "\n", "\n", "We begin by computing objects required by the theory of section III.i\n", - "of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)].\n", + "of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)].\n", "\n", - "As in [Fiscal Insurance via Fluctuating Interest Rates](https://python-advanced.quantecon.org/amss2.html), we recall that BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] used a particular\n", + "As in [Fiscal Insurance via Fluctuating Interest Rates](https://python-advanced.quantecon.org/amss2.html), we recall that BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] used a particular\n", "notation to represent what we can regard as their generalization of an AMSS model.\n", "\n", - "We introduce some of the [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] notation so that readers can quickly relate notation that appears in key BEGS formulas to the notation\n", + "We introduce some of the [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] notation so that readers can quickly relate notation that appears in key BEGS formulas to the notation\n", "that we have used in previous lectures [here](https://python-advanced.quantecon.org/amss.html) and [here](https://python-advanced.quantecon.org/amss2.html).\n", "\n", "BEGS work with objects $ B_t, {\\mathcal B}_t, {\\mathcal R}_t, {\\mathcal X}_t $ that are related to notation that we used in\n", @@ -955,9 +955,9 @@ "\\end{aligned}\n", "$$\n", "\n", - "BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] call $ {\\mathcal X}_t $ the **effective** government deficit and $ {\\mathcal B}_t $ the **effective** government debt.\n", + "BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] call $ {\\mathcal X}_t $ the **effective** government deficit and $ {\\mathcal B}_t $ the **effective** government debt.\n", "\n", - "Equation (44) of [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] expresses the time $ t $ state $ s $ government budget constraint as\n", + "Equation (44) of [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] expresses the time $ t $ state $ s $ government budget constraint as\n", "\n", "\n", "\n", @@ -976,7 +976,7 @@ }, { "cell_type": "markdown", - "id": "e9056dbd", + "id": "413794c0", "metadata": {}, "source": [ "### Asymptotic Mean\n", @@ -1019,7 +1019,7 @@ }, { "cell_type": "markdown", - "id": "2388805e", + "id": "266b72ef", "metadata": {}, "source": [ "### Rate of Convergence\n", @@ -1033,24 +1033,24 @@ "$$\n", "\n", "\n", - "(See the equation above equation (47) in BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)])" + "(See the equation above equation (47) in BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)])" ] }, { "cell_type": "markdown", - "id": "698cef1b", + "id": "fe4ffc4b", "metadata": {}, "source": [ "### More Advanced Topic\n", "\n", - "The remainder of this lecture is about technical material based on formulas from BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)].\n", + "The remainder of this lecture is about technical material based on formulas from BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)].\n", "\n", "The topic involves interpreting and extending formula [(46.3)](#equation-eq-criterion-fiscal-1) for the ergodic mean $ {\\mathcal B}^* $." ] }, { "cell_type": "markdown", - "id": "62333fb4", + "id": "afac3b82", "metadata": {}, "source": [ "### Chicken and Egg\n", @@ -1075,29 +1075,29 @@ }, { "cell_type": "markdown", - "id": "27bdb6ba", + "id": "e5899970", "metadata": {}, "source": [ "### Approximating the Ergodic Mean\n", "\n", - "BEGS also [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] propose an approximation to $ {\\mathcal B}^* $ that can be computed **without** first approximating the\n", + "BEGS also [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] propose an approximation to $ {\\mathcal B}^* $ that can be computed **without** first approximating the\n", "ergodic distribution.\n", "\n", "To construct the BEGS approximation to $ {\\mathcal B}^* $, we just follow steps set forth on pages 648 - 650 of section III.D of\n", - "[[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)]\n", + "[[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)]\n", "\n", "- notation in BEGS might be confusing at first sight, so\n", " it is important to stare and digest before computing \n", - "- there are also some sign errors in the [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] text that we’ll want\n", + "- there are also some sign errors in the [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] text that we’ll want\n", " to correct here \n", "\n", "\n", - "Here is a step-by-step description of the BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] approximation procedure." + "Here is a step-by-step description of the BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] approximation procedure." ] }, { "cell_type": "markdown", - "id": "fcd7ed11", + "id": "3ce22518", "metadata": {}, "source": [ "### Step by Step\n", @@ -1116,7 +1116,7 @@ "$ S $.\n", "\n", "**Typo alert:** Please note that there is a sign error in equation (42)\n", - "of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] – it should be a **minus** rather than a **plus** in the middle.\n", + "of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] – it should be a **minus** rather than a **plus** in the middle.\n", "\n", "- We have made the appropriate correction in the above equation. \n", "\n", @@ -1150,7 +1150,7 @@ "This equation says that at a constant discount factor $ \\beta $, equivalent government debt $ {\\mathcal B} $ equals the\n", "present value of the mean effective government **surplus**.\n", "\n", - "**Another typo alert**: there is a sign error in equation (46) of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id228)] –the left\n", + "**Another typo alert**: there is a sign error in equation (46) of BEGS [[Bhandari *et al.*, 2017](https://python-advanced.quantecon.org/zreferences.html#id229)] –the left\n", "side should be multiplied by $ -1 $.\n", "\n", "- We have made this correction in the above equation. \n", @@ -1240,7 +1240,7 @@ }, { "cell_type": "markdown", - "id": "be483016", + "id": "5ea0824c", "metadata": {}, "source": [ "### Execution\n", @@ -1250,7 +1250,7 @@ }, { "cell_type": "markdown", - "id": "7eb53e92", + "id": "21b1f372", "metadata": {}, "source": [ "#### Step 1" @@ -1259,7 +1259,7 @@ { "cell_type": "code", "execution_count": null, - "id": "669cf786", + "id": "ea2801a4", "metadata": { "hide-output": false }, @@ -1283,7 +1283,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84c58d4a", + "id": "45b43bd7", "metadata": { "hide-output": false }, @@ -1294,7 +1294,7 @@ }, { "cell_type": "markdown", - "id": "1d4154a3", + "id": "b366695a", "metadata": {}, "source": [ "#### Step 2" @@ -1303,7 +1303,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e3e8ac98", + "id": "7a89e11f", "metadata": { "hide-output": false }, @@ -1314,7 +1314,7 @@ }, { "cell_type": "markdown", - "id": "c053b439", + "id": "46f3289d", "metadata": {}, "source": [ "### Note about Code\n", @@ -1331,7 +1331,7 @@ }, { "cell_type": "markdown", - "id": "bfa3c8b7", + "id": "b595551d", "metadata": {}, "source": [ "### Running the code\n", @@ -1345,7 +1345,7 @@ { "cell_type": "code", "execution_count": null, - "id": "96998f74", + "id": "643842b1", "metadata": { "hide-output": false }, @@ -1364,7 +1364,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8f7908be", + "id": "3aa65b0f", "metadata": { "hide-output": false }, @@ -1376,7 +1376,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2a929efc", + "id": "59be7e54", "metadata": { "hide-output": false }, @@ -1387,7 +1387,7 @@ }, { "cell_type": "markdown", - "id": "87cf41ac", + "id": "bda38bfd", "metadata": {}, "source": [ "We only want unconditional expectations because we are in an IID case.\n", @@ -1399,7 +1399,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d9a09e15", + "id": "46d2ee48", "metadata": { "hide-output": false }, @@ -1412,7 +1412,7 @@ }, { "cell_type": "markdown", - "id": "e80208e7", + "id": "86fee568", "metadata": {}, "source": [ "Let’s look at the random variables $ {\\mathcal R}, {\\mathcal X} $" @@ -1421,7 +1421,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e80a3ea", + "id": "dc2c05e8", "metadata": { "hide-output": false }, @@ -1433,7 +1433,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3e077e93", + "id": "bb26e294", "metadata": { "hide-output": false }, @@ -1445,7 +1445,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f6a42987", + "id": "9fdb4080", "metadata": { "hide-output": false }, @@ -1457,7 +1457,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a64a5e03", + "id": "986a7539", "metadata": { "hide-output": false }, @@ -1469,7 +1469,7 @@ { "cell_type": "code", "execution_count": null, - "id": "80dc6464", + "id": "0bc65879", "metadata": { "hide-output": false }, @@ -1480,7 +1480,7 @@ }, { "cell_type": "markdown", - "id": "560eb268", + "id": "abd32d71", "metadata": {}, "source": [ "#### Step 3" @@ -1489,7 +1489,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bf36c711", + "id": "11f50b59", "metadata": { "hide-output": false }, @@ -1502,7 +1502,7 @@ }, { "cell_type": "markdown", - "id": "877ea8eb", + "id": "05cd678d", "metadata": {}, "source": [ "Note that $ B $ is a scalar.\n", @@ -1513,7 +1513,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c1e3bd94", + "id": "abf5c0f4", "metadata": { "hide-output": false }, @@ -1528,7 +1528,7 @@ }, { "cell_type": "markdown", - "id": "b0a0c771", + "id": "98ae1032", "metadata": {}, "source": [ "In the above cell, B is fixed at 1 and $ \\tau $ is to be computed as\n", @@ -1540,7 +1540,7 @@ }, { "cell_type": "markdown", - "id": "2239efc8", + "id": "9998f5c8", "metadata": {}, "source": [ "#### Step 4" @@ -1549,7 +1549,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b93f991f", + "id": "3652e861", "metadata": { "hide-output": false }, @@ -1565,7 +1565,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a7bb242d", + "id": "b6c33506", "metadata": { "hide-output": false }, @@ -1576,7 +1576,7 @@ }, { "cell_type": "markdown", - "id": "da7d914e", + "id": "695e26a7", "metadata": {}, "source": [ "#### Step 6" @@ -1585,7 +1585,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5b26f40", + "id": "18ad7bb0", "metadata": { "hide-output": false }, @@ -1598,7 +1598,7 @@ { "cell_type": "code", "execution_count": null, - "id": "123c5fc5", + "id": "c35a151f", "metadata": { "hide-output": false }, @@ -1610,7 +1610,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cfc42da0", + "id": "17c06c0b", "metadata": { "hide-output": false }, @@ -1624,7 +1624,7 @@ { "cell_type": "code", "execution_count": null, - "id": "99d38a59", + "id": "b1a24539", "metadata": { "hide-output": false }, @@ -1637,7 +1637,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbbdf8a2", + "id": "a9852b83", "metadata": { "hide-output": false }, @@ -1650,7 +1650,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6bf2ff76", + "id": "0d1e3ec9", "metadata": { "hide-output": false }, @@ -1663,7 +1663,7 @@ { "cell_type": "code", "execution_count": null, - "id": "68cb56c3", + "id": "172a72b8", "metadata": { "hide-output": false }, @@ -1676,7 +1676,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4644bd03", + "id": "7dea4661", "metadata": { "hide-output": false }, @@ -1687,7 +1687,7 @@ } ], "metadata": { - "date": 1724218393.3700914, + "date": 1728369867.51013, "filename": "amss3.md", "kernelspec": { "display_name": "Python", diff --git a/arellano.ipynb b/arellano.ipynb index 228379e..1378a84 100644 --- a/arellano.ipynb +++ b/arellano.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "87c200a0", + "id": "027ba163", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "5d5458ee", + "id": "bd97c2b6", "metadata": {}, "source": [ "# Default Risk and Income Fluctuations\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c95d31fc", + "id": "6cb2fa5f", "metadata": { "hide-output": false }, @@ -33,12 +33,12 @@ }, { "cell_type": "markdown", - "id": "f8b0df68", + "id": "e6315467", "metadata": {}, "source": [ "## Overview\n", "\n", - "This lecture computes versions of Arellano’s [[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id126)]\n", + "This lecture computes versions of Arellano’s [[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id127)]\n", "model of sovereign default.\n", "\n", "The model describes interactions among default risk, output, and an\n", @@ -85,7 +85,7 @@ { "cell_type": "code", "execution_count": null, - "id": "27d6b19b", + "id": "1895415d", "metadata": { "hide-output": false }, @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "0ac905bf", + "id": "d35e353f", "metadata": {}, "source": [ "## Structure\n", @@ -109,7 +109,7 @@ }, { "cell_type": "markdown", - "id": "20a727a6", + "id": "41a78cf1", "metadata": {}, "source": [ "### Output, Consumption and Debt\n", @@ -151,7 +151,7 @@ }, { "cell_type": "markdown", - "id": "8ccedc54", + "id": "dc20352a", "metadata": {}, "source": [ "### Asset Markets\n", @@ -193,7 +193,7 @@ }, { "cell_type": "markdown", - "id": "99c504a8", + "id": "24fa94f5", "metadata": {}, "source": [ "### Financial Markets\n", @@ -225,7 +225,7 @@ }, { "cell_type": "markdown", - "id": "2f6b4cf2", + "id": "20c6e6b2", "metadata": {}, "source": [ "### Government’s Decisions\n", @@ -251,7 +251,7 @@ }, { "cell_type": "markdown", - "id": "acdb3c70", + "id": "aaa1d614", "metadata": {}, "source": [ "### Reentering International Credit Market\n", @@ -262,7 +262,7 @@ }, { "cell_type": "markdown", - "id": "fac2c0b8", + "id": "02a63d00", "metadata": {}, "source": [ "## Equilibrium\n", @@ -354,7 +354,7 @@ }, { "cell_type": "markdown", - "id": "f9944fc9", + "id": "52923d9b", "metadata": {}, "source": [ "### Definition of Equilibrium\n", @@ -379,7 +379,7 @@ }, { "cell_type": "markdown", - "id": "c593e0a9", + "id": "33fe1533", "metadata": {}, "source": [ "## Computation\n", @@ -395,7 +395,7 @@ "\n", "We use a slightly modified version of the algorithm recommended by Arellano.\n", "\n", - "- The appendix to [[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id126)] recommends value function iteration until\n", + "- The appendix to [[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id127)] recommends value function iteration until\n", " convergence, updating the price, and then repeating. \n", "- Instead, we update the bond price at every value function iteration step. \n", "\n", @@ -425,7 +425,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4bf75bad", + "id": "88ce8256", "metadata": { "hide-output": false }, @@ -472,7 +472,7 @@ }, { "cell_type": "markdown", - "id": "8f3a2f6f", + "id": "41ebe7e9", "metadata": {}, "source": [ "Notice how the class returns the data it stores as simple numerical values and\n", @@ -488,7 +488,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35f4f333", + "id": "42f64c53", "metadata": { "hide-output": false }, @@ -501,7 +501,7 @@ }, { "cell_type": "markdown", - "id": "6f7386d7", + "id": "eb6ab6d0", "metadata": {}, "source": [ "Here is a function to compute the bond price at each state, given $ v_c $ and\n", @@ -511,7 +511,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fdfeffea", + "id": "b620b008", "metadata": { "hide-output": false }, @@ -538,7 +538,7 @@ }, { "cell_type": "markdown", - "id": "6133b2e3", + "id": "d243a17b", "metadata": {}, "source": [ "Next we introduce Bellman operators that updated $ v_d $ and $ v_c $." @@ -547,7 +547,7 @@ { "cell_type": "code", "execution_count": null, - "id": "47df75af", + "id": "ee45d616", "metadata": { "hide-output": false }, @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "1c41f0c7", + "id": "55034f96", "metadata": {}, "source": [ "Here is a fast function that calls these operators in the right sequence." @@ -608,7 +608,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43fa8f22", + "id": "42e5a018", "metadata": { "hide-output": false }, @@ -645,7 +645,7 @@ }, { "cell_type": "markdown", - "id": "e7be8dfa", + "id": "9499df99", "metadata": {}, "source": [ "We can now write a function that will use the `Arellano_Economy` class and the\n", @@ -662,7 +662,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a222aeed", + "id": "90c0b7e7", "metadata": { "hide-output": false }, @@ -706,7 +706,7 @@ }, { "cell_type": "markdown", - "id": "825aafe7", + "id": "881958c4", "metadata": {}, "source": [ "Finally, we write a function that will allow us to simulate the economy once\n", @@ -716,7 +716,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f0a02707", + "id": "016602fb", "metadata": { "hide-output": false }, @@ -786,13 +786,13 @@ }, { "cell_type": "markdown", - "id": "b8897aee", + "id": "4f382539", "metadata": {}, "source": [ "## Results\n", "\n", "Let’s start by trying to replicate the results obtained in\n", - "[[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id126)].\n", + "[[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id127)].\n", "\n", "In what follows, all results are computed using Arellano’s parameter values.\n", "\n", @@ -827,7 +827,7 @@ "\n", "\n", "The next figure plots value functions and replicates the right hand panel of Figure 4 of\n", - "[[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id126)].\n", + "[[Arellano, 2008](https://python-advanced.quantecon.org/zreferences.html#id127)].\n", "\n", "![https://python-advanced.quantecon.org/_static/lecture_specific/arellano/arellano_value_funcs.png](https://python-advanced.quantecon.org/_static/lecture_specific/arellano/arellano_value_funcs.png)\n", "\n", @@ -857,7 +857,7 @@ }, { "cell_type": "markdown", - "id": "b5b4413c", + "id": "b044e999", "metadata": {}, "source": [ "## Exercises\n", @@ -868,7 +868,7 @@ }, { "cell_type": "markdown", - "id": "84b5f3c1", + "id": "301c471e", "metadata": {}, "source": [ "## Exercise 13.1\n", @@ -881,7 +881,7 @@ }, { "cell_type": "markdown", - "id": "6629484c", + "id": "74e47ea2", "metadata": {}, "source": [ "## Solution to[ Exercise 13.1](https://python-advanced.quantecon.org/#arella_ex1)\n", @@ -892,7 +892,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d6af5398", + "id": "20976210", "metadata": { "hide-output": false }, @@ -904,7 +904,7 @@ { "cell_type": "code", "execution_count": null, - "id": "88226482", + "id": "7f7ded3a", "metadata": { "hide-output": false }, @@ -915,7 +915,7 @@ }, { "cell_type": "markdown", - "id": "2976b06c", + "id": "d5dd5d54", "metadata": {}, "source": [ "Compute the bond price schedule as seen in figure 3 of Arellano (2008)" @@ -924,7 +924,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6fd5d946", + "id": "3fbcf6cd", "metadata": { "hide-output": false }, @@ -960,7 +960,7 @@ }, { "cell_type": "markdown", - "id": "3dc19f9c", + "id": "6b1ecb4f", "metadata": {}, "source": [ "Draw a plot of the value functions" @@ -969,7 +969,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e7c7d77", + "id": "f14b4f50", "metadata": { "hide-output": false }, @@ -989,7 +989,7 @@ }, { "cell_type": "markdown", - "id": "a15f027f", + "id": "65baede4", "metadata": {}, "source": [ "Draw a heat map for default probability" @@ -998,7 +998,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b8b854a", + "id": "2f2d58eb", "metadata": { "hide-output": false }, @@ -1023,7 +1023,7 @@ }, { "cell_type": "markdown", - "id": "52005403", + "id": "828f34cc", "metadata": {}, "source": [ "Plot a time series of major variables simulated from the model" @@ -1032,7 +1032,7 @@ { "cell_type": "code", "execution_count": null, - "id": "12c2e6f7", + "id": "889489e6", "metadata": { "hide-output": false }, @@ -1081,7 +1081,7 @@ } ], "metadata": { - "date": 1724218393.4039915, + "date": 1728369867.6890368, "filename": "arellano.md", "kernelspec": { "display_name": "Python", diff --git a/arma.ipynb b/arma.ipynb index fdb4c41..3d1aa23 100644 --- a/arma.ipynb +++ b/arma.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "614adb56", + "id": "227397b5", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "62f9494b", + "id": "1745546f", "metadata": {}, "source": [ "# Covariance Stationary Processes\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9882a6a", + "id": "0a8eb634", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "e3470154", + "id": "3cefcd1e", "metadata": {}, "source": [ "## Overview\n", @@ -52,7 +52,7 @@ }, { "cell_type": "markdown", - "id": "e193167f", + "id": "2318f989", "metadata": {}, "source": [ "### ARMA Processes\n", @@ -68,7 +68,7 @@ }, { "cell_type": "markdown", - "id": "d09ddc59", + "id": "f4e981fd", "metadata": {}, "source": [ "### Spectral Analysis\n", @@ -89,7 +89,7 @@ }, { "cell_type": "markdown", - "id": "15bae848", + "id": "1be1a7dc", "metadata": {}, "source": [ "### Other Reading\n", @@ -102,7 +102,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d46eeb19", + "id": "7ee7d49c", "metadata": { "hide-output": false }, @@ -115,7 +115,7 @@ }, { "cell_type": "markdown", - "id": "3276ac78", + "id": "411c1bd2", "metadata": {}, "source": [ "## Introduction\n", @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "141e3c94", + "id": "1be466e4", "metadata": {}, "source": [ "### Definitions\n", @@ -159,7 +159,7 @@ }, { "cell_type": "markdown", - "id": "7b02d13f", + "id": "e6a0b304", "metadata": {}, "source": [ "### Example 1: White Noise\n", @@ -182,7 +182,7 @@ }, { "cell_type": "markdown", - "id": "3de8624a", + "id": "d3626807", "metadata": {}, "source": [ "### Example 2: General Linear Processes\n", @@ -221,7 +221,7 @@ }, { "cell_type": "markdown", - "id": "d42b04d0", + "id": "3b188656", "metadata": {}, "source": [ "### Wold Representation\n", @@ -244,12 +244,12 @@ "- $ \\eta_t $ can be expressed as a linear function of $ X_{t-1}, X_{t-2},\\ldots $ and is perfectly predictable over arbitrarily long horizons \n", "\n", "\n", - "For the method of constructing a Wold representation, intuition, and further discussion, see [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], p. 286." + "For the method of constructing a Wold representation, intuition, and further discussion, see [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], p. 286." ] }, { "cell_type": "markdown", - "id": "40ac7a0c", + "id": "b79a6ea6", "metadata": {}, "source": [ "### AR and MA\n", @@ -292,7 +292,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21fb6ec7", + "id": "137bd768", "metadata": { "hide-output": false }, @@ -316,7 +316,7 @@ }, { "cell_type": "markdown", - "id": "c0aaf686", + "id": "297c9730", "metadata": {}, "source": [ "Another very simple process is the MA(1) process (here MA means “moving average”)\n", @@ -342,7 +342,7 @@ }, { "cell_type": "markdown", - "id": "0842fd5d", + "id": "b0e0e8f6", "metadata": {}, "source": [ "### ARMA Processes\n", @@ -404,14 +404,14 @@ "\n", "That is, given an ARMA($ p,q $) process $ \\{ X_t \\} $ satisfying the unit circle condition, there exists a square summable sequence $ \\{\\psi_t\\} $ with $ X_t = \\sum_{j=0}^{\\infty} \\psi_j \\epsilon_{t-j} $ for all $ t $.\n", "\n", - "The sequence $ \\{\\psi_t\\} $ can be obtained by a recursive procedure outlined on page 79 of [[Cryer and Chan, 2008](https://python-advanced.quantecon.org/zreferences.html#id143)].\n", + "The sequence $ \\{\\psi_t\\} $ can be obtained by a recursive procedure outlined on page 79 of [[Cryer and Chan, 2008](https://python-advanced.quantecon.org/zreferences.html#id144)].\n", "\n", "The function $ t \\mapsto \\psi_t $ is often called the *impulse response function*." ] }, { "cell_type": "markdown", - "id": "7b10d993", + "id": "7f49939e", "metadata": {}, "source": [ "## Spectral Analysis\n", @@ -429,7 +429,7 @@ }, { "cell_type": "markdown", - "id": "e8d03ed8", + "id": "d0df3362", "metadata": {}, "source": [ "### Complex Numbers\n", @@ -470,7 +470,7 @@ }, { "cell_type": "markdown", - "id": "97a66373", + "id": "0cf2092c", "metadata": {}, "source": [ "### Spectral Densities\n", @@ -512,7 +512,7 @@ }, { "cell_type": "markdown", - "id": "3823cad2", + "id": "f371a59a", "metadata": {}, "source": [ "### Example 1: White Noise\n", @@ -528,7 +528,7 @@ }, { "cell_type": "markdown", - "id": "be378426", + "id": "1faabd9c", "metadata": {}, "source": [ "### Example 2: AR and MA and ARMA\n", @@ -542,7 +542,7 @@ "= \\sigma^2 ( 1 + 2 \\theta \\cos(\\omega) + \\theta^2 ) \\tag{28.10}\n", "$$\n", "\n", - "With a bit more effort, it’s possible to show (see, e.g., p. 261 of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)]) that the spectral density of the AR(1) process $ X_t = \\phi X_{t-1} + \\epsilon_t $ is\n", + "With a bit more effort, it’s possible to show (see, e.g., p. 261 of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)]) that the spectral density of the AR(1) process $ X_t = \\phi X_{t-1} + \\epsilon_t $ is\n", "\n", "\n", "\n", @@ -569,14 +569,14 @@ "\n", "The derivation of [(28.12)](#equation-arma-sd) uses the fact that convolutions become products under Fourier transformations.\n", "\n", - "The proof is elegant and can be found in many places — see, for example, [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], chapter 11, section 4.\n", + "The proof is elegant and can be found in many places — see, for example, [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], chapter 11, section 4.\n", "\n", "It’s a nice exercise to verify that [(28.10)](#equation-ma1-sd-ed) and [(28.11)](#equation-ar1-sd-ed) are indeed special cases of [(28.12)](#equation-arma-sd)." ] }, { "cell_type": "markdown", - "id": "97ca6e15", + "id": "65e0e495", "metadata": {}, "source": [ "### Interpreting the Spectral Density\n", @@ -589,7 +589,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ac779e65", + "id": "32e0f672", "metadata": { "hide-output": false }, @@ -616,7 +616,7 @@ }, { "cell_type": "markdown", - "id": "6229b7b9", + "id": "6dc790a6", "metadata": {}, "source": [ "These spectral densities correspond to the autocovariance functions for the\n", @@ -650,7 +650,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d348cde2", + "id": "f1c30373", "metadata": { "hide-output": false }, @@ -693,7 +693,7 @@ }, { "cell_type": "markdown", - "id": "5081f5f5", + "id": "d24cd9ff", "metadata": {}, "source": [ "On the other hand, if we evaluate $ f(\\omega) $ at $ \\omega = \\pi / 3 $, then the cycles are\n", @@ -704,7 +704,7 @@ { "cell_type": "code", "execution_count": null, - "id": "085ea5e3", + "id": "d9085be0", "metadata": { "hide-output": false }, @@ -747,7 +747,7 @@ }, { "cell_type": "markdown", - "id": "f0dcaeb3", + "id": "1a47540b", "metadata": {}, "source": [ "In summary, the spectral density is large at frequencies $ \\omega $ where the autocovariance function exhibits damped cycles." @@ -755,7 +755,7 @@ }, { "cell_type": "markdown", - "id": "fabc5ac0", + "id": "de7c4950", "metadata": {}, "source": [ "### Inverting the Transformation\n", @@ -781,14 +781,14 @@ }, { "cell_type": "markdown", - "id": "31f11241", + "id": "dd8eb6fa", "metadata": {}, "source": [ "### Mathematical Theory\n", "\n", "\n", "\n", - "This section is loosely based on [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], p. 249-253, and included for those who\n", + "This section is loosely based on [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], p. 249-253, and included for those who\n", "\n", "- would like a bit more insight into spectral densities \n", "- and have at least some background in [Hilbert space](https://en.wikipedia.org/wiki/Hilbert_space) theory \n", @@ -870,7 +870,7 @@ }, { "cell_type": "markdown", - "id": "444856ed", + "id": "93d31d21", "metadata": {}, "source": [ "## Implementation\n", @@ -891,12 +891,12 @@ }, { "cell_type": "markdown", - "id": "f4fbbac6", + "id": "505644df", "metadata": {}, "source": [ "### Application\n", "\n", - "Let’s use this code to replicate the plots on pages 68–69 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)].\n", + "Let’s use this code to replicate the plots on pages 68–69 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)].\n", "\n", "Here are some functions to generate the plots" ] @@ -904,7 +904,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c8aa497d", + "id": "a6148553", "metadata": { "hide-output": false }, @@ -965,7 +965,7 @@ }, { "cell_type": "markdown", - "id": "11656418", + "id": "9a861000", "metadata": {}, "source": [ "Now let’s call these functions to generate plots.\n", @@ -976,7 +976,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6cae6295", + "id": "3a15ff1a", "metadata": { "hide-output": false }, @@ -990,7 +990,7 @@ }, { "cell_type": "markdown", - "id": "aeb4e02f", + "id": "3806ba09", "metadata": {}, "source": [ "If we look carefully, things look good: the spectrum is the flat line at $ 10^0 $ at the very top of the spectrum graphs,\n", @@ -1004,7 +1004,7 @@ "\n", "\n", "To get some more examples, as our laboratory\n", - "we’ll replicate quartets of graphs that [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)] use to teach “how to read spectral densities”.\n", + "we’ll replicate quartets of graphs that [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)] use to teach “how to read spectral densities”.\n", "\n", "Ljunqvist and Sargent’s first model is $ X_t = 1.3 X_{t-1} - .7 X_{t-2} + \\epsilon_t $" ] @@ -1012,7 +1012,7 @@ { "cell_type": "code", "execution_count": null, - "id": "08e9ba28", + "id": "3a881758", "metadata": { "hide-output": false }, @@ -1026,7 +1026,7 @@ }, { "cell_type": "markdown", - "id": "695fd204", + "id": "897ca6a1", "metadata": {}, "source": [ "Ljungqvist and Sargent’s second model is $ X_t = .9 X_{t-1} + \\epsilon_t $" @@ -1035,7 +1035,7 @@ { "cell_type": "code", "execution_count": null, - "id": "876a70dc", + "id": "b9786e57", "metadata": { "hide-output": false }, @@ -1049,7 +1049,7 @@ }, { "cell_type": "markdown", - "id": "62bba5d4", + "id": "36a87f71", "metadata": {}, "source": [ "Ljungqvist and Sargent’s third model is $ X_t = .8 X_{t-4} + \\epsilon_t $" @@ -1058,7 +1058,7 @@ { "cell_type": "code", "execution_count": null, - "id": "deac88f1", + "id": "6a8e327c", "metadata": { "hide-output": false }, @@ -1072,7 +1072,7 @@ }, { "cell_type": "markdown", - "id": "3a493861", + "id": "f73b0a99", "metadata": {}, "source": [ "Ljungqvist and Sargent’s fourth model is $ X_t = .98 X_{t-1} + \\epsilon_t -.7 \\epsilon_{t-1} $" @@ -1081,7 +1081,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7599d864", + "id": "5178a5a0", "metadata": { "hide-output": false }, @@ -1095,7 +1095,7 @@ }, { "cell_type": "markdown", - "id": "95e30b69", + "id": "f18bd6bc", "metadata": {}, "source": [ "### Explanation\n", @@ -1153,7 +1153,7 @@ }, { "cell_type": "markdown", - "id": "feddbfe2", + "id": "74cf915e", "metadata": {}, "source": [ "### Computing the Autocovariance Function\n", @@ -1198,7 +1198,7 @@ } ], "metadata": { - "date": 1724218393.4562974, + "date": 1728369867.7405188, "filename": "arma.md", "kernelspec": { "display_name": "Python", diff --git a/asset_pricing_lph.ipynb b/asset_pricing_lph.ipynb index bd8be37..b0c0fe6 100644 --- a/asset_pricing_lph.ipynb +++ b/asset_pricing_lph.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a608a939", + "id": "34b3c25b", "metadata": {}, "source": [ "# Elementary Asset Pricing Theory\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "49ff3c20", + "id": "d0345085", "metadata": {}, "source": [ "## Overview\n", @@ -25,10 +25,10 @@ "\n", ">**Note**\n", ">\n", - ">Chapter 1 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)] describes the role that this equation plays in a diverse set of\n", + ">Chapter 1 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)] describes the role that this equation plays in a diverse set of\n", "models in macroeconomics, monetary economics, and public finance.\n", "\n", - "We aim to convey insights about empirical implications of this equation brought out in the work of Lars Peter Hansen [[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id115)] and Lars Peter Hansen and Ravi Jagannathan [[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id20)].\n", + "We aim to convey insights about empirical implications of this equation brought out in the work of Lars Peter Hansen [[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id116)] and Lars Peter Hansen and Ravi Jagannathan [[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id21)].\n", "\n", "By following their footsteps, from that single equation we’ll derive\n", "\n", @@ -58,7 +58,7 @@ }, { "cell_type": "markdown", - "id": "66db1d86", + "id": "ec10b567", "metadata": {}, "source": [ "## Key Equation\n", @@ -84,7 +84,7 @@ "The random gross return $ R^i $ for every asset $ i $ and the scalar stochastic discount factor $ m $\n", "live in a common probability space.\n", "\n", - "[[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id115)] and [[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id20)] explain how **existence** of a scalar stochastic discount factor that verifies equation\n", + "[[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id116)] and [[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id21)] explain how **existence** of a scalar stochastic discount factor that verifies equation\n", "[(35.1)](#equation-eq-emr1) is implied by a **law of one price** that requires that all portfolios of assets\n", "that bring the same payouts have the same price.\n", "\n", @@ -102,7 +102,7 @@ }, { "cell_type": "markdown", - "id": "74a02e46", + "id": "ca9ab0fa", "metadata": {}, "source": [ "## Implications of Key Equation\n", @@ -111,10 +111,10 @@ "\n", ">**Note**\n", ">\n", - ">Lars Hansen’s remark is a concise summary of ideas in [[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id115)] and\n", - "[[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id20)]. Important foundations of these ideas were set down by\n", - "[[Ross, 1976](https://python-advanced.quantecon.org/zreferences.html#id16)], [[Ross, 1978](https://python-advanced.quantecon.org/zreferences.html#id15)], [[Harrison and Kreps, 1979](https://python-advanced.quantecon.org/zreferences.html#id17)], [[Kreps, 1981](https://python-advanced.quantecon.org/zreferences.html#id18)], and\n", - "[[Chamberlain and Rothschild, 1983](https://python-advanced.quantecon.org/zreferences.html#id14)].\n", + ">Lars Hansen’s remark is a concise summary of ideas in [[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id116)] and\n", + "[[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id21)]. Important foundations of these ideas were set down by\n", + "[[Ross, 1976](https://python-advanced.quantecon.org/zreferences.html#id17)], [[Ross, 1978](https://python-advanced.quantecon.org/zreferences.html#id16)], [[Harrison and Kreps, 1979](https://python-advanced.quantecon.org/zreferences.html#id18)], [[Kreps, 1981](https://python-advanced.quantecon.org/zreferences.html#id19)], and\n", + "[[Chamberlain and Rothschild, 1983](https://python-advanced.quantecon.org/zreferences.html#id15)].\n", "\n", "This remark of Lars Hansen refers to the fact that interesting restrictions can be deduced by recognizing that $ E m R^i $ is a component of the covariance between $ m $ and $ R^i $ and then using that fact to rearrange equation [(35.1)](#equation-eq-emr1).\n", "\n", @@ -178,7 +178,7 @@ }, { "cell_type": "markdown", - "id": "b9cc4207", + "id": "e534a0bf", "metadata": {}, "source": [ "## Expected Return - Beta Representation\n", @@ -297,7 +297,7 @@ }, { "cell_type": "markdown", - "id": "6003eb28", + "id": "66e198aa", "metadata": {}, "source": [ "## Mean-Variance Frontier\n", @@ -305,11 +305,11 @@ "Now we’ll derive the celebrated **mean-variance frontier**.\n", "\n", "We do this using a method deployed by Lars Peter Hansen and Scott\n", - "Richard [[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id115)].\n", + "Richard [[Hansen and Richard, 1987](https://python-advanced.quantecon.org/zreferences.html#id116)].\n", "\n", ">**Note**\n", ">\n", - ">Methods of Hansen and Richard are described and used extensively by [[Cochrane, 2005](https://python-advanced.quantecon.org/zreferences.html#id19)].\n", + ">Methods of Hansen and Richard are described and used extensively by [[Cochrane, 2005](https://python-advanced.quantecon.org/zreferences.html#id20)].\n", "\n", "Their idea was rearrange the key equation [(35.1)](#equation-eq-emr1), namely, $ E m R^i = 1 $, and then to apply a Cauchy-Schwarz inequality.\n", "\n", @@ -371,7 +371,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7d278720", + "id": "b83aedec", "metadata": { "hide-output": false }, @@ -419,7 +419,7 @@ }, { "cell_type": "markdown", - "id": "397c724a", + "id": "9cfaab23", "metadata": {}, "source": [ "The figure shows two straight lines, the blue upper one being the locus of $ ( \\sigma(R^i), E(R^i) $ pairs that are on\n", @@ -454,7 +454,7 @@ }, { "cell_type": "markdown", - "id": "610b58f2", + "id": "6141c8f7", "metadata": {}, "source": [ "## Sharpe Ratios and the Price of Risk\n", @@ -479,7 +479,7 @@ }, { "cell_type": "markdown", - "id": "0f58aa0e", + "id": "98ccb537", "metadata": {}, "source": [ "## Mathematical Structure of Frontier\n", @@ -511,7 +511,7 @@ }, { "cell_type": "markdown", - "id": "d51ee7f8", + "id": "9c8e6bed", "metadata": {}, "source": [ "## Multi-factor Models\n", @@ -549,7 +549,7 @@ }, { "cell_type": "markdown", - "id": "4d03382c", + "id": "2fad0656", "metadata": {}, "source": [ "## Empirical Implementations\n", @@ -613,7 +613,7 @@ }, { "cell_type": "markdown", - "id": "713455f8", + "id": "84ad4ffe", "metadata": {}, "source": [ "## Exercises\n", @@ -624,7 +624,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9011f217", + "id": "26b96b5a", "metadata": { "hide-output": false }, @@ -637,7 +637,7 @@ }, { "cell_type": "markdown", - "id": "dced5a62", + "id": "b3aee8fe", "metadata": {}, "source": [ "Lots of our calculations will involve computing population and sample OLS regressions.\n", @@ -648,7 +648,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b770c6cf", + "id": "99f179d4", "metadata": { "hide-output": false }, @@ -670,7 +670,7 @@ }, { "cell_type": "markdown", - "id": "69d99270", + "id": "e936b537", "metadata": {}, "source": [ "## Exercise 35.1\n", @@ -686,7 +686,7 @@ }, { "cell_type": "markdown", - "id": "60694e28", + "id": "45d43c5d", "metadata": {}, "source": [ "## Solution to[ Exercise 35.1](https://python-advanced.quantecon.org/#apl_ex1)\n", @@ -712,7 +712,7 @@ }, { "cell_type": "markdown", - "id": "8ba41dce", + "id": "65586b0a", "metadata": {}, "source": [ "## Exercise 35.2\n", @@ -722,7 +722,7 @@ }, { "cell_type": "markdown", - "id": "67768c9b", + "id": "05e6512d", "metadata": {}, "source": [ "## Solution to[ Exercise 35.2](https://python-advanced.quantecon.org/#apl_ex2)\n", @@ -736,7 +736,7 @@ }, { "cell_type": "markdown", - "id": "faf6b753", + "id": "b31c79cc", "metadata": {}, "source": [ "## Exercise 35.3\n", @@ -791,7 +791,7 @@ }, { "cell_type": "markdown", - "id": "14332d98", + "id": "5a345907", "metadata": {}, "source": [ "## Solution to[ Exercise 35.3](https://python-advanced.quantecon.org/#apl_ex3)\n", @@ -802,7 +802,7 @@ { "cell_type": "code", "execution_count": null, - "id": "446752de", + "id": "c7479c8c", "metadata": { "hide-output": false }, @@ -822,7 +822,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16dfeb48", + "id": "03dc9254", "metadata": { "hide-output": false }, @@ -837,7 +837,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15da6335", + "id": "f1f5490d", "metadata": { "hide-output": false }, @@ -852,7 +852,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8839f98c", + "id": "b2d22ae1", "metadata": { "hide-output": false }, @@ -873,7 +873,7 @@ }, { "cell_type": "markdown", - "id": "c0b61a5a", + "id": "cd23fbc6", "metadata": {}, "source": [ "Now that we have a panel of data, we’d like to solve the inverse problem by assuming the theory specified above and estimating the coefficients given above." @@ -882,7 +882,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f8bfa2f2", + "id": "4d18afd4", "metadata": { "hide-output": false }, @@ -893,7 +893,7 @@ }, { "cell_type": "markdown", - "id": "e859d80c", + "id": "924522f6", "metadata": {}, "source": [ "**Inverse Problem:**\n", @@ -906,7 +906,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a88e1135", + "id": "b7f28ef4", "metadata": { "hide-output": false }, @@ -918,7 +918,7 @@ { "cell_type": "code", "execution_count": null, - "id": "20a43993", + "id": "81b0235e", "metadata": { "hide-output": false }, @@ -929,7 +929,7 @@ }, { "cell_type": "markdown", - "id": "5219fa24", + "id": "8425764b", "metadata": {}, "source": [ "Let’s compare these with the *true* population parameter values." @@ -938,7 +938,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9cec73ef", + "id": "248b72e9", "metadata": { "hide-output": false }, @@ -949,7 +949,7 @@ }, { "cell_type": "markdown", - "id": "2452539d", + "id": "35d3abbc", "metadata": {}, "source": [ "1. $ \\xi $ and $ \\lambda $ " @@ -958,7 +958,7 @@ { "cell_type": "code", "execution_count": null, - "id": "75457b4e", + "id": "b3b5accf", "metadata": { "hide-output": false }, @@ -970,7 +970,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35553058", + "id": "527f6d23", "metadata": { "hide-output": false }, @@ -982,7 +982,7 @@ { "cell_type": "code", "execution_count": null, - "id": "729c2067", + "id": "db7446b8", "metadata": { "hide-output": false }, @@ -993,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "1caa2195", + "id": "29304a09", "metadata": {}, "source": [ "1. $ \\beta_{i, R^m} $ and $ \\sigma_i $ " @@ -1002,7 +1002,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6a811069", + "id": "8114bcbb", "metadata": { "hide-output": false }, @@ -1018,7 +1018,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2985a12d", + "id": "42a17174", "metadata": { "hide-output": false }, @@ -1030,7 +1030,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd2ae4b1", + "id": "6339f8db", "metadata": { "hide-output": false }, @@ -1041,7 +1041,7 @@ }, { "cell_type": "markdown", - "id": "87f27f03", + "id": "5b91975d", "metadata": {}, "source": [ "Q: How close did your estimates come to the parameters we specified?" @@ -1049,7 +1049,7 @@ }, { "cell_type": "markdown", - "id": "c0d2cf64", + "id": "e837175f", "metadata": {}, "source": [ "## Exercise 35.4\n", @@ -1063,7 +1063,7 @@ }, { "cell_type": "markdown", - "id": "c67524df", + "id": "5a20d598", "metadata": {}, "source": [ "## Solution to[ Exercise 35.4](https://python-advanced.quantecon.org/#apl_ex4)\n", @@ -1081,7 +1081,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2bb2d0ec", + "id": "d53de0b0", "metadata": { "hide-output": false }, @@ -1104,7 +1104,7 @@ }, { "cell_type": "markdown", - "id": "a2c33134", + "id": "adbebf34", "metadata": {}, "source": [ "Let’s try to solve $ a $ and $ b $ using the actual model parameters." @@ -1113,7 +1113,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fb79641c", + "id": "ebafe222", "metadata": { "hide-output": false }, @@ -1125,7 +1125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c96264d", + "id": "9dd2e53f", "metadata": { "hide-output": false }, @@ -1136,7 +1136,7 @@ }, { "cell_type": "markdown", - "id": "7a476c6e", + "id": "800abed8", "metadata": {}, "source": [ "## Exercise 35.5\n", @@ -1146,7 +1146,7 @@ }, { "cell_type": "markdown", - "id": "570f7207", + "id": "8a67664e", "metadata": {}, "source": [ "## Solution to[ Exercise 35.5](https://python-advanced.quantecon.org/#apl_ex5)\n", @@ -1157,7 +1157,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbba13f1", + "id": "266d6d40", "metadata": { "hide-output": false }, @@ -1169,7 +1169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7bca00f4", + "id": "4c716b30", "metadata": { "hide-output": false }, @@ -1180,7 +1180,7 @@ } ], "metadata": { - "date": 1724218393.505274, + "date": 1728369867.790583, "filename": "asset_pricing_lph.md", "kernelspec": { "display_name": "Python", diff --git a/black_litterman.ipynb b/black_litterman.ipynb index 75d6373..41e469f 100644 --- a/black_litterman.ipynb +++ b/black_litterman.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ae8d3af1", + "id": "0e3049fb", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "568e4ef6", + "id": "fa6b6c0c", "metadata": {}, "source": [ "# Two Modifications of Mean-Variance Portfolio Theory" @@ -21,7 +21,7 @@ }, { "cell_type": "markdown", - "id": "f7b12c76", + "id": "04588a50", "metadata": {}, "source": [ "## Overview\n", @@ -32,11 +32,11 @@ "\n", "Both extensions described here put distrust of that statistical model into the mind of the decision maker.\n", "\n", - "One is a model of Black and Litterman [[Black and Litterman, 1992](https://python-advanced.quantecon.org/zreferences.html#id68)] that imputes to the decision maker distrust of historically estimated mean returns but still complete trust of estimated covariances of returns.\n", + "One is a model of Black and Litterman [[Black and Litterman, 1992](https://python-advanced.quantecon.org/zreferences.html#id69)] that imputes to the decision maker distrust of historically estimated mean returns but still complete trust of estimated covariances of returns.\n", "\n", "The second model also imputes to the decision maker doubts about his statistical model, but now by saying that, because of that distrust, the decision maker uses a version of robust control theory described in this lecture [Robustness](https://python-advanced.quantecon.org/robustness.html).\n", "\n", - "The famous **Black-Litterman** (1992) [[Black and Litterman, 1992](https://python-advanced.quantecon.org/zreferences.html#id68)] portfolio choice model was motivated by the finding that with high frequency or\n", + "The famous **Black-Litterman** (1992) [[Black and Litterman, 1992](https://python-advanced.quantecon.org/zreferences.html#id69)] portfolio choice model was motivated by the finding that with high frequency or\n", "moderately high frequency data, means are more difficult to estimate than\n", "variances.\n", "\n", @@ -81,7 +81,7 @@ { "cell_type": "code", "execution_count": null, - "id": "08052653", + "id": "2ff283b5", "metadata": { "hide-output": false }, @@ -95,7 +95,7 @@ }, { "cell_type": "markdown", - "id": "422026f9", + "id": "1325be89", "metadata": {}, "source": [ "## Mean-Variance Portfolio Choice\n", @@ -158,7 +158,7 @@ }, { "cell_type": "markdown", - "id": "76f084cf", + "id": "c1471dae", "metadata": {}, "source": [ "## Estimating Mean and Variance\n", @@ -178,7 +178,7 @@ }, { "cell_type": "markdown", - "id": "b44155e9", + "id": "3dbf4207", "metadata": {}, "source": [ "## Black-Litterman Starting Point\n", @@ -196,7 +196,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7eca4baa", + "id": "20a65818", "metadata": { "hide-output": false }, @@ -249,7 +249,7 @@ }, { "cell_type": "markdown", - "id": "3bb2d18a", + "id": "96c12683", "metadata": {}, "source": [ "Black and Litterman’s responded to this situation in the following way:\n", @@ -277,7 +277,7 @@ }, { "cell_type": "markdown", - "id": "37b6a407", + "id": "48be6c26", "metadata": {}, "source": [ "## Details\n", @@ -349,7 +349,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4abd55a0", + "id": "cc83ec8e", "metadata": { "hide-output": false }, @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "acc49438", + "id": "0c6cbf34", "metadata": {}, "source": [ "## Adding Views\n", @@ -447,7 +447,7 @@ { "cell_type": "code", "execution_count": null, - "id": "93694ab6", + "id": "7e1c31ad", "metadata": { "hide-output": false }, @@ -511,7 +511,7 @@ }, { "cell_type": "markdown", - "id": "74b4fb99", + "id": "0778b94c", "metadata": {}, "source": [ "## Bayesian Interpretation\n", @@ -561,7 +561,7 @@ }, { "cell_type": "markdown", - "id": "2f800a0d", + "id": "f190b828", "metadata": {}, "source": [ "## Curve Decolletage\n", @@ -620,7 +620,7 @@ "$$\n", "\n", "This property is called **spherical symmetry** (see p 81. in Leamer\n", - "(1978) [[Leamer, 1978](https://python-advanced.quantecon.org/zreferences.html#id67)]).\n", + "(1978) [[Leamer, 1978](https://python-advanced.quantecon.org/zreferences.html#id68)]).\n", "\n", "\n", "In our specific example, we can use the pair\n", @@ -648,9 +648,9 @@ "is such a point outlines a curve in the excess return space. This curve\n", "is reminiscent of the Pareto curve in an Edgeworth-box setting.\n", "\n", - "Dickey (1975) [[Dickey, 1975](https://python-advanced.quantecon.org/zreferences.html#id60)] calls it a *curve decolletage*.\n", + "Dickey (1975) [[Dickey, 1975](https://python-advanced.quantecon.org/zreferences.html#id61)] calls it a *curve decolletage*.\n", "\n", - "Leamer (1978) [[Leamer, 1978](https://python-advanced.quantecon.org/zreferences.html#id67)] calls it an *information contract curve* and\n", + "Leamer (1978) [[Leamer, 1978](https://python-advanced.quantecon.org/zreferences.html#id68)] calls it an *information contract curve* and\n", "describes it by the following program: maximize the likelihood of one\n", "view, say the Black-Litterman recommendation while keeping the\n", "likelihood of the other view at least at a prespecified constant\n", @@ -691,7 +691,7 @@ { "cell_type": "code", "execution_count": null, - "id": "358e9567", + "id": "2fd71918", "metadata": { "hide-output": false }, @@ -769,7 +769,7 @@ }, { "cell_type": "markdown", - "id": "b612c5ba", + "id": "67d7f9c9", "metadata": {}, "source": [ "Note that the line that connects the two points\n", @@ -790,7 +790,7 @@ { "cell_type": "code", "execution_count": null, - "id": "474ef5a6", + "id": "54b75869", "metadata": { "hide-output": false }, @@ -840,7 +840,7 @@ }, { "cell_type": "markdown", - "id": "cf558668", + "id": "e6089002", "metadata": {}, "source": [ "## Black-Litterman Recommendation as Regularization\n", @@ -996,7 +996,7 @@ }, { "cell_type": "markdown", - "id": "95bebd5d", + "id": "89d10b94", "metadata": {}, "source": [ "## A Robust Control Operator\n", @@ -1012,7 +1012,7 @@ "The robust control theory is another approach that also hinges on\n", "adjusting mean excess returns but not covariances.\n", "\n", - "Associated with a robust control problem is what Hansen and Sargent [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id59)], [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)] call\n", + "Associated with a robust control problem is what Hansen and Sargent [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id60)], [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)] call\n", "a $ {\\sf T} $ operator.\n", "\n", "Let’s define the $ {\\sf T} $ operator as it applies to the problem\n", @@ -1136,7 +1136,7 @@ }, { "cell_type": "markdown", - "id": "000da59f", + "id": "4d2f9c07", "metadata": {}, "source": [ "## A Robust Mean-Variance Portfolio Model\n", @@ -1207,7 +1207,7 @@ }, { "cell_type": "markdown", - "id": "bb1044d9", + "id": "df233bb5", "metadata": {}, "source": [ "## Appendix\n", @@ -1283,7 +1283,7 @@ }, { "cell_type": "markdown", - "id": "7ffc6947", + "id": "f445b1cf", "metadata": {}, "source": [ "## Special Case – IID Sample\n", @@ -1326,7 +1326,7 @@ }, { "cell_type": "markdown", - "id": "f55f8b7f", + "id": "3d8a4c07", "metadata": {}, "source": [ "## Dependence and Sampling Frequency\n", @@ -1391,7 +1391,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37151cf3", + "id": "ca1513a7", "metadata": { "hide-output": false }, @@ -1422,7 +1422,7 @@ }, { "cell_type": "markdown", - "id": "17ebaf44", + "id": "ef3030cc", "metadata": {}, "source": [ "## Frequency and the Mean Estimator\n", @@ -1504,7 +1504,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c4270cb", + "id": "88cc214c", "metadata": { "hide-output": false }, @@ -1532,7 +1532,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8652f3d2", + "id": "8e9f9137", "metadata": { "hide-output": false }, @@ -1578,7 +1578,7 @@ }, { "cell_type": "markdown", - "id": "2356b960", + "id": "ac2d3821", "metadata": {}, "source": [ "The above figure illustrates the relationship between the asymptotic\n", @@ -1596,7 +1596,7 @@ } ], "metadata": { - "date": 1724218393.5508492, + "date": 1728369867.8375428, "filename": "black_litterman.md", "kernelspec": { "display_name": "Python", diff --git a/calvo.ipynb b/calvo.ipynb index ef7f52a..666f78f 100644 --- a/calvo.ipynb +++ b/calvo.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "52b42aa8", + "id": "c6f0c969", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "79ab0ccd", + "id": "7b9a1104", "metadata": {}, "source": [ "# Ramsey Plans, Time Inconsistency, Sustainable Plans\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9794af8", + "id": "7532ebc4", "metadata": { "hide-output": false }, @@ -35,15 +35,15 @@ }, { "cell_type": "markdown", - "id": "4e651836", + "id": "a86acce4", "metadata": {}, "source": [ "## Overview\n", "\n", - "This lecture describes several linear-quadratic versions of a model that Guillermo Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] used to illustrate the **time inconsistency** of optimal government\n", + "This lecture describes several linear-quadratic versions of a model that Guillermo Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] used to illustrate the **time inconsistency** of optimal government\n", "plans.\n", "\n", - "Like Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)], we use these models as laboratories in which to explore consequences of timing protocols for government decision making.\n", + "Like Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)], we use these models as laboratories in which to explore consequences of timing protocols for government decision making.\n", "\n", "The models focus attention on intertemporal tradeoffs between\n", "\n", @@ -64,9 +64,9 @@ "\n", "A theme of this lecture is that timing protocols affect outcomes.\n", "\n", - "We’ll use ideas from papers by Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id78)], Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)], Stokey [[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id223)], [[Stokey, 1991](https://python-advanced.quantecon.org/zreferences.html#id75)],\n", - "Chari and Kehoe [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id216)], Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)], and Abreu [[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id74)] as\n", - "well as from chapter 19 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)].\n", + "We’ll use ideas from papers by Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id79)], Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)], Stokey [[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id224)], [[Stokey, 1991](https://python-advanced.quantecon.org/zreferences.html#id76)],\n", + "Chari and Kehoe [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id217)], Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)], and Abreu [[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id75)] as\n", + "well as from chapter 19 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)].\n", "\n", "In addition, we’ll use ideas from linear-quadratic dynamic programming\n", "described in [Linear Quadratic Control](https://python-intro.quantecon.org/lqcontrol.html) as applied to Ramsey problems in [Stackelberg problems](https://python-advanced.quantecon.org/dyn_stack.html).\n", @@ -77,7 +77,7 @@ "\n", "A sister lecture [Machine Learning a Ramsey Plan](https://python-advanced.quantecon.org/calvo_machine_learn.html) studies some of the same models but does not use dynamic programming.\n", "\n", - "Instead it uses a **machine learning** approach that does not explicitly recognize the recursive structure structure of the Ramsey problem that Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] saw and that we exploit in this lecture.\n", + "Instead it uses a **machine learning** approach that does not explicitly recognize the recursive structure structure of the Ramsey problem that Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] saw and that we exploit in this lecture.\n", "\n", "In addition to what’s in Anaconda, this lecture will use the following libraries:" ] @@ -85,7 +85,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16ea65a5", + "id": "5e1d8f8a", "metadata": { "hide-output": false }, @@ -96,7 +96,7 @@ }, { "cell_type": "markdown", - "id": "b5b65ddb", + "id": "206779c4", "metadata": {}, "source": [ "We’ll start with some imports:" @@ -105,7 +105,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d93f82ec", + "id": "d7f5696f", "metadata": { "hide-output": false }, @@ -121,7 +121,7 @@ }, { "cell_type": "markdown", - "id": "d3038748", + "id": "217ca630", "metadata": {}, "source": [ "## Model Components\n", @@ -137,7 +137,7 @@ "\n", "\n", "The demand for real balances is governed by a perfect foresight\n", - "version of a Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id78)] demand function for real balances:\n", + "version of a Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id79)] demand function for real balances:\n", "\n", "\n", "\n", @@ -153,7 +153,7 @@ "\n", "(When there is no uncertainty, an assumption of **rational expectations** that becomes equivalent to **perfect foresight**).\n", "\n", - "(See [[Sargent, 1977](https://python-advanced.quantecon.org/zreferences.html#id79)] for a rational expectations version of the model when there is uncertainty.)\n", + "(See [[Sargent, 1977](https://python-advanced.quantecon.org/zreferences.html#id80)] for a rational expectations version of the model when there is uncertainty.)\n", "\n", "Subtracting the demand function [(42.1)](#equation-eq-old1) at time $ t $ from the demand\n", "function at $ t+1 $ gives:\n", @@ -190,7 +190,7 @@ "\\theta_t = \\frac{1}{1+\\alpha} \\sum_{j=0}^\\infty \\left(\\frac{\\alpha}{1+\\alpha}\\right)^j \\mu_{t+j} \\tag{42.3}\n", "$$\n", "\n", - "**Insight:** In the spirit of Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)], equations [(42.1)](#equation-eq-old1) and [(42.3)](#equation-eq-old3) show that $ \\theta_t $ intermediates\n", + "**Insight:** In the spirit of Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)], equations [(42.1)](#equation-eq-old1) and [(42.3)](#equation-eq-old3) show that $ \\theta_t $ intermediates\n", "how choices of $ \\mu_{t+j}, \\ j=0, 1, \\ldots $ impinge on time $ t $\n", "real balances $ m_t - p_t = -\\alpha \\theta_t $.\n", "\n", @@ -264,7 +264,7 @@ }, { "cell_type": "markdown", - "id": "6a01d0b8", + "id": "180b220c", "metadata": {}, "source": [ "## Friedman’s Optimal Rate of Deflation\n", @@ -297,21 +297,21 @@ }, { "cell_type": "markdown", - "id": "c99df300", + "id": "1f271549", "metadata": {}, "source": [ "## Calvo’s Distortion of Friedman’s optimal Deflation Rate\n", "\n", - "The starting point of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] and Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)]\n", + "The starting point of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] and Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)]\n", "is that such lump sum taxes are not available.\n", "\n", "Instead, the government acquires money by levying taxes that distort decisions and thereby impose costs on the representative consumer.\n", "\n", - "In the models of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] and Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)], the government takes those costs tax-distortion costs into account.\n", + "In the models of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] and Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)], the government takes those costs tax-distortion costs into account.\n", "\n", "It balances the costs of imposing the distorting taxes needed to acquire the money that it destroys in order to generate deflation against the benefits that expected deflation generates by raising the representative households’ holdings of real balances.\n", "\n", - "Let’s see how the government does that in our version of the models of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] and Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)].\n", + "Let’s see how the government does that in our version of the models of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] and Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)].\n", "\n", "Via equation [(42.3)](#equation-eq-old3), a government plan\n", "$ \\vec \\mu = \\{\\mu_t \\}_{t=0}^\\infty $ leads to a\n", @@ -378,7 +378,7 @@ }, { "cell_type": "markdown", - "id": "b1c51f8b", + "id": "a31b6925", "metadata": {}, "source": [ "## Structure\n", @@ -415,7 +415,7 @@ }, { "cell_type": "markdown", - "id": "6446e97d", + "id": "6c02c27a", "metadata": {}, "source": [ "## Intertemporal Structure\n", @@ -443,7 +443,7 @@ }, { "cell_type": "markdown", - "id": "a5caaae0", + "id": "657337d2", "metadata": {}, "source": [ "## Four Timing Protocols\n", @@ -498,8 +498,8 @@ "\n", "The fourth model describes a **credible government policy** also known as a **sustainable plan**\n", "\n", - "The relationship between outcomes in the first (Ramsey) timing protocol and the fourth timing protocol and belief structure is the subject of a literature on **sustainable** or **credible** public policies (Chari and Kehoe [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id216)]\n", - "[[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id223)], and Stokey [[Stokey, 1991](https://python-advanced.quantecon.org/zreferences.html#id75)]).\n", + "The relationship between outcomes in the first (Ramsey) timing protocol and the fourth timing protocol and belief structure is the subject of a literature on **sustainable** or **credible** public policies (Chari and Kehoe [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id217)]\n", + "[[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id224)], and Stokey [[Stokey, 1991](https://python-advanced.quantecon.org/zreferences.html#id76)]).\n", "\n", "We’ll discuss that topic later in this lecture.\n", "\n", @@ -508,7 +508,7 @@ }, { "cell_type": "markdown", - "id": "daa2a1ee", + "id": "908fe619", "metadata": {}, "source": [ "## A Ramsey Planner\n", @@ -517,7 +517,7 @@ "$ \\{\\mu_t, \\theta_t\\}_{t=0}^\\infty $ to maximize [(42.11)](#equation-eq-old7)\n", "subject to the law of motion [(42.5)](#equation-eq-old4).\n", "\n", - "We can split this problem into two stages, as in [Stackelberg problems](https://python-advanced.quantecon.org/dyn_stack.html) and [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)] Chapter 19.\n", + "We can split this problem into two stages, as in [Stackelberg problems](https://python-advanced.quantecon.org/dyn_stack.html) and [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)] Chapter 19.\n", "\n", "In the first stage, we take the initial inflation rate $ \\theta_0 $ as given\n", "and solve what looks like an ordinary LQ discounted dynamic programming problem.\n", @@ -535,7 +535,7 @@ }, { "cell_type": "markdown", - "id": "1ebe23b0", + "id": "03ce2bd8", "metadata": {}, "source": [ "### Subproblem 1\n", @@ -661,7 +661,7 @@ }, { "cell_type": "markdown", - "id": "9db8cf00", + "id": "7aab9e56", "metadata": {}, "source": [ "### Subproblem 2\n", @@ -700,13 +700,13 @@ }, { "cell_type": "markdown", - "id": "e7c4b674", + "id": "92f8ed17", "metadata": {}, "source": [ "## Representation of Ramsey Plan\n", "\n", "The preceding calculations indicate that we can represent a Ramsey plan\n", - "$ \\vec \\mu $ recursively with the following system created in the spirit of Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)]:\n", + "$ \\vec \\mu $ recursively with the following system created in the spirit of Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)]:\n", "\n", "\n", "\n", @@ -777,7 +777,7 @@ }, { "cell_type": "markdown", - "id": "37efe951", + "id": "761f72b2", "metadata": {}, "source": [ "## Digression on Timeless Perspective\n", @@ -793,7 +793,7 @@ }, { "cell_type": "markdown", - "id": "6dbd42d1", + "id": "ef666348", "metadata": {}, "source": [ "### Multiple roles of $ \\theta_t $\n", @@ -815,7 +815,7 @@ }, { "cell_type": "markdown", - "id": "ccc483d1", + "id": "cca05bf0", "metadata": {}, "source": [ "### Time inconsistency\n", @@ -833,7 +833,7 @@ }, { "cell_type": "markdown", - "id": "2c6bff4a", + "id": "f75c7a65", "metadata": {}, "source": [ "## Constrained-to-Constant-Growth-Rate Ramsey Plan\n", @@ -889,7 +889,7 @@ }, { "cell_type": "markdown", - "id": "bfe2103c", + "id": "49cde32f", "metadata": {}, "source": [ "## Markov Perfect Governments\n", @@ -1007,7 +1007,7 @@ }, { "cell_type": "markdown", - "id": "24b7c5c4", + "id": "1c0128b5", "metadata": {}, "source": [ "## Outcomes under Three Timing Protocols\n", @@ -1063,7 +1063,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d9ebee47", + "id": "10c1a30e", "metadata": { "hide-output": false }, @@ -1184,7 +1184,7 @@ }, { "cell_type": "markdown", - "id": "6e632077", + "id": "1107c64f", "metadata": {}, "source": [ "Let’s create an instance of ChangLQ with the following parameters:" @@ -1193,7 +1193,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c2437e17", + "id": "370a5f29", "metadata": { "hide-output": false }, @@ -1204,7 +1204,7 @@ }, { "cell_type": "markdown", - "id": "83026677", + "id": "0109e790", "metadata": {}, "source": [ "The following code plots value functions for a continuation Ramsey\n", @@ -1214,7 +1214,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94fc6ed8", + "id": "aca2c57b", "metadata": { "hide-output": false }, @@ -1284,7 +1284,7 @@ }, { "cell_type": "markdown", - "id": "360a3d72", + "id": "157b570c", "metadata": {}, "source": [ "The dotted line in the above graph is the 45-degree line.\n", @@ -1318,7 +1318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "09fc9b0d", + "id": "ae569687", "metadata": { "hide-output": false }, @@ -1359,7 +1359,7 @@ }, { "cell_type": "markdown", - "id": "ff016c6c", + "id": "56f7bc88", "metadata": {}, "source": [ "In the above graph, notice that $ \\theta^* < \\theta_\\infty^R < \\theta^{CR} < \\theta_0^R < \\theta^{MPE} . $\n", @@ -1370,7 +1370,7 @@ }, { "cell_type": "markdown", - "id": "da7c2fe5", + "id": "c2412b07", "metadata": {}, "source": [ "### Ramsey Planner’s Value Function\n", @@ -1404,7 +1404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cbdaa3bb", + "id": "dd1c3e21", "metadata": { "hide-output": false }, @@ -1417,7 +1417,7 @@ }, { "cell_type": "markdown", - "id": "850c91c8", + "id": "8222c6f0", "metadata": {}, "source": [ "So our claim that $ J(\\theta_\\infty^R) = V^{CR}(\\theta_\\infty^R) $is verified numerically.\n", @@ -1444,7 +1444,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4bbb3050", + "id": "5925c69a", "metadata": { "hide-output": false }, @@ -1558,7 +1558,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23b19862", + "id": "0c162f53", "metadata": { "hide-output": false }, @@ -1575,7 +1575,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a7e808db", + "id": "e9076dbf", "metadata": { "hide-output": false }, @@ -1586,7 +1586,7 @@ }, { "cell_type": "markdown", - "id": "eea0c885", + "id": "659e1010", "metadata": {}, "source": [ "The above graphs and table convey many useful things.\n", @@ -1617,7 +1617,7 @@ { "cell_type": "code", "execution_count": null, - "id": "706e0461", + "id": "0badd29e", "metadata": { "hide-output": false }, @@ -1634,7 +1634,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8af8a665", + "id": "d09fe2ab", "metadata": { "hide-output": false }, @@ -1645,7 +1645,7 @@ }, { "cell_type": "markdown", - "id": "7344daf7", + "id": "005fc123", "metadata": {}, "source": [ "The above table and figures show how\n", @@ -1663,7 +1663,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a73fdbd7", + "id": "9c666608", "metadata": { "hide-output": false }, @@ -1679,13 +1679,13 @@ }, { "cell_type": "markdown", - "id": "443c52e5", + "id": "5886073b", "metadata": {}, "source": [ "The above graphs indicate that as $ c $ approaches zero, $ \\theta_\\infty^R, \\theta_0^R, \\theta^{CR} $,\n", "and $ \\theta^{MPE} $ all approach $ \\theta^* $.\n", "\n", - "This makes sense, because it was by adding costs of distorting taxes that Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] drove a wedge between Friedman’s optimal deflation rate and the inflation rates chosen by a Ramsey planner.\n", + "This makes sense, because it was by adding costs of distorting taxes that Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] drove a wedge between Friedman’s optimal deflation rate and the inflation rates chosen by a Ramsey planner.\n", "\n", "The following code plots sequences $ \\vec \\mu $ and $ \\vec \\theta $ prescribed by a Ramsey plan as well as the constant levels $ \\mu^{CR} $ and $ \\mu^{MPE} $.\n", "\n", @@ -1703,7 +1703,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d19ad623", + "id": "1e8f0e5b", "metadata": { "hide-output": false }, @@ -1770,7 +1770,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5a22060", + "id": "3d3b222a", "metadata": { "hide-output": false }, @@ -1784,7 +1784,7 @@ }, { "cell_type": "markdown", - "id": "55e2eb5e", + "id": "cdd24e4f", "metadata": {}, "source": [ "Notice how $ d_1 $ changes as we raise the discount factor parameter $ \\beta $.\n", @@ -1795,7 +1795,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ded8810", + "id": "c975703f", "metadata": { "hide-output": false }, @@ -1810,7 +1810,7 @@ }, { "cell_type": "markdown", - "id": "cc0ce333", + "id": "036930b2", "metadata": {}, "source": [ "Evidently, increasing $ c $ causes the decay factor $ d_1 $ to increase.\n", @@ -1822,7 +1822,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2bec40cb", + "id": "4e2818bc", "metadata": { "hide-output": false }, @@ -1837,7 +1837,7 @@ }, { "cell_type": "markdown", - "id": "1933387f", + "id": "bdfabbb2", "metadata": {}, "source": [ "The above panels for an $ \\alpha = 4 $ setting indicate that $ \\alpha $ and $ c $ affect outcomes\n", @@ -1848,7 +1848,7 @@ }, { "cell_type": "markdown", - "id": "86550665", + "id": "b8436816", "metadata": {}, "source": [ "### Time Inconsistency of Ramsey Plan\n", @@ -1873,7 +1873,7 @@ }, { "cell_type": "markdown", - "id": "1c3fb0fb", + "id": "1526ec6a", "metadata": {}, "source": [ "### Implausibility of Ramsey Plan\n", @@ -1895,13 +1895,13 @@ }, { "cell_type": "markdown", - "id": "2e165893", + "id": "06693c71", "metadata": {}, "source": [ "### Ramsey Plan Strikes Back\n", "\n", - "Research by Abreu [[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id74)], Chari and Kehoe [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id216)]\n", - "[[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id223)], and Stokey [[Stokey, 1991](https://python-advanced.quantecon.org/zreferences.html#id75)] discovered conditions under which a Ramsey plan can be rescued from the complaint that it is not credible.\n", + "Research by Abreu [[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id75)], Chari and Kehoe [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id217)]\n", + "[[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id224)], and Stokey [[Stokey, 1991](https://python-advanced.quantecon.org/zreferences.html#id76)] discovered conditions under which a Ramsey plan can be rescued from the complaint that it is not credible.\n", "\n", "They accomplished this by expanding the\n", "description of a plan to include expectations about *adverse consequences* of deviating from\n", @@ -1912,7 +1912,7 @@ }, { "cell_type": "markdown", - "id": "270ce422", + "id": "7fc11e3d", "metadata": {}, "source": [ "## A Fourth Model of Government Decision Making\n", @@ -1935,7 +1935,7 @@ }, { "cell_type": "markdown", - "id": "271f5337", + "id": "dc77f09d", "metadata": {}, "source": [ "### Government Decisions\n", @@ -1971,7 +1971,7 @@ }, { "cell_type": "markdown", - "id": "c15ecc48", + "id": "e63a4f22", "metadata": {}, "source": [ "### Temptation to Deviate from Plan\n", @@ -2003,7 +2003,7 @@ }, { "cell_type": "markdown", - "id": "cbbc3bbb", + "id": "b3a6f338", "metadata": {}, "source": [ "## Sustainable or Credible Plan\n", @@ -2046,7 +2046,7 @@ }, { "cell_type": "markdown", - "id": "bf648a14", + "id": "fa16cad4", "metadata": {}, "source": [ "### Abreu’s Self-Enforcing Plan\n", @@ -2112,18 +2112,18 @@ "the government’s choice at time $ t $ fails to confirm private\n", "agents’ expectation.\n", "\n", - "We shall use a construction featured in Abreu ([[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id74)]) to construct a\n", + "We shall use a construction featured in Abreu ([[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id75)]) to construct a\n", "self-enforcing plan with low time $ 0 $ value." ] }, { "cell_type": "markdown", - "id": "b6684a1b", + "id": "49053853", "metadata": {}, "source": [ "### Abreu’s Carrot-Stick Plan\n", "\n", - "Abreu ([[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id74)]) invented a way to create a self-enforcing plan with a low\n", + "Abreu ([[Abreu, 1988](https://python-advanced.quantecon.org/zreferences.html#id75)]) invented a way to create a self-enforcing plan with a low\n", "initial value.\n", "\n", "Imitating his idea, we can construct a self-enforcing plan\n", @@ -2160,7 +2160,7 @@ }, { "cell_type": "markdown", - "id": "2a2b3cc7", + "id": "60788ff5", "metadata": {}, "source": [ "### Example of Self-Enforcing Plan\n", @@ -2189,7 +2189,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f150a611", + "id": "9d2eeb95", "metadata": { "hide-output": false }, @@ -2247,7 +2247,7 @@ }, { "cell_type": "markdown", - "id": "f447c48e", + "id": "d15b75dc", "metadata": {}, "source": [ "To confirm that the plan $ \\vec \\mu^A $ is **self-enforcing**, we\n", @@ -2270,7 +2270,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a97e0dd5", + "id": "dcb836fe", "metadata": { "hide-output": false }, @@ -2281,7 +2281,7 @@ }, { "cell_type": "markdown", - "id": "8a574701", + "id": "2396ed38", "metadata": {}, "source": [ "Given that plan $ \\vec \\mu^A $ is self-enforcing, we can check that\n", @@ -2295,7 +2295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7310a840", + "id": "e0eb343c", "metadata": { "hide-output": false }, @@ -2316,7 +2316,7 @@ }, { "cell_type": "markdown", - "id": "d15a7744", + "id": "63c88242", "metadata": {}, "source": [ "### Recursive Representation of a Sustainable Plan\n", @@ -2353,7 +2353,7 @@ }, { "cell_type": "markdown", - "id": "58de7125", + "id": "5bf6347b", "metadata": {}, "source": [ "## Whose Plan is It?\n", @@ -2376,7 +2376,7 @@ }, { "cell_type": "markdown", - "id": "39cf1e2c", + "id": "aa6ff94b", "metadata": {}, "source": [ "## Comparison of Equilibrium Values\n", @@ -2401,7 +2401,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2cf40895", + "id": "f5cc01c7", "metadata": { "hide-output": false }, @@ -2413,7 +2413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f41f2f35", + "id": "fc161a09", "metadata": { "hide-output": false }, @@ -2425,7 +2425,7 @@ { "cell_type": "code", "execution_count": null, - "id": "51c0a1fb", + "id": "7c50cfe6", "metadata": { "hide-output": false }, @@ -2436,7 +2436,7 @@ }, { "cell_type": "markdown", - "id": "d0ee72fa", + "id": "051e1237", "metadata": {}, "source": [ "We have also computed **credible plans** for a government or sequence\n", @@ -2451,7 +2451,7 @@ }, { "cell_type": "markdown", - "id": "399e1140", + "id": "ce7761ec", "metadata": {}, "source": [ "## Note on Dynamic Programming Squared\n", @@ -2473,7 +2473,7 @@ } ], "metadata": { - "date": 1724218393.8210907, + "date": 1728369868.1044056, "filename": "calvo.md", "kernelspec": { "display_name": "Python", diff --git a/calvo_machine_learn.ipynb b/calvo_machine_learn.ipynb index 2c4d336..4e90b7d 100644 --- a/calvo_machine_learn.ipynb +++ b/calvo_machine_learn.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4a45ff17", + "id": "dda10c83", "metadata": {}, "source": [ "# Machine Learning a Ramsey Plan" @@ -10,23 +10,24 @@ }, { "cell_type": "markdown", - "id": "0dd797f4", + "id": "571e39f0", "metadata": {}, "source": [ "## Introduction\n", "\n", - "This lecture studies a problem that we study from another angle in this quantecon lecture\n", - "[Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html).\n", + "This lecture uses what we call a `machine learning` approach to\n", + "compute a Ramsey plan for a version of a model of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)].\n", "\n", - "Both lectures compute a Ramsey plan for a version of a model of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)].\n", + "We use another approach to compute a Ramsey plan for Calvo’s model in another quantecon lecture\n", + "[Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html).\n", "\n", "The [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html) lecture uses an analytic approach based on `dynamic programming squared` to guide computations.\n", "\n", "Dynamic programming squared provides information about the structure of mathematical objects in terms of which a Ramsey plan can be represented recursively.\n", "\n", - "That paves the way to computing a Ramsey plan efficiently.\n", + "Using that information paves the way to computing a Ramsey plan efficiently.\n", "\n", - "Included in the structural information that dynamic programming squared provides in quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html) are descriptions of\n", + "Included in the structural information that dynamic programming squared provides in quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html) are\n", "\n", "- a **state** variable that confronts a continuation Ramsey planner, and \n", "- two **Bellman equations** \n", @@ -34,11 +35,9 @@ " - another that describes decision problems of a Ramsey planner and of a continuation Ramsey planner \n", "\n", "\n", - "In this lecture, we approach the Ramsey planner in a less sophisticated way.\n", - "\n", - "We proceed without knowing the mathematical structure imparted by dynamic programming squared.\n", + "In this lecture, we approach the Ramsey planner in a less sophisticated way that proceeds without knowing the mathematical structure imparted by dynamic programming squared.\n", "\n", - "Instead, we use a brute force approach that simply chooses a pair of infinite sequences of real numbers that maximizes a Ramsey planner’s objective function.\n", + "We simply choose a pair of infinite sequences of real numbers that maximizes a Ramsey planner’s objective function.\n", "\n", "The pair consists of\n", "\n", @@ -46,7 +45,7 @@ "- a sequence $ \\vec \\mu $ of money growh rates \n", "\n", "\n", - "Because it fails to take advantage of the structure recognized by dynamic programming squared and instead proliferates parameters, we take the liberty of calling this a **machine learning** approach.\n", + "Because it fails to take advantage of the structure recognized by dynamic programming squared and, relative to the dynamic programming squared approach, proliferates parameters, we take the liberty of calling this a **machine learning** approach.\n", "\n", "This is similar to what other machine learning algorithms also do.\n", "\n", @@ -54,39 +53,40 @@ "with a laboratory that can help us appreciate promises and limits of machine learning approaches\n", "more generally.\n", "\n", - "We’ll actually deploy two machine learning approaches.\n", + "In this lecture, we’ll actually deploy two machine learning approaches.\n", "\n", "- the first is really lazy \n", - " - it just writes a Python function to computes the Ramsey planner’s objective as a function of a money growth rate sequence and then hands it over to a gradient descent optimizer \n", + " - it writes a Python function that computes the Ramsey planner’s objective as a function of a money growth rate sequence and hands it over to a `gradient descent` optimizer \n", "- the second is less lazy \n", - " - it exerts the effort required to express the Ramsey planner’s objective as an affine quadratic form in $ \\vec \\mu $, computes first-order conditions for an optimum, arranges them into a system of simultaneous linear equations for $ \\vec \\mu $ and then $ \\vec \\theta $, then solves them. \n", + " - it exerts the mental effort required to express the Ramsey planner’s objective as an affine quadratic form in $ \\vec \\mu $, computes first-order conditions for an optimum, arranges them into a system of simultaneous linear equations for $ \\vec \\mu $ and then $ \\vec \\theta $, then solves them. \n", "\n", "\n", - "While both of these machine learning (ML) approaches succeed in recovering the Ramsey plan that we also compute in quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html) by using dynamic programming squared, they don’t reveal the recursive structure of the Ramsey plan described in that lecture.\n", + "Each of these machine learning (ML) approaches recovers the same Ramsey plan that shall compute in quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html) by using dynamic programming squared.\n", "\n", - "That recursive structure lies hidden within some of the objects calculated by our ML approach.\n", + "However, they conceal the recursive structure of the Ramsey plan.\n", "\n", - "We can ferret out some of that structure if we ask the right questions.\n", + "That recursive structure lies hidden within some of the objects calculated by our ML approaches.\n", "\n", - "At the end of this lecture we describe some of those questions are and how they can be answered by running particular linear regressions on components of\n", - "$ \\vec \\mu, \\vec \\theta $.\n", + "Nevertheless, we can ferret out some of that structure by asking the right questions.\n", "\n", - "Human intelligence, not the artificial intelligence deployed in our machine learning approach, is a key input into choosing which regressions to run." + "We pose those questions at the end of this lecture and answer them by running particulars some linear regressions on components of $ \\vec \\mu, \\vec \\theta $.\n", + "\n", + "Human intelligence, not the `artificial intelligence` deployed in our machine learning approach, is a key input into choosing which regressions to run." ] }, { "cell_type": "markdown", - "id": "31161165", + "id": "c08d644e", "metadata": {}, "source": [ "## The Model\n", "\n", - "We study a linear-quadratic version of a model that Guillermo Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] used to illustrate the **time inconsistency** of optimal government plans.\n", + "We study a linear-quadratic version of a model that Guillermo Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] used to illustrate the **time inconsistency** of optimal government plans.\n", "\n", - "The model focuses attention on intertemporal tradeoffs between\n", + "The model focuses on intertemporal tradeoffs between\n", "\n", - "- utility that a representative agent’s anticipations of future deflation generate by lowering the costs of holding real money balances and thereby increasing the agent’s *liquidity*, as measured by holdings of real money balances, and \n", - "- social costs associated with the distorting taxes that a government levies to acquire the paper money that it destroys in order to generate anticipated deflation \n", + "- utility that a representative agent’s anticipations of future deflation delivered by lowering the agent’s cost of holding real money balances and thereby increasing the agent’s *liquidity*, as ultimately measured by the agent’s holdings of real money balances, and \n", + "- social costs associated with the distorting taxes that a government levies to acquire the paper money that it destroys in order to generate prospective deflation \n", "\n", "\n", "The model features\n", @@ -95,12 +95,12 @@ "- costly government actions at all dates $ t \\geq 1 $ that increase household utilities at dates before $ t $ \n", "\n", "\n", - "The model combines ideas from papers by Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id78)] and Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)]." + "The model combines ideas from papers by Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id79)], [[Sargent and Wallace, 1973](https://python-advanced.quantecon.org/zreferences.html#id3)], and Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)]." ] }, { "cell_type": "markdown", - "id": "36e50629", + "id": "5f1b6462", "metadata": {}, "source": [ "## Model Components\n", @@ -116,7 +116,7 @@ "\n", "\n", "The demand for real balances is governed by a perfect foresight\n", - "version of a Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id78)] demand function for real balances:\n", + "version of a Cagan [[Cagan, 1956](https://python-advanced.quantecon.org/zreferences.html#id79)] demand function for real balances:\n", "\n", "\n", "\n", @@ -152,7 +152,7 @@ }, { "cell_type": "markdown", - "id": "198d1643", + "id": "be81cd26", "metadata": {}, "source": [ "## \n", @@ -198,7 +198,7 @@ "\n", "Via equation [(41.3)](#equation-eq-grad-old3), a government plan\n", "$ \\vec \\mu = \\{\\mu_t \\}_{t=0}^\\infty $ leads to a\n", - "sequence of inflation outcomes\n", + "sequence of inflation rates\n", "$ \\vec \\theta = \\{ \\theta_t \\}_{t=0}^\\infty $.\n", "\n", "We assume that the government incurs social costs $ \\frac{c}{2} \\mu_t^2 $ at\n", @@ -224,17 +224,41 @@ "\n", "The Ramsey planner chooses\n", "a vector of money growth rates $ \\vec \\mu $\n", - "to maximize criterion [(41.6)](#equation-eq-ramseyv) subject to equations [(41.3)](#equation-eq-grad-old3)." + "to maximize criterion [(41.6)](#equation-eq-ramseyv) subject to equations [(41.3)](#equation-eq-grad-old3) and a restriction\n", + "requiring that\n", + "\n", + "\n", + "\n", + "$$\n", + "\\vec \\theta \\in L^2 \\tag{41.7}\n", + "$$\n", + "\n", + "Notice equations [(41.3)](#equation-eq-grad-old3) and [(41.7)](#equation-eq-thetainl2) imply that $ \\vec \\theta $ is a function\n", + "of $ \\vec \\mu $.\n", + "\n", + "In particular, the inflation rate $ \\theta_t $ satisfies\n", + "\n", + "\n", + "\n", + "$$\n", + "\\theta_t = (1-\\lambda) \\sum_{j=0}^\\infty \\lambda^j \\mu_{t+j}, \\quad t \\geq 0 \\tag{41.8}\n", + "$$\n", + "\n", + "where\n", + "\n", + "$$\n", + "\\lambda = \\frac{\\alpha}{1+\\alpha} .\n", + "$$" ] }, { "cell_type": "markdown", - "id": "a7192ccb", + "id": "69410a43", "metadata": {}, "source": [ "## Parameters and Variables\n", "\n", - "**Parameters** are\n", + "**Parameters:**\n", "\n", "- Demand for money parameter is $ \\alpha > 0 $; we set its default value $ \\alpha = 1 $ \n", " - Induced demand function for money parameter is $ \\lambda = \\frac{\\alpha}{1+\\alpha} $ \n", @@ -243,7 +267,7 @@ "- Truncation parameter: a positive integer $ T >0 $ \n", "\n", "\n", - "**Variables** are\n", + "**Variables:**\n", "\n", "- $ \\theta_t = p_{t+1} - p_t $ where $ p_t $ is log of price level \n", "- $ \\mu_t = m_{t+1} - m_t $ where $ m_t $ is log of money supply " @@ -251,7 +275,7 @@ }, { "cell_type": "markdown", - "id": "0ae8bf3d", + "id": "3036cade", "metadata": {}, "source": [ "### Basic Objects\n", @@ -273,7 +297,7 @@ "\n", "$$\n", "V = \\sum_{t=0}^\\infty \\beta^t (h_0 + h_1 \\theta_t + h_2 \\theta_t^2 -\n", - "\\frac{c}{2} \\mu_t^2 ) \\tag{41.7}\n", + "\\frac{c}{2} \\mu_t^2 ) \\tag{41.9}\n", "$$\n", "\n", "where we set $ h_0, h_1, h_2 $ to match\n", @@ -298,29 +322,15 @@ "\\end{aligned}\n", "$$\n", "\n", - "The inflation rate $ \\theta_t $ satisfies\n", - "\n", - "\n", - "\n", - "$$\n", - "\\theta_t = (1-\\lambda) \\sum_{j=0}^\\infty \\lambda^j \\mu_{t+j}, \\quad t \\geq 0 \\tag{41.8}\n", - "$$\n", - "\n", - "where\n", - "\n", - "$$\n", - "\\lambda = \\frac{\\alpha}{1+\\alpha}\n", - "$$\n", - "\n", - "A Ramsey planner chooses $ \\vec \\mu $ to maximize the government’s value function [(41.7)](#equation-eq-ramseyvalue)\n", - "subject to equation [(41.8)](#equation-eq-inflation101).\n", + "A Ramsey planner chooses $ \\vec \\mu $ to maximize the government’s value function [(41.9)](#equation-eq-ramseyvalue)\n", + "subject to equations [(41.8)](#equation-eq-inflation101).\n", "\n", "A solution $ \\vec \\mu $ of this problem is called a **Ramsey plan**." ] }, { "cell_type": "markdown", - "id": "c0678594", + "id": "7c04b831", "metadata": {}, "source": [ "## Approximations\n", @@ -370,22 +380,22 @@ "\n", "\n", "$$\n", - "\\theta_t = (1-\\lambda) \\sum_{j=0}^{T-1-t} \\lambda^j \\mu_{t+j} + \\lambda^{T-t} \\bar \\mu \\tag{41.9}\n", + "\\theta_t = (1-\\lambda) \\sum_{j=0}^{T-1-t} \\lambda^j \\mu_{t+j} + \\lambda^{T-t} \\bar \\mu \\tag{41.10}\n", "$$\n", "\n", "for $ t=0, 1, \\ldots, T-1 $ and $ \\bar \\theta = \\bar \\mu $.\n", "\n", "**Formula for $ V $**\n", "\n", - "Having computed the truncated vectors $ \\tilde \\mu $ and $ \\tilde \\theta $\n", - "as described above, we want to write a function that computes\n", + "Having specified a truncated vector $ \\tilde \\mu $ and and having computed $ \\tilde \\theta $\n", + "by using formula [(41.10)](#equation-eq-thetaformula102), we want to write a Python function that computes\n", "\n", "\n", "\n", "$$\n", "\\tilde V = \\sum_{t=0}^\\infty \\beta^t (\n", "h_0 + h_1 \\tilde\\theta_t + h_2 \\tilde\\theta_t^2 -\n", - "\\frac{c}{2} \\mu_t^2 ) \\tag{41.10}\n", + "\\frac{c}{2} \\mu_t^2 ) \\tag{41.11}\n", "$$\n", "\n", "or more precisely\n", @@ -400,12 +410,12 @@ }, { "cell_type": "markdown", - "id": "32476b10", + "id": "4e274d48", "metadata": {}, "source": [ "## A Gradient Descent Algorithm\n", "\n", - "We now describe code that maximizes the criterion function [(41.7)](#equation-eq-ramseyvalue) by choice of the truncated vector $ \\tilde \\mu $.\n", + "We now describe code that maximizes the criterion function [(41.9)](#equation-eq-ramseyvalue) subject to equations [(41.8)](#equation-eq-inflation101) by choice of the truncated vector $ \\tilde \\mu $.\n", "\n", "We use a brute force or `machine learning` approach that just hands our problem off to code that minimizes $ V $ with respect to the components of $ \\tilde \\mu $ by using gradient descent.\n", "\n", @@ -414,7 +424,7 @@ }, { "cell_type": "markdown", - "id": "e68d58bf", + "id": "0cc6439c", "metadata": {}, "source": [ "### Implementation\n", @@ -427,7 +437,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32f956c7", + "id": "51b75db9", "metadata": { "hide-output": false }, @@ -441,7 +451,7 @@ { "cell_type": "code", "execution_count": null, - "id": "508ead91", + "id": "224ede2a", "metadata": { "hide-output": false }, @@ -458,12 +468,12 @@ }, { "cell_type": "markdown", - "id": "aa24706a", + "id": "ed013890", "metadata": {}, "source": [ "We’ll eventually want to compare the results we obtain here to those that we obtain in those obtained in this quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html).\n", "\n", - "To enable us to do that, we copy the class `ChangLQ` that we used in that lecture.\n", + "To enable us to do that, we copy the class `ChangLQ` used in that lecture.\n", "\n", "We hide the cell that copies the class, but readers can find details of the class in this quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html)." ] @@ -471,7 +481,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94ecdcbd", + "id": "a4fc46ab", "metadata": { "hide-output": false }, @@ -592,7 +602,7 @@ }, { "cell_type": "markdown", - "id": "ab55ced1", + "id": "be0379a0", "metadata": {}, "source": [ "Now we compute the value of $ V $ under this setup, and compare it against those obtained in this section [Outcomes under Three Timing Protocols](https://python-advanced.quantecon.org/calvo.html#compute-lq) of the sister quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html)." @@ -601,7 +611,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6b61cb28", + "id": "84e614e9", "metadata": { "hide-output": false }, @@ -615,7 +625,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6fca47e8", + "id": "bf1d4fbc", "metadata": { "hide-output": false }, @@ -673,7 +683,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9806548d", + "id": "4a1af6ea", "metadata": { "hide-output": false }, @@ -687,7 +697,7 @@ }, { "cell_type": "markdown", - "id": "4a27fbaa", + "id": "be582462", "metadata": {}, "source": [ "Now we want to maximize the function $ V $ by choice of $ \\mu $.\n", @@ -698,7 +708,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9a87bb6d", + "id": "3c4ea1db", "metadata": { "hide-output": false }, @@ -738,7 +748,7 @@ }, { "cell_type": "markdown", - "id": "3f08d9e9", + "id": "d075a021", "metadata": {}, "source": [ "Here we use automatic differentiation functionality in JAX with `grad`." @@ -747,7 +757,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c7cba6b6", + "id": "f96b7d56", "metadata": { "hide-output": false }, @@ -764,7 +774,7 @@ { "cell_type": "code", "execution_count": null, - "id": "00cf9b78", + "id": "962d63ef", "metadata": { "hide-output": false }, @@ -781,7 +791,7 @@ { "cell_type": "code", "execution_count": null, - "id": "aab63272", + "id": "9bd55b2d", "metadata": { "hide-output": false }, @@ -793,7 +803,7 @@ { "cell_type": "code", "execution_count": null, - "id": "281e40d8", + "id": "2a577bb5", "metadata": { "hide-output": false }, @@ -805,7 +815,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4cf98b55", + "id": "b90cdb9b", "metadata": { "hide-output": false }, @@ -817,7 +827,7 @@ { "cell_type": "code", "execution_count": null, - "id": "07a4c253", + "id": "d5aadc38", "metadata": { "hide-output": false }, @@ -828,16 +838,16 @@ }, { "cell_type": "markdown", - "id": "3d3dab6b", + "id": "84007fe3", "metadata": {}, "source": [ "### Restricting $ \\mu_t = \\bar \\mu $ for all $ t $\n", "\n", "We take a brief detour to solve a restricted version of the Ramsey problem defined above.\n", "\n", - "First, recall that a Ramsey planner chooses $ \\vec \\mu $ to maximize the government’s value function [(41.7)](#equation-eq-ramseyvalue)subject to equation [(41.8)](#equation-eq-inflation101).\n", + "First, recall that a Ramsey planner chooses $ \\vec \\mu $ to maximize the government’s value function [(41.9)](#equation-eq-ramseyvalue) subject to equations [(41.8)](#equation-eq-inflation101).\n", "\n", - "We now define a distinct problem in which the planner chooses $ \\vec \\mu $ to maximize the government’s value function [(41.7)](#equation-eq-ramseyvalue)subject to equation [(41.8)](#equation-eq-inflation101) and\n", + "We now define a distinct problem in which the planner chooses $ \\vec \\mu $ to maximize the government’s value function [(41.9)](#equation-eq-ramseyvalue) subject to equation [(41.8)](#equation-eq-inflation101) and\n", "the additional restriction that $ \\mu_t = \\bar \\mu $ for all $ t $.\n", "\n", "The solution of this problem is a time-invariant $ \\mu_t $ that this quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html) calls $ \\mu^{CR} $." @@ -846,7 +856,7 @@ { "cell_type": "code", "execution_count": null, - "id": "176da19f", + "id": "3e0700d1", "metadata": { "hide-output": false }, @@ -867,16 +877,16 @@ }, { "cell_type": "markdown", - "id": "cffe142b", + "id": "af88099b", "metadata": {}, "source": [ - "Compare it to $ \\mu^{CR} $ in [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html), we again obtained very close answers." + "Comparing it to $ \\mu^{CR} $ in [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html), we again obtained very close answers." ] }, { "cell_type": "code", "execution_count": null, - "id": "648e0aaa", + "id": "8efb7f73", "metadata": { "hide-output": false }, @@ -888,7 +898,7 @@ { "cell_type": "code", "execution_count": null, - "id": "465fba72", + "id": "6efda3e3", "metadata": { "hide-output": false }, @@ -901,7 +911,7 @@ { "cell_type": "code", "execution_count": null, - "id": "73ce16b2", + "id": "66b274a6", "metadata": { "hide-output": false }, @@ -912,14 +922,14 @@ }, { "cell_type": "markdown", - "id": "4241b59a", + "id": "a822ba81", "metadata": {}, "source": [ "## A More Structured ML Algorithm\n", "\n", - "By thinking a little harder about the mathematical structure of the Ramsey problem and using some linear algebra, we can simplify the problem that we hand over to a `machine learning` algorithm.\n", + "By thinking about the mathematical structure of the Ramsey problem and using some linear algebra, we can simplify the problem that we hand over to a `machine learning` algorithm.\n", "\n", - "We start by recalling that the Ramsey problem that chooses $ \\vec \\mu $ to maximize the government’s value function [(41.7)](#equation-eq-ramseyvalue)subject to equation [(41.8)](#equation-eq-inflation101).\n", + "We start by recalling that the Ramsey problem that chooses $ \\vec \\mu $ to maximize the government’s value function [(41.9)](#equation-eq-ramseyvalue)subject to equation [(41.8)](#equation-eq-inflation101).\n", "\n", "This is actually an optimization problem with a quadratic objective function and linear constraints.\n", "\n", @@ -957,7 +967,7 @@ " \\mu_T \\end{bmatrix}\n", "$$\n", "\n", - "Write the system of $ T+1 $ equations [(41.9)](#equation-eq-thetaformula102)\n", + "Write the system of $ T+1 $ equations [(41.10)](#equation-eq-thetaformula102)\n", "that relate $ \\vec \\theta $ to a choice of $ \\vec \\mu $ as the single matrix equation\n", "\n", "$$\n", @@ -997,7 +1007,7 @@ { "cell_type": "code", "execution_count": null, - "id": "03b8d0cb", + "id": "a0fd1386", "metadata": { "hide-output": false }, @@ -1016,7 +1026,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d4eedf49", + "id": "cfe5d153", "metadata": { "hide-output": false }, @@ -1030,7 +1040,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23e53dd9", + "id": "5de98559", "metadata": { "hide-output": false }, @@ -1044,7 +1054,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff9370e6", + "id": "8963b456", "metadata": { "hide-output": false }, @@ -1055,7 +1065,7 @@ }, { "cell_type": "markdown", - "id": "4f016d13", + "id": "6f29312e", "metadata": {}, "source": [ "As before, the Ramsey planner’s criterion is\n", @@ -1141,7 +1151,7 @@ }, { "cell_type": "markdown", - "id": "66e520bf", + "id": "38c039fc", "metadata": {}, "source": [ "### Two implementations\n", @@ -1152,7 +1162,7 @@ { "cell_type": "code", "execution_count": null, - "id": "540bf758", + "id": "befdb10f", "metadata": { "hide-output": false }, @@ -1180,7 +1190,7 @@ { "cell_type": "code", "execution_count": null, - "id": "20aeeec4", + "id": "9f7bce36", "metadata": { "hide-output": false }, @@ -1197,7 +1207,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e45cb380", + "id": "b392ab55", "metadata": { "hide-output": false }, @@ -1214,7 +1224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3f464870", + "id": "bbbd3fa2", "metadata": { "hide-output": false }, @@ -1226,7 +1236,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7e023e0", + "id": "583000dc", "metadata": { "hide-output": false }, @@ -1238,7 +1248,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3da05e39", + "id": "93cf41fd", "metadata": { "hide-output": false }, @@ -1250,7 +1260,7 @@ }, { "cell_type": "markdown", - "id": "35ef44fe", + "id": "4bdba509", "metadata": {}, "source": [ "We find that by exploiting more knowledge about the structure of the problem, we can significantly speed up our computation.\n", @@ -1261,7 +1271,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1ee0be05", + "id": "d4869ddb", "metadata": { "hide-output": false }, @@ -1288,7 +1298,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ef6f2130", + "id": "b5bdf950", "metadata": { "hide-output": false }, @@ -1300,7 +1310,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e84da83c", + "id": "30bf466b", "metadata": { "hide-output": false }, @@ -1312,7 +1322,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ac498f7d", + "id": "ca85661a", "metadata": { "hide-output": false }, @@ -1323,7 +1333,7 @@ }, { "cell_type": "markdown", - "id": "2cf3e5c3", + "id": "ad184d96", "metadata": {}, "source": [ "We can check the gradient of the analytical solution against the `JAX` computed version" @@ -1332,7 +1342,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3317a492", + "id": "34014ac7", "metadata": { "hide-output": false }, @@ -1360,7 +1370,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ed098048", + "id": "59a5541c", "metadata": { "hide-output": false }, @@ -1372,7 +1382,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15b30c26", + "id": "e0a44e30", "metadata": { "hide-output": false }, @@ -1384,7 +1394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d40c6d7", + "id": "0f0c6b54", "metadata": { "hide-output": false }, @@ -1395,14 +1405,14 @@ }, { "cell_type": "markdown", - "id": "ce84f3a2", + "id": "fd3e1f02", "metadata": {}, "source": [ "## Some Exploratory Regressions\n", "\n", - "To help us learn something about the structure of the Ramsey plan, we compute some least squares linear regressions of some components of $ \\vec \\theta $ and $ \\vec \\mu $ on others.\n", + "We compute some least squares linear regressions of some components of $ \\vec \\theta $ and $ \\vec \\mu $ on others.\n", "\n", - "Our hope is that these regressions will reveal structure hidden within the $ \\vec \\mu^R, \\vec \\theta^R $ sequences associated with a Ramsey plan.\n", + "We hope that these regressions will reveal structure hidden within the $ \\vec \\mu^R, \\vec \\theta^R $ sequences associated with a Ramsey plan.\n", "\n", "It is worth pausing to think about roles being played here by **human** intelligence and **artificial** intelligence.\n", "\n", @@ -1416,7 +1426,7 @@ "\n", ">**Note**\n", ">\n", - ">When we eventually get around to trying to understand the regressions below, it will worthwhile to study the reasoning that let Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] to choose\n", + ">When we eventually get around to trying to understand the regressions below, it will worthwhile to study the reasoning that let Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] to choose\n", "$ \\theta_t $ as his key state variable.\n", "\n", "We’ll begin by simply plotting the Ramsey plan’s $ \\mu_t $ and $ \\theta_t $ for $ t =0, \\ldots, T $ against $ t $.\n", @@ -1427,7 +1437,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0be78cb", + "id": "39ef282f", "metadata": { "hide-output": false }, @@ -1449,11 +1459,11 @@ }, { "cell_type": "markdown", - "id": "db651bee", + "id": "82f702fa", "metadata": {}, "source": [ - "Note that $ \\theta_t $ is less than $ \\mu_t $for low $ t $’s, but that it eventually converges to\n", - "the same limit $ \\bar \\mu $ that $ \\mu_t $ does.\n", + "Note that while $ \\theta_t $ is less than $ \\mu_t $for low $ t $’s, it eventually converges to\n", + "the limit $ \\bar \\mu $ of $ \\mu_t $ as $ t \\rightarrow +\\infty $.\n", "\n", "This pattern reflects how formula [(41.3)](#equation-eq-grad-old3) makes $ \\theta_t $ be a weighted average of future $ \\mu_t $’s.\n", "\n", @@ -1467,7 +1477,7 @@ { "cell_type": "code", "execution_count": null, - "id": "077abaf7", + "id": "a190d52f", "metadata": { "hide-output": false }, @@ -1485,16 +1495,16 @@ }, { "cell_type": "markdown", - "id": "2b6a75b6", + "id": "f1636abb", "metadata": {}, "source": [ - "Our regression tells us that along the Ramsey outcome $ \\vec \\mu, \\vec \\theta $ the linear function\n", + "Our regression tells us that the affine function\n", "\n", "$$\n", "\\mu_t = .0645 + 1.5995 \\theta_t\n", "$$\n", "\n", - "fits perfectly.\n", + "fits perfectly along the Ramsey outcome $ \\vec \\mu, \\vec \\theta $.\n", "\n", ">**Note**\n", ">\n", @@ -1506,7 +1516,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4a37a778", + "id": "4f09939f", "metadata": { "hide-output": false }, @@ -1522,7 +1532,7 @@ }, { "cell_type": "markdown", - "id": "e1a428f6", + "id": "1d6ba9f1", "metadata": {}, "source": [ "The time $ 0 $ pair $ (\\theta_0, \\mu_0) $ appears as the point on the upper right.\n", @@ -1535,7 +1545,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a13b0946", + "id": "5bff371d", "metadata": { "hide-output": false }, @@ -1555,7 +1565,7 @@ }, { "cell_type": "markdown", - "id": "3dcf4f8e", + "id": "f61a2af1", "metadata": {}, "source": [ "We find that the regression line fits perfectly and thus discover the affine relationship\n", @@ -1572,7 +1582,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c32d9a2f", + "id": "431958d6", "metadata": { "hide-output": false }, @@ -1590,7 +1600,7 @@ }, { "cell_type": "markdown", - "id": "fe374c4d", + "id": "b52d0b58", "metadata": {}, "source": [ "Points for succeeding times appear further and further to the lower left and eventually converge to\n", @@ -1599,12 +1609,12 @@ }, { "cell_type": "markdown", - "id": "b89dffd6", + "id": "d3647d3d", "metadata": {}, "source": [ "### Continuation Values\n", "\n", - "Next, we’ll compute a sequence $ \\{v_t\\}_{t=0}^T $ of what we’ll call “continuation values” along a Ramsey plan.\n", + "Next, we’ll compute a sequence $ \\{v_t\\}_{t=0}^T $ of what we’ll call `continuation values` along a Ramsey plan.\n", "\n", "To do so, we’ll start at date $ T $ and compute\n", "\n", @@ -1624,7 +1634,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5423927e", + "id": "f08456d7", "metadata": { "hide-output": false }, @@ -1661,10 +1671,10 @@ }, { "cell_type": "markdown", - "id": "bf5a99f8", + "id": "08f9f896", "metadata": {}, "source": [ - "The initial continuation value $ v_0 $ should equals the optimized value of the Ramsey planner’s criterion $ V $ defined\n", + "The initial continuation value $ v_0 $ should equal the optimized value of the Ramsey planner’s criterion $ V $ defined\n", "in equation [(41.6)](#equation-eq-ramseyv).\n", "\n", "Indeed, we find that the deviation is very small:" @@ -1673,7 +1683,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b60c9b21", + "id": "1a3c5c31", "metadata": { "hide-output": false }, @@ -1684,7 +1694,7 @@ }, { "cell_type": "markdown", - "id": "573baf28", + "id": "12599e01", "metadata": {}, "source": [ "We can also verify approximate equality by inspecting a graph of $ v_t $ against $ t $ for $ t=0, \\ldots, T $ along with the value attained by a restricted Ramsey planner $ V^{CR} $ and the optimized value of the ordinary Ramsey planner $ V^R $" @@ -1693,7 +1703,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3905d676", + "id": "8a496e3f", "metadata": { "hide-output": false }, @@ -1720,10 +1730,10 @@ }, { "cell_type": "markdown", - "id": "e779302c", + "id": "26c89c26", "metadata": {}, "source": [ - "Figure Fig. 41.1 shows several interesting patterns:\n", + "Figure Fig. 41.1 shows interesting patterns:\n", "\n", "- The sequence of continuation values $ \\{v_t\\}_{t=0}^T $ is monotonically decreasing \n", "- Evidently, $ v_0 > V^{CR} > v_T $ so that \n", @@ -1746,7 +1756,7 @@ { "cell_type": "code", "execution_count": null, - "id": "75e12822", + "id": "b0eb9f76", "metadata": { "hide-output": false }, @@ -1765,7 +1775,7 @@ }, { "cell_type": "markdown", - "id": "1eefd73f", + "id": "6e2e7dac", "metadata": {}, "source": [ "The regression has an $ R^2 $ equal to $ 1 $ and so fits perfectly.\n", @@ -1779,7 +1789,7 @@ { "cell_type": "code", "execution_count": null, - "id": "714b4e63", + "id": "a9010885", "metadata": { "hide-output": false }, @@ -1790,7 +1800,7 @@ }, { "cell_type": "markdown", - "id": "be7107fb", + "id": "2870b04c", "metadata": {}, "source": [ "Let’s plot $ v_t $ against $ \\theta_t $ along with the nonlinear regression line." @@ -1799,7 +1809,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ce4d4e4d", + "id": "64a8aadc", "metadata": { "hide-output": false }, @@ -1826,7 +1836,7 @@ }, { "cell_type": "markdown", - "id": "7ca2f056", + "id": "d372216f", "metadata": {}, "source": [ "The highest continuation value $ v_0 $ at $ t=0 $ appears at the peak of the function quadratic function\n", @@ -1841,7 +1851,7 @@ }, { "cell_type": "markdown", - "id": "463ea9d2", + "id": "e4d0c63d", "metadata": {}, "source": [ "## What has Machine Learning Taught Us?\n", @@ -1873,7 +1883,7 @@ "\\theta_0 & = \\theta_0^R \\\\\n", "\\mu_t & = b_0 + b_1 \\theta_t \\\\\n", "\\theta_{t+1} & = d_0 + d_1 \\theta_t \\\\\n", - "\\end{aligned} \\tag{41.11}\n", + "\\end{aligned} \\tag{41.12}\n", "$$\n", "\n", "where the initial value $ \\theta_0^R $ was computed along with other components of $ \\vec \\mu^R, \\vec \\theta^R $ when we computed the Ramsey plan, and where $ b_0, b_1, d_0, d_1 $ are parameters whose values we estimated with our regressions.\n", @@ -1886,9 +1896,9 @@ "\n", "We discovered these relationships by running some carefully chosen regressions and staring at the results, noticing that the $ R^2 $’s of unity tell us that the fits are perfect.\n", "\n", - "We have learned something about the structure of the Ramsey problem.\n", + "We have learned much about the structure of the Ramsey problem.\n", "\n", - "However, it is challenging to say more just by using the methods and ideas that we have deployed in this lecture.\n", + "However, by using the methods and ideas that we have deployed in this lecture, it is challenging to say more.\n", "\n", "There are many other linear regressions among components of $ \\vec \\mu^R, \\theta^R $ that would also have given us perfect fits.\n", "\n", @@ -1904,7 +1914,7 @@ "\n", "We do that in this quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html).\n", "\n", - "There, we’ll discover that system [(41.11)](#equation-eq-old9101) is actually a very good way to represent\n", + "There, we’ll discover that system [(41.12)](#equation-eq-old9101) is actually a very good way to represent\n", "a Ramsey plan because it reveals many things about its structure.\n", "\n", "Indeed, in that lecture, we show how to compute the Ramsey plan using **dynamic programming squared** and provide a Python class `ChangLQ` that performs the calculations.\n", @@ -1913,7 +1923,7 @@ "\n", "Let’s use the code to compute the parameters $ d_0, d_1 $ for the decision rule for $ \\mu_t $\n", "and the parameters $ d_0, d_1 $ in the updating rule for $ \\theta_{t+1} $ in representation\n", - "[(41.11)](#equation-eq-old9101).\n", + "[(41.12)](#equation-eq-old9101).\n", "\n", "First, we’ll again use `ChangLQ` to compute these objects (along with a number of others)." ] @@ -1921,7 +1931,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f54a7e11", + "id": "d1b762f8", "metadata": { "hide-output": false }, @@ -1932,7 +1942,7 @@ }, { "cell_type": "markdown", - "id": "a559fb6a", + "id": "7c18052b", "metadata": {}, "source": [ "Now let’s print out the decision rule for $ \\mu_t $ uncovered by applying dynamic programming squared." @@ -1941,7 +1951,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7727cca3", + "id": "21a97d6f", "metadata": { "hide-output": false }, @@ -1953,7 +1963,7 @@ }, { "cell_type": "markdown", - "id": "9e799aa3", + "id": "749c7bcb", "metadata": {}, "source": [ "Now let’s print out the decision rule for $ \\theta_{t+1} $ uncovered by applying dynamic programming squared." @@ -1962,7 +1972,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ecdae941", + "id": "e4fe2426", "metadata": { "hide-output": false }, @@ -1974,14 +1984,14 @@ }, { "cell_type": "markdown", - "id": "b63aca66", + "id": "27e3a7d0", "metadata": {}, "source": [ "Evidently, these agree with the relationships that we discovered by running regressions on the Ramsey outcomes $ \\vec \\mu^R, \\vec \\theta^R $ that we constructed with either of our machine learning algorithms.\n", "\n", "We have set the stage for this quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html).\n", "\n", - "We close this lecture by giving a hint about an insight of Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] that\n", + "We close this lecture by giving a hint about an insight of Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] that\n", "underlies much of quantecon lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html).\n", "\n", "Chang noticed how equation [(41.3)](#equation-eq-grad-old3) shows that an equivalence class of continuation money growth sequences $ \\{\\mu_{t+j}\\}_{j=0}^\\infty $ deliver the same $ \\theta_t $.\n", @@ -1989,13 +1999,13 @@ "Consequently, equations [(41.1)](#equation-eq-grad-old1) and [(41.3)](#equation-eq-grad-old3) indicate that $ \\theta_t $ intermediates how the government’s choices of $ \\mu_{t+j}, \\ j=0, 1, \\ldots $ impinge on time $ t $\n", "real balances $ m_t - p_t = -\\alpha \\theta_t $.\n", "\n", - "In lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html), we’ll see how Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] put this\n", + "In lecture [Ramsey Plans, Time Inconsistency, Sustainable Plans](https://python-advanced.quantecon.org/calvo.html), we’ll see how Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] put this\n", "insight to work." ] } ], "metadata": { - "date": 1724218393.8934805, + "date": 1728369868.176896, "filename": "calvo_machine_learn.md", "kernelspec": { "display_name": "Python", diff --git a/cattle_cycles.ipynb b/cattle_cycles.ipynb index a34e8d2..3fb7ea3 100644 --- a/cattle_cycles.ipynb +++ b/cattle_cycles.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e52768a4", + "id": "22c21b19", "metadata": {}, "source": [ "\n", @@ -13,13 +13,13 @@ }, { "cell_type": "markdown", - "id": "bb872ebb", + "id": "c8ccf85f", "metadata": {}, "source": [ "# Cattle Cycles\n", "\n", "This is another member of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s in Anaconda, this lecture uses the quantecon library." ] @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "398f6142", + "id": "d8a05743", "metadata": { "hide-output": false }, @@ -38,11 +38,11 @@ }, { "cell_type": "markdown", - "id": "ea6c2d89", + "id": "88c0f3d0", "metadata": {}, "source": [ "This lecture uses the DLE class to construct instances of the “Cattle Cycles” model\n", - "of Rosen, Murphy and Scheinkman (1994) [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id70)].\n", + "of Rosen, Murphy and Scheinkman (1994) [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id71)].\n", "\n", "That paper constructs a rational expectations equilibrium model to\n", "understand sources of recurrent cycles in US cattle stocks and prices.\n", @@ -53,7 +53,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16e84b57", + "id": "c9632d4c", "metadata": { "hide-output": false }, @@ -68,7 +68,7 @@ }, { "cell_type": "markdown", - "id": "8cf2ba29", + "id": "fb7c6db0", "metadata": {}, "source": [ "## The Model\n", @@ -130,7 +130,7 @@ }, { "cell_type": "markdown", - "id": "01b884bb", + "id": "2f3b8e6b", "metadata": {}, "source": [ "## Mapping into HS2013 Framework" @@ -138,7 +138,7 @@ }, { "cell_type": "markdown", - "id": "90f47edb", + "id": "81aee55c", "metadata": {}, "source": [ "### Preferences\n", @@ -153,7 +153,7 @@ }, { "cell_type": "markdown", - "id": "b3b4524c", + "id": "545945b6", "metadata": {}, "source": [ "### Technology\n", @@ -203,7 +203,7 @@ }, { "cell_type": "markdown", - "id": "f5fefad3", + "id": "a2bdce2a", "metadata": {}, "source": [ "### Information\n", @@ -242,7 +242,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0cddc0af", + "id": "6cf640ac", "metadata": { "hide-output": false }, @@ -258,16 +258,16 @@ }, { "cell_type": "markdown", - "id": "184e4554", + "id": "3d20dec1", "metadata": {}, "source": [ - "We set parameters to those used by [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id70)]" + "We set parameters to those used by [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id71)]" ] }, { "cell_type": "code", "execution_count": null, - "id": "a30a0495", + "id": "10e4926f", "metadata": { "hide-output": false }, @@ -341,7 +341,7 @@ }, { "cell_type": "markdown", - "id": "1a2e9471", + "id": "3b9d4877", "metadata": {}, "source": [ "Notice that we have set $ \\rho_1 = \\rho_2 = 0 $, so $ h_t $ and\n", @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e4a918ca", + "id": "7c11c1e9", "metadata": { "hide-output": false }, @@ -391,7 +391,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d3b1eb01", + "id": "2806968f", "metadata": { "hide-output": false }, @@ -410,7 +410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cb94ad5e", + "id": "fa8c3ab4", "metadata": { "hide-output": false }, @@ -421,10 +421,10 @@ }, { "cell_type": "markdown", - "id": "5979ed0b", + "id": "1cf89ff4", "metadata": {}, "source": [ - "[[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id70)] use the model to understand the\n", + "[[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id71)] use the model to understand the\n", "sources of recurrent cycles in total cattle stocks.\n", "\n", "Plotting $ y_t $ for a simulation of their model shows its ability\n", @@ -434,7 +434,7 @@ { "cell_type": "code", "execution_count": null, - "id": "544b6be5", + "id": "a5df0a81", "metadata": { "hide-output": false }, @@ -451,10 +451,10 @@ }, { "cell_type": "markdown", - "id": "0c399a2c", + "id": "64726b7b", "metadata": {}, "source": [ - "In their Figure 3, [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id70)] plot the impulse response functions\n", + "In their Figure 3, [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id71)] plot the impulse response functions\n", "of consumption and the breeding stock of cattle to the demand shock,\n", "$ \\tilde d_t $, under the three different values of $ \\rho_3 $.\n", "\n", @@ -464,7 +464,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fa52238f", + "id": "11b480db", "metadata": { "hide-output": false }, @@ -493,7 +493,7 @@ }, { "cell_type": "markdown", - "id": "e6078a51", + "id": "288fe938", "metadata": {}, "source": [ "The above figures show how consumption patterns differ markedly,\n", @@ -506,7 +506,7 @@ " rise in future demand. \n", "\n", "\n", - "In Figure 4 of their paper, [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id70)] plot the response to a demand shock\n", + "In Figure 4 of their paper, [[Rosen *et al.*, 1994](https://python-advanced.quantecon.org/zreferences.html#id71)] plot the response to a demand shock\n", "of the breeding stock *and* the total stock, for $ \\rho_3 = 0 $ and\n", "$ \\rho_3 = 0.6 $.\n", "\n", @@ -516,7 +516,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4b459065", + "id": "3185906e", "metadata": { "hide-output": false }, @@ -538,7 +538,7 @@ }, { "cell_type": "markdown", - "id": "bee4e8e9", + "id": "1e253602", "metadata": {}, "source": [ "The fact that $ y_t $ is a weighted moving average of $ x_t $\n", @@ -549,7 +549,7 @@ } ], "metadata": { - "date": 1724218393.9154046, + "date": 1728369868.1986501, "filename": "cattle_cycles.md", "kernelspec": { "display_name": "Python", diff --git a/chang_credible.ipynb b/chang_credible.ipynb index 4449987..f55e0a8 100644 --- a/chang_credible.ipynb +++ b/chang_credible.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f7f5ba4f", + "id": "22059843", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "de18a22f", + "id": "d4db3339", "metadata": {}, "source": [ "# Credible Government Policies in a Model of Chang\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fcc18618", + "id": "47a95c98", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "e73300c4", + "id": "30dd818d", "metadata": {}, "source": [ "## Overview\n", @@ -57,15 +57,15 @@ "The time $ t $ government decision-maker choose time $ t $ government\n", "actions after forecasting what future governments will do.\n", "\n", - "We use the notion of a *sustainable plan* proposed in [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id216)],\n", - "also referred to as a *credible public policy* in [[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id223)].\n", + "We use the notion of a *sustainable plan* proposed in [[Chari and Kehoe, 1990](https://python-advanced.quantecon.org/zreferences.html#id217)],\n", + "also referred to as a *credible public policy* in [[Stokey, 1989](https://python-advanced.quantecon.org/zreferences.html#id224)].\n", "\n", "Technically, this lecture starts where lecture\n", "[competitive equilibria in the Chang model](https://python-advanced.quantecon.org/chang_ramsey.html) on Ramsey plans\n", - "within the Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] model stopped.\n", + "within the Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] model stopped.\n", "\n", "That lecture presents recursive representations of *competitive equilibria* and a *Ramsey plan* for a\n", - "version of a model of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] that Chang used to analyze and illustrate these concepts.\n", + "version of a model of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] that Chang used to analyze and illustrate these concepts.\n", "\n", "We used two operators to characterize competitive equilibria and a Ramsey plan,\n", "respectively.\n", @@ -92,7 +92,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cfe95b4d", + "id": "c9733ca4", "metadata": { "hide-output": false }, @@ -105,7 +105,7 @@ }, { "cell_type": "markdown", - "id": "5d1b4d6d", + "id": "45f7e96b", "metadata": {}, "source": [ "## The Setting\n", @@ -160,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "ad10c689", + "id": "3e7048a4", "metadata": {}, "source": [ "### The Household’s Problem\n", @@ -198,7 +198,7 @@ "Here $ q_t $ is the reciprocal of the price level at $ t $,\n", "also known as the *value of money*.\n", "\n", - "Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] assumes that\n", + "Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] assumes that\n", "\n", "- $ u: \\mathbb{R}_+ \\rightarrow \\mathbb{R} $ is twice continuously differentiable, strictly concave, and strictly increasing; \n", "- $ v: \\mathbb{R}_+ \\rightarrow \\mathbb{R} $ is twice continuously differentiable and strictly concave; \n", @@ -221,7 +221,7 @@ }, { "cell_type": "markdown", - "id": "3d2011b8", + "id": "a066b376", "metadata": {}, "source": [ "### Government\n", @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "d97724eb", + "id": "ae5c6574", "metadata": {}, "source": [ "### Within-period Timing Protocol\n", @@ -309,7 +309,7 @@ }, { "cell_type": "markdown", - "id": "050bd87e", + "id": "f472ba05", "metadata": {}, "source": [ "### Household’s Problem\n", @@ -376,7 +376,7 @@ }, { "cell_type": "markdown", - "id": "ff84c32c", + "id": "0f5d7dcf", "metadata": {}, "source": [ "### Competitive Equilibrium\n", @@ -402,7 +402,7 @@ }, { "cell_type": "markdown", - "id": "f587e5cb", + "id": "ae685ce8", "metadata": {}, "source": [ "### A Credible Government Policy\n", @@ -485,7 +485,7 @@ }, { "cell_type": "markdown", - "id": "c8631f5a", + "id": "f3caf33f", "metadata": {}, "source": [ "### Sustainable Plans\n", @@ -559,7 +559,7 @@ "$ m(h) $ and associated subsequent actions, together with future\n", "equilibrium prices, captured by $ (w'(h), \\theta'(h)) $.\n", "\n", - "At this point, Chang introduces an idea in the spirit of Abreu, Pearce, and Stacchetti [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id113)].\n", + "At this point, Chang introduces an idea in the spirit of Abreu, Pearce, and Stacchetti [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id114)].\n", "\n", "Let $ Z $ be a nonempty subset of $ W \\times \\Omega $.\n", "\n", @@ -662,7 +662,7 @@ }, { "cell_type": "markdown", - "id": "1dc5c7e4", + "id": "057814e9", "metadata": {}, "source": [ "## Calculating the Set of Sustainable Promise-Value Pairs\n", @@ -878,7 +878,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b5589b5a", + "id": "37e4205b", "metadata": { "hide-output": false }, @@ -1386,7 +1386,7 @@ }, { "cell_type": "markdown", - "id": "915dc939", + "id": "5b416cac", "metadata": {}, "source": [ "### Comparison of Sets\n", @@ -1401,7 +1401,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0170feea", + "id": "9d87e98e", "metadata": { "hide-output": false }, @@ -1413,7 +1413,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7807e752", + "id": "cceb4948", "metadata": { "hide-output": false }, @@ -1424,7 +1424,7 @@ }, { "cell_type": "markdown", - "id": "cabf530e", + "id": "d85e88fb", "metadata": {}, "source": [ "The following plot shows both the set of $ w,\\theta $ pairs associated with competitive equilibria (in red)\n", @@ -1434,7 +1434,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c8cf739a", + "id": "0dbe7ab6", "metadata": { "hide-output": false }, @@ -1476,7 +1476,7 @@ }, { "cell_type": "markdown", - "id": "99ad0b39", + "id": "1ec5c70d", "metadata": {}, "source": [ "Evidently, the Ramsey plan, denoted by the $ R $, is not sustainable.\n", @@ -1487,7 +1487,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8514dee2", + "id": "ff27036a", "metadata": { "hide-output": false }, @@ -1500,7 +1500,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f67367b7", + "id": "44836e43", "metadata": { "hide-output": false }, @@ -1511,7 +1511,7 @@ }, { "cell_type": "markdown", - "id": "1e1e60dd", + "id": "f6957d10", "metadata": {}, "source": [ "Let’s plot both sets" @@ -1520,7 +1520,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2530da6", + "id": "982fde80", "metadata": { "hide-output": false }, @@ -1531,7 +1531,7 @@ }, { "cell_type": "markdown", - "id": "1310a60c", + "id": "8843fd0f", "metadata": {}, "source": [ "Evidently, the Ramsey plan is now sustainable." @@ -1539,7 +1539,7 @@ } ], "metadata": { - "date": 1724218393.9586542, + "date": 1728369868.2415311, "filename": "chang_credible.md", "kernelspec": { "display_name": "Python", diff --git a/chang_ramsey.ipynb b/chang_ramsey.ipynb index b1f7344..ad4d11c 100644 --- a/chang_ramsey.ipynb +++ b/chang_ramsey.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "d5b61a73", + "id": "d17476d8", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "4d2d34b9", + "id": "e69607dc", "metadata": {}, "source": [ "# Competitive Equilibria of a Model of Chang\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da8339e4", + "id": "7785e2a3", "metadata": { "hide-output": false }, @@ -33,12 +33,12 @@ }, { "cell_type": "markdown", - "id": "2a0e9399", + "id": "f45e1d9a", "metadata": {}, "source": [ "## Overview\n", "\n", - "This lecture describes how Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)]\n", + "This lecture describes how Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)]\n", "analyzed **competitive equilibria** and a best competitive equilibrium called a **Ramsey plan**.\n", "\n", "He did this by\n", @@ -47,13 +47,13 @@ " in the [dynamic Stackelberg problems](https://python-advanced.quantecon.org/dyn_stack.html) and [Calvo model](https://python-advanced.quantecon.org/calvo.html) lectures\n", " to pose Stackelberg problems in linear economies, and then \n", "- appropriately adapting an argument of Abreu, Pearce, and Stachetti\n", - " [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id113)] to describe key features of the set of competitive equilibria \n", + " [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id114)] to describe key features of the set of competitive equilibria \n", "\n", "\n", - "Roberto Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] chose a model of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)]\n", + "Roberto Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] chose a model of Calvo [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)]\n", "as a simple structure that conveys ideas that apply more broadly.\n", "\n", - "A textbook version of Chang’s model appears in chapter 25 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)].\n", + "A textbook version of Chang’s model appears in chapter 25 of [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)].\n", "\n", "This lecture and [Credible Government Policies in Chang Model](https://python-advanced.quantecon.org/chang_credible.html)\n", "can be viewed as more sophisticated and complete treatments of the\n", @@ -81,7 +81,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d44618ff", + "id": "1c2abd2c", "metadata": { "hide-output": false }, @@ -94,7 +94,7 @@ }, { "cell_type": "markdown", - "id": "e3ed4874", + "id": "e0564595", "metadata": {}, "source": [ "### The Setting\n", @@ -132,7 +132,7 @@ "markets, thereby reconciling decisions of the government and the\n", "representative household.\n", "\n", - "Chang adopts a version of a model that [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id139)] designed to exhibit\n", + "Chang adopts a version of a model that [[Calvo, 1978](https://python-advanced.quantecon.org/zreferences.html#id140)] designed to exhibit\n", "time-inconsistency of a Ramsey policy in a simple and transparent\n", "setting.\n", "\n", @@ -152,7 +152,7 @@ }, { "cell_type": "markdown", - "id": "a4bbfe6a", + "id": "e11ee74e", "metadata": {}, "source": [ "## Decisions" @@ -160,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "0eee1970", + "id": "0be25143", "metadata": {}, "source": [ "### The Household’s Problem\n", @@ -198,7 +198,7 @@ "Here $ q_t $ is the reciprocal of the price level at $ t $,\n", "which we can also call the *value of money*.\n", "\n", - "Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id215)] assumes that\n", + "Chang [[Chang, 1998](https://python-advanced.quantecon.org/zreferences.html#id216)] assumes that\n", "\n", "- $ u: \\mathbb{R}_+ \\rightarrow \\mathbb{R} $ is twice continuously differentiable, strictly concave, and strictly increasing; \n", "- $ v: \\mathbb{R}_+ \\rightarrow \\mathbb{R} $ is twice continuously differentiable and strictly concave; \n", @@ -221,7 +221,7 @@ }, { "cell_type": "markdown", - "id": "c05fc1a0", + "id": "18f1de44", "metadata": {}, "source": [ "### Government\n", @@ -350,7 +350,7 @@ }, { "cell_type": "markdown", - "id": "9316d0fa", + "id": "72ede7c1", "metadata": {}, "source": [ "### Household’s Problem\n", @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "ec527417", + "id": "6a5eafc5", "metadata": {}, "source": [ "## Competitive Equilibrium\n", @@ -448,7 +448,7 @@ }, { "cell_type": "markdown", - "id": "3293f025", + "id": "a6345490", "metadata": {}, "source": [ "## Inventory of Objects in Play\n", @@ -507,7 +507,7 @@ }, { "cell_type": "markdown", - "id": "4b89559a", + "id": "b93624d3", "metadata": {}, "source": [ "## Analysis\n", @@ -529,7 +529,7 @@ "Chang establishes that $ CE $ is also compact.\n", "\n", "Chang makes the following key observation that combines ideas of Abreu, Pearce,\n", - "and Stacchetti [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id113)] with insights of Kydland and Prescott [[Kydland and Prescott, 1980](https://python-advanced.quantecon.org/zreferences.html#id214)].\n", + "and Stacchetti [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id114)] with insights of Kydland and Prescott [[Kydland and Prescott, 1980](https://python-advanced.quantecon.org/zreferences.html#id215)].\n", "\n", "**Proposition:**\n", "The continuation of a competitive equilibrium is a competitive equilibrium.\n", @@ -638,8 +638,8 @@ "Ramsey plan, note that the proposition relies on knowing the set $ \\Omega $.\n", "\n", "To find $ \\Omega $, Chang uses the insights of Kydland and Prescott\n", - "[[Kydland and Prescott, 1980](https://python-advanced.quantecon.org/zreferences.html#id214)] together with a method based on the\n", - "Abreu, Pearce, and Stacchetti [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id113)] iteration to convergence on an\n", + "[[Kydland and Prescott, 1980](https://python-advanced.quantecon.org/zreferences.html#id215)] together with a method based on the\n", + "Abreu, Pearce, and Stacchetti [[Abreu *et al.*, 1990](https://python-advanced.quantecon.org/zreferences.html#id114)] iteration to convergence on an\n", "operator $ B $ that maps continuation values into values.\n", "\n", "We want an operator that maps a continuation $ \\theta $ into a current $ \\theta $.\n", @@ -681,7 +681,7 @@ }, { "cell_type": "markdown", - "id": "0a9913c7", + "id": "56521a9a", "metadata": {}, "source": [ "### Some Useful Notation\n", @@ -748,7 +748,7 @@ }, { "cell_type": "markdown", - "id": "b733d0b5", + "id": "38217972", "metadata": {}, "source": [ "### Another Operator\n", @@ -850,7 +850,7 @@ }, { "cell_type": "markdown", - "id": "c3c5040b", + "id": "b0c23fd2", "metadata": {}, "source": [ "## Calculating all Promise-Value Pairs in CE\n", @@ -889,7 +889,7 @@ "To find $ S $ we use a numerical algorithm called the *outer\n", "hyperplane approximation algorithm*.\n", "\n", - "It was invented by Judd, Yeltekin, Conklin [[Judd *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id95)].\n", + "It was invented by Judd, Yeltekin, Conklin [[Judd *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id96)].\n", "\n", "This algorithm constructs the smallest convex set that contains the\n", "fixed point of the $ D(S) $ operator.\n", @@ -1003,7 +1003,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a4c4dce4", + "id": "0b175131", "metadata": { "hide-output": false }, @@ -1512,7 +1512,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8e0c663b", + "id": "1c796358", "metadata": { "hide-output": false }, @@ -1525,7 +1525,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e77eec5a", + "id": "c464da53", "metadata": { "hide-output": false }, @@ -1566,7 +1566,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ed5f59a4", + "id": "88671ca6", "metadata": { "hide-output": false }, @@ -1580,7 +1580,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8c0ce0e", + "id": "59dceaf1", "metadata": { "hide-output": false }, @@ -1591,7 +1591,7 @@ }, { "cell_type": "markdown", - "id": "19ff37aa", + "id": "356216e6", "metadata": {}, "source": [ "## Solving a Continuation Ramsey Planner’s Bellman Equation\n", @@ -1652,7 +1652,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fb873c42", + "id": "8756807b", "metadata": { "hide-output": false }, @@ -1667,7 +1667,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f4355bf5", + "id": "30c44693", "metadata": { "hide-output": false }, @@ -1679,7 +1679,7 @@ }, { "cell_type": "markdown", - "id": "239526d3", + "id": "4890882a", "metadata": {}, "source": [ "First, a quick check that our approximations of the value functions are\n", @@ -1691,7 +1691,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d2ae1244", + "id": "f4f1c1f1", "metadata": { "hide-output": false }, @@ -1702,7 +1702,7 @@ }, { "cell_type": "markdown", - "id": "62035c5f", + "id": "d2a141fc", "metadata": {}, "source": [ "The value functions plotted below trace out the right edges of the sets\n", @@ -1712,7 +1712,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ee55a4d3", + "id": "a90ea272", "metadata": { "hide-output": false }, @@ -1731,7 +1731,7 @@ }, { "cell_type": "markdown", - "id": "f1bc7ecd", + "id": "56fe2b40", "metadata": {}, "source": [ "The next figure plots the optimal policy functions; values of\n", @@ -1741,7 +1741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "db515f84", + "id": "fa0bc157", "metadata": { "hide-output": false }, @@ -1766,7 +1766,7 @@ }, { "cell_type": "markdown", - "id": "ceb94362", + "id": "87fe5c57", "metadata": {}, "source": [ "With the first set of parameter values, the value of $ \\theta' $ chosen by the Ramsey\n", @@ -1787,7 +1787,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1a8ee44e", + "id": "e358fd49", "metadata": { "hide-output": false }, @@ -1806,7 +1806,7 @@ }, { "cell_type": "markdown", - "id": "63ed0daf", + "id": "9c14b427", "metadata": {}, "source": [ "Subproblem 2 is equivalent to the planner choosing the initial value of\n", @@ -1822,7 +1822,7 @@ { "cell_type": "code", "execution_count": null, - "id": "01d9a5a8", + "id": "e4c6f8c5", "metadata": { "hide-output": false }, @@ -1845,7 +1845,7 @@ }, { "cell_type": "markdown", - "id": "51f48fb6", + "id": "a18b9a35", "metadata": {}, "source": [ "### Next Steps\n", @@ -1861,7 +1861,7 @@ } ], "metadata": { - "date": 1724218394.1941884, + "date": 1728369868.300816, "filename": "chang_ramsey.md", "kernelspec": { "display_name": "Python", diff --git a/classical_filtering.ipynb b/classical_filtering.ipynb index dfe0b1f..b61cd21 100644 --- a/classical_filtering.ipynb +++ b/classical_filtering.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "fee39d24", + "id": "ec1b2d1d", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "29ebd5a0", + "id": "50032cd4", "metadata": {}, "source": [ "# Classical Prediction and Filtering With Linear Algebra" @@ -19,7 +19,7 @@ }, { "cell_type": "markdown", - "id": "259acbd7", + "id": "61e0997c", "metadata": {}, "source": [ "## Overview\n", @@ -53,7 +53,7 @@ "\n", "An understanding of these connections has repeatedly proved useful in cracking interesting applied problems.\n", "\n", - "For example, Sargent [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)] [chs. IX, XIV] and Hansen and Sargent [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id107)] formulated\n", + "For example, Sargent [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)] [chs. IX, XIV] and Hansen and Sargent [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id108)] formulated\n", "and solved control and filtering problems using $ z $-transform methods.\n", "\n", "In this lecture, we begin to investigate these ideas by using mostly elementary linear algebra.\n", @@ -72,7 +72,7 @@ { "cell_type": "code", "execution_count": null, - "id": "47cc5c7e", + "id": "1e84dc5a", "metadata": { "hide-output": false }, @@ -83,17 +83,17 @@ }, { "cell_type": "markdown", - "id": "337d211a", + "id": "ebfdd997", "metadata": {}, "source": [ "### References\n", "\n", - "Useful references include [[Whittle, 1963](https://python-advanced.quantecon.org/zreferences.html#id106)], [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id107)], [[Orfanidis, 1988](https://python-advanced.quantecon.org/zreferences.html#id108)], [[Athanasios and Pillai, 1991](https://python-advanced.quantecon.org/zreferences.html#id109)], and [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)]." + "Useful references include [[Whittle, 1963](https://python-advanced.quantecon.org/zreferences.html#id107)], [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id108)], [[Orfanidis, 1988](https://python-advanced.quantecon.org/zreferences.html#id109)], [[Athanasios and Pillai, 1991](https://python-advanced.quantecon.org/zreferences.html#id110)], and [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)]." ] }, { "cell_type": "markdown", - "id": "4d61e449", + "id": "11c5a2b9", "metadata": {}, "source": [ "## Finite Dimensional Prediction\n", @@ -245,7 +245,7 @@ }, { "cell_type": "markdown", - "id": "b6246a87", + "id": "ac385e8d", "metadata": {}, "source": [ "### Implementation\n", @@ -256,7 +256,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f913e835", + "id": "0acf4c66", "metadata": { "hide-output": false }, @@ -572,7 +572,7 @@ }, { "cell_type": "markdown", - "id": "5440cd92", + "id": "2eb87c64", "metadata": {}, "source": [ "Let’s use this code to tackle two interesting examples." @@ -580,7 +580,7 @@ }, { "cell_type": "markdown", - "id": "50866d00", + "id": "bd869ed6", "metadata": {}, "source": [ "### Example 1\n", @@ -603,7 +603,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7af56343", + "id": "e3c660a9", "metadata": { "hide-output": false }, @@ -619,7 +619,7 @@ }, { "cell_type": "markdown", - "id": "2d67aab6", + "id": "5d8e8480", "metadata": {}, "source": [ "The Wold representation is computed by `example.coeffs_of_c()`.\n", @@ -630,7 +630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30ed3aa8", + "id": "39f41933", "metadata": { "hide-output": false }, @@ -642,7 +642,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d06dfab", + "id": "53288edc", "metadata": { "hide-output": false }, @@ -653,7 +653,7 @@ }, { "cell_type": "markdown", - "id": "9d710b6d", + "id": "199604c2", "metadata": {}, "source": [ "Now let’s form the covariance matrix of a time series vector of length $ N $\n", @@ -666,7 +666,7 @@ { "cell_type": "code", "execution_count": null, - "id": "166a3b10", + "id": "60762c15", "metadata": { "hide-output": false }, @@ -678,7 +678,7 @@ }, { "cell_type": "markdown", - "id": "1de10ca2", + "id": "5f59d7d5", "metadata": {}, "source": [ "Notice how the lower rows of the “moving average representations” are converging to the appropriate infinite history Wold representation\n", @@ -688,7 +688,7 @@ { "cell_type": "code", "execution_count": null, - "id": "95392dd2", + "id": "c4788ee5", "metadata": { "hide-output": false }, @@ -700,7 +700,7 @@ }, { "cell_type": "markdown", - "id": "1af08aef", + "id": "76ac6e48", "metadata": {}, "source": [ "Notice how the lower rows of the “autoregressive representations” are converging to the appropriate infinite-history\n", @@ -710,7 +710,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e85fee5a", + "id": "60c71ae1", "metadata": { "hide-output": false }, @@ -722,7 +722,7 @@ }, { "cell_type": "markdown", - "id": "5448e650", + "id": "a85ec2c8", "metadata": {}, "source": [ "### Example 2\n", @@ -749,7 +749,7 @@ { "cell_type": "code", "execution_count": null, - "id": "befd4ecc", + "id": "922e0ab8", "metadata": { "hide-output": false }, @@ -767,7 +767,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e10ebf9", + "id": "43636aea", "metadata": { "hide-output": false }, @@ -779,7 +779,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da560010", + "id": "cf2266da", "metadata": { "hide-output": false }, @@ -792,7 +792,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6f9f229", + "id": "feddcb96", "metadata": { "hide-output": false }, @@ -805,7 +805,7 @@ { "cell_type": "code", "execution_count": null, - "id": "91e27fb6", + "id": "f0be80c3", "metadata": { "hide-output": false }, @@ -817,12 +817,12 @@ }, { "cell_type": "markdown", - "id": "6c0ec910", + "id": "861aa648", "metadata": {}, "source": [ "### Prediction\n", "\n", - "It immediately follows from the “orthogonality principle” of least squares (see [[Athanasios and Pillai, 1991](https://python-advanced.quantecon.org/zreferences.html#id109)] or [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)] [ch. X]) that\n", + "It immediately follows from the “orthogonality principle” of least squares (see [[Athanasios and Pillai, 1991](https://python-advanced.quantecon.org/zreferences.html#id110)] or [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)] [ch. X]) that\n", "\n", "\n", "\n", @@ -899,7 +899,7 @@ }, { "cell_type": "markdown", - "id": "ef60ddc1", + "id": "a73cd52a", "metadata": {}, "source": [ "## Combined Finite Dimensional Control and Prediction\n", @@ -987,7 +987,7 @@ }, { "cell_type": "markdown", - "id": "bd2f63cc", + "id": "871feb13", "metadata": {}, "source": [ "## Infinite Horizon Prediction and Filtering Problems\n", @@ -1048,12 +1048,12 @@ "\n", "The **linear least squares filtering problem** is to find a $ b\\,(L) = \\sum^\\infty_{j=0} b_j\\, L^j $ such that $ \\sum^\\infty_{j=0}\\vert b_j \\vert^2 < \\infty $ and $ \\mathbb{E} [b\\, (L) X_t -Y_t ]^2 $ is minimized.\n", "\n", - "Interesting versions of these problems related to the permanent income theory were studied by [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)]." + "Interesting versions of these problems related to the permanent income theory were studied by [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)]." ] }, { "cell_type": "markdown", - "id": "9ea28fab", + "id": "6473e671", "metadata": {}, "source": [ "### Problem Formulation\n", @@ -1099,7 +1099,7 @@ "\\end{aligned}\n", "$$\n", "\n", - "Then, as shown for example in [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)] [ch. XI], it is true that\n", + "Then, as shown for example in [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)] [ch. XI], it is true that\n", "\n", "\n", "\n", @@ -1221,10 +1221,10 @@ "b(L) = \\left[ {d(L)d(L^{-1}) \\over c(L^{-1})} \\right]_+ c(L)^{-1} \\tag{32.22}\n", "$$\n", "\n", - "Formulas [(32.21)](#equation-eq-36) and [(32.22)](#equation-eq-37) are discussed in detail in [[Whittle, 1983](https://python-advanced.quantecon.org/zreferences.html#id85)] and [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)].\n", + "Formulas [(32.21)](#equation-eq-36) and [(32.22)](#equation-eq-37) are discussed in detail in [[Whittle, 1983](https://python-advanced.quantecon.org/zreferences.html#id86)] and [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)].\n", "\n", "The interested reader can there find several examples of the use of these formulas in economics\n", - "Some classic examples using these formulas are due to [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)].\n", + "Some classic examples using these formulas are due to [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)].\n", "\n", "As an example of the usefulness of formula [(32.22)](#equation-eq-37), we let $ X_t $ be a stochastic process with Wold moving average representation\n", "\n", @@ -1262,7 +1262,7 @@ "b(L)=\\left[{c(L)\\over 1-\\delta L^{-1}}\\right]_+ c(L)^{-1} \\tag{32.23}\n", "$$\n", "\n", - "In order to evaluate the term in the annihilation operator, we use the following result from [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id107)].\n", + "In order to evaluate the term in the annihilation operator, we use the following result from [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id108)].\n", "\n", "**Proposition** Let\n", "\n", @@ -1433,7 +1433,7 @@ }, { "cell_type": "markdown", - "id": "bdecacf4", + "id": "aa192c89", "metadata": {}, "source": [ "## Exercises" @@ -1441,7 +1441,7 @@ }, { "cell_type": "markdown", - "id": "f6fb0610", + "id": "f1e00ad3", "metadata": {}, "source": [ "## Exercise 32.1\n", @@ -1476,7 +1476,7 @@ }, { "cell_type": "markdown", - "id": "f9a00790", + "id": "8d4080bb", "metadata": {}, "source": [ "## Exercise 32.2\n", @@ -1515,7 +1515,7 @@ "\\end{aligned}\n", "$$\n", "\n", - "A factorization of $ g_X (z) $ can be found (see [[Rozanov, 1967](https://python-advanced.quantecon.org/zreferences.html#id83)] or [[Whittle, 1983](https://python-advanced.quantecon.org/zreferences.html#id85)]) of the form\n", + "A factorization of $ g_X (z) $ can be found (see [[Rozanov, 1967](https://python-advanced.quantecon.org/zreferences.html#id84)] or [[Whittle, 1983](https://python-advanced.quantecon.org/zreferences.html#id86)]) of the form\n", "\n", "$$\n", "D (z) D (z^{-1})^\\prime + H = C (z) C (z^{-1})^\\prime, \\quad C (z) =\n", @@ -1556,7 +1556,7 @@ } ], "metadata": { - "date": 1724218394.2478883, + "date": 1728369868.525178, "filename": "classical_filtering.md", "kernelspec": { "display_name": "Python", diff --git a/coase.ipynb b/coase.ipynb index d1428a3..7ba6be3 100644 --- a/coase.ipynb +++ b/coase.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "759e24df", + "id": "6e960dfc", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "24be528c", + "id": "f6c0e318", "metadata": {}, "source": [ "# Coase’s Theory of the Firm" @@ -19,12 +19,12 @@ }, { "cell_type": "markdown", - "id": "e3c06e48", + "id": "71aa3ddf", "metadata": {}, "source": [ "## Overview\n", "\n", - "In 1937, Ronald Coase wrote a brilliant essay on the nature of the firm [[Coase, 1937](https://python-advanced.quantecon.org/zreferences.html#id232)].\n", + "In 1937, Ronald Coase wrote a brilliant essay on the nature of the firm [[Coase, 1937](https://python-advanced.quantecon.org/zreferences.html#id233)].\n", "\n", "Coase was writing at a time when the Soviet Union was rising to become a significant industrial power.\n", "\n", @@ -50,7 +50,7 @@ { "cell_type": "code", "execution_count": null, - "id": "884ebdf2", + "id": "92bc7a48", "metadata": { "hide-output": false }, @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "b3c7d684", + "id": "8cfd168c", "metadata": {}, "source": [ "### Why Firms Exist\n", @@ -96,7 +96,7 @@ }, { "cell_type": "markdown", - "id": "9cdb2424", + "id": "181c8907", "metadata": {}, "source": [ "### A Trade-Off\n", @@ -109,7 +109,7 @@ "\n", "The answer Coase came up with was that “a firm will tend to expand until the costs of organizing an extra\n", "transaction within the firm become equal to the costs of carrying out the same\n", - "transaction by means of an exchange on the open market…” ([[Coase, 1937](https://python-advanced.quantecon.org/zreferences.html#id232)], p. 395).\n", + "transaction by means of an exchange on the open market…” ([[Coase, 1937](https://python-advanced.quantecon.org/zreferences.html#id233)], p. 395).\n", "\n", "But what are these internal and external costs?\n", "\n", @@ -133,7 +133,7 @@ }, { "cell_type": "markdown", - "id": "1bb8bfc7", + "id": "a26a7c23", "metadata": {}, "source": [ "### Summary\n", @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "c279faa3", + "id": "a818a389", "metadata": {}, "source": [ "### A Quantitative Interpretation\n", @@ -160,12 +160,12 @@ "\n", "In doing so we’ll add a bit more structure than Coase did, but this price will be worth paying.\n", "\n", - "Our exposition is based on [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id231)]." + "Our exposition is based on [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id232)]." ] }, { "cell_type": "markdown", - "id": "8478e85f", + "id": "4ba8aca0", "metadata": {}, "source": [ "## The Model\n", @@ -181,7 +181,7 @@ }, { "cell_type": "markdown", - "id": "4bb5a22d", + "id": "3a5e5edf", "metadata": {}, "source": [ "### Subcontracting\n", @@ -224,7 +224,7 @@ }, { "cell_type": "markdown", - "id": "88ea755c", + "id": "88146248", "metadata": {}, "source": [ "### Costs\n", @@ -254,7 +254,7 @@ }, { "cell_type": "markdown", - "id": "56911f5b", + "id": "f0c2152f", "metadata": {}, "source": [ "## Equilibrium\n", @@ -277,7 +277,7 @@ }, { "cell_type": "markdown", - "id": "790f461e", + "id": "4dba6ce3", "metadata": {}, "source": [ "### Informal Definition of Equilibrium\n", @@ -291,7 +291,7 @@ }, { "cell_type": "markdown", - "id": "d4034c00", + "id": "9764e57f", "metadata": {}, "source": [ "### Formal Definition of Equilibrium\n", @@ -349,7 +349,7 @@ }, { "cell_type": "markdown", - "id": "b60efe84", + "id": "34dabdf7", "metadata": {}, "source": [ "## Existence, Uniqueness and Computation of Equilibria\n", @@ -359,7 +359,7 @@ }, { "cell_type": "markdown", - "id": "ef24a05a", + "id": "93def791", "metadata": {}, "source": [ "### A Fixed Point Method\n", @@ -388,7 +388,7 @@ "\n", "We denote this set of functions by $ \\mathcal P $.\n", "\n", - "In [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id231)] it is shown that the following statements are true:\n", + "In [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id232)] it is shown that the following statements are true:\n", "\n", "1. $ T $ maps $ \\mathcal P $ into itself. \n", "1. $ T $ has a unique fixed point in $ \\mathcal P $, denoted below by $ p^* $. \n", @@ -437,7 +437,7 @@ "\n", "The task allocation corresponding to [(15.5)](#equation-coase-ralloc) is given by $ \\ell_i^* := t_{i-1}^* - t_i^* $ for all $ i $.\n", "\n", - "In [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id231)] it is shown that\n", + "In [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id232)] it is shown that\n", "\n", "1. The value $ n^* $ in [(15.6)](#equation-coase-eqfn) is well-defined and finite, \n", "1. the allocation $ \\{\\ell^*_i\\} $ is feasible, and \n", @@ -460,7 +460,7 @@ }, { "cell_type": "markdown", - "id": "ffb3282f", + "id": "0f13c182", "metadata": {}, "source": [ "### Marginal Conditions\n", @@ -471,7 +471,7 @@ "\n", "This is the cost-minimizing range of in-house tasks for a firm with downstream boundary $ s $.\n", "\n", - "In [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id231)] it is shown that $ t^* $ and $ \\ell^* $ are increasing and continuous, while $ p^* $ is continuously differentiable at all $ s \\in (0, 1) $ with\n", + "In [[Kikuchi *et al.*, 2018](https://python-advanced.quantecon.org/zreferences.html#id232)] it is shown that $ t^* $ and $ \\ell^* $ are increasing and continuous, while $ p^* $ is continuously differentiable at all $ s \\in (0, 1) $ with\n", "\n", "\n", "\n", @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "b77918f8", + "id": "13bb729c", "metadata": {}, "source": [ "## Implementation\n", @@ -539,7 +539,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7359856e", + "id": "653a63b6", "metadata": { "hide-output": false }, @@ -558,7 +558,7 @@ }, { "cell_type": "markdown", - "id": "84e6b54c", + "id": "7cd87f16", "metadata": {}, "source": [ "Now let’s implement and iterate with $ T $ until convergence.\n", @@ -570,7 +570,7 @@ { "cell_type": "code", "execution_count": null, - "id": "02a630c8", + "id": "d87c2cc0", "metadata": { "hide-output": false }, @@ -609,7 +609,7 @@ }, { "cell_type": "markdown", - "id": "b9865fcd", + "id": "574ad410", "metadata": {}, "source": [ "The next function computes optimal choice of upstream boundary and range of\n", @@ -619,7 +619,7 @@ { "cell_type": "code", "execution_count": null, - "id": "03f903dd", + "id": "cde99090", "metadata": { "hide-output": false }, @@ -646,7 +646,7 @@ }, { "cell_type": "markdown", - "id": "a8d302e5", + "id": "ebd4b51d", "metadata": {}, "source": [ "The allocation of firms can be computed by recursively stepping through firms’ choices of\n", @@ -658,7 +658,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cea5af7a", + "id": "bbf3b500", "metadata": { "hide-output": false }, @@ -675,7 +675,7 @@ }, { "cell_type": "markdown", - "id": "3b74e958", + "id": "12a4e88b", "metadata": {}, "source": [ "Let’s try this at the default parameters.\n", @@ -687,7 +687,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8ebae1e", + "id": "0e1ee3ab", "metadata": { "hide-output": false }, @@ -710,7 +710,7 @@ }, { "cell_type": "markdown", - "id": "1aa4a3fe", + "id": "e69805a9", "metadata": {}, "source": [ "Here’s the function $ \\ell^* $, which shows how large a firm with\n", @@ -720,7 +720,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15cb9223", + "id": "55a9b5b9", "metadata": { "hide-output": false }, @@ -739,7 +739,7 @@ }, { "cell_type": "markdown", - "id": "8ae4e3da", + "id": "68340530", "metadata": {}, "source": [ "Note that downstream firms choose to be larger, a point we return to below." @@ -747,7 +747,7 @@ }, { "cell_type": "markdown", - "id": "832a106c", + "id": "65caf33c", "metadata": {}, "source": [ "## Exercises\n", @@ -758,7 +758,7 @@ }, { "cell_type": "markdown", - "id": "f2244bb6", + "id": "2c5a8bd9", "metadata": {}, "source": [ "## Exercise 15.1\n", @@ -772,7 +772,7 @@ }, { "cell_type": "markdown", - "id": "551b64c9", + "id": "db9077cf", "metadata": {}, "source": [ "## Solution to[ Exercise 15.1](https://python-advanced.quantecon.org/#coa_ex1)\n", @@ -783,7 +783,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15df3029", + "id": "96687729", "metadata": { "hide-output": false }, @@ -800,7 +800,7 @@ }, { "cell_type": "markdown", - "id": "074a0ac3", + "id": "93845c04", "metadata": {}, "source": [ "## Exercise 15.2\n", @@ -816,7 +816,7 @@ }, { "cell_type": "markdown", - "id": "ddaf60bf", + "id": "b6915fc5", "metadata": {}, "source": [ "## Solution to[ Exercise 15.2](https://python-advanced.quantecon.org/#coa_ex2)\n", @@ -839,7 +839,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c48a5ef", + "id": "b3a03a19", "metadata": { "hide-output": false }, @@ -863,7 +863,7 @@ } ], "metadata": { - "date": 1724218394.2826664, + "date": 1728369868.559396, "filename": "coase.md", "kernelspec": { "display_name": "Python", diff --git a/cons_news.ipynb b/cons_news.ipynb index 81e1db3..43eb2c5 100644 --- a/cons_news.ipynb +++ b/cons_news.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ae2c6a06", + "id": "f95ad566", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "0c3429ab", + "id": "26472933", "metadata": {}, "source": [ "# Information and Consumption Smoothing\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dda0fda9", + "id": "895e7fef", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "e0d1802b", + "id": "a4e785a9", "metadata": {}, "source": [ "## Overview\n", @@ -50,7 +50,7 @@ "That $ \\beta $ plays these two roles is essential in delivering the outcome that, **regardless**\n", "of the stochastic process that describes his\n", "non-financial income, the consumer chooses\n", - "to make consumption follow a random walk (see [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)]).\n", + "to make consumption follow a random walk (see [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)]).\n", "\n", "In this lecture, we assign a third role to $ \\beta $:\n", "\n", @@ -59,7 +59,7 @@ }, { "cell_type": "markdown", - "id": "e48cdbd1", + "id": "760afc61", "metadata": {}, "source": [ "### Same non-financial incomes, different information\n", @@ -114,13 +114,13 @@ "\n", "\n", "This lecture can be regarded as an introduction to **invertibility** issues that take center stage in\n", - "the analysis of **fiscal foresight** by Eric Leeper, Todd Walker, and Susan Yang [[Leeper *et al.*, 2013](https://python-advanced.quantecon.org/zreferences.html#id33)], as well\n", - "as in chapter 4 of [[Sargent *et al.*, 1991](https://python-advanced.quantecon.org/zreferences.html#id58)]." + "the analysis of **fiscal foresight** by Eric Leeper, Todd Walker, and Susan Yang [[Leeper *et al.*, 2013](https://python-advanced.quantecon.org/zreferences.html#id34)], as well\n", + "as in chapter 4 of [[Sargent *et al.*, 1991](https://python-advanced.quantecon.org/zreferences.html#id59)]." ] }, { "cell_type": "markdown", - "id": "76ab569c", + "id": "d85e636a", "metadata": {}, "source": [ "## Two Representations of One Nonfinancial Income Process\n", @@ -251,7 +251,7 @@ }, { "cell_type": "markdown", - "id": "649df507", + "id": "f6fc6579", "metadata": {}, "source": [ "## Application of Kalman filter\n", @@ -299,7 +299,7 @@ }, { "cell_type": "markdown", - "id": "b102acbc", + "id": "ecac6a88", "metadata": {}, "source": [ "## News Shocks and Less Informative Shocks\n", @@ -398,7 +398,7 @@ }, { "cell_type": "markdown", - "id": "a12e5354", + "id": "1a6fa2d0", "metadata": {}, "source": [ "## Representation of $ \\epsilon_t $ Shock in Terms of Future $ y_t $\n", @@ -430,7 +430,7 @@ }, { "cell_type": "markdown", - "id": "2b0deb4d", + "id": "3a4df73d", "metadata": {}, "source": [ "## Representation in Terms of $ a_t $ Shocks\n", @@ -459,7 +459,7 @@ }, { "cell_type": "markdown", - "id": "a47f88c4", + "id": "f3f3c832", "metadata": {}, "source": [ "## Permanent Income Consumption-Smoothing Model\n", @@ -515,7 +515,7 @@ }, { "cell_type": "markdown", - "id": "71072847", + "id": "43173472", "metadata": {}, "source": [ "## State Space Representations\n", @@ -557,7 +557,7 @@ }, { "cell_type": "markdown", - "id": "316779bd", + "id": "8a32ba49", "metadata": {}, "source": [ "## Computations\n", @@ -678,7 +678,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c4c06244", + "id": "f0601d7e", "metadata": { "hide-output": false }, @@ -692,7 +692,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8fca1f97", + "id": "74cb607b", "metadata": { "hide-output": false }, @@ -714,7 +714,7 @@ { "cell_type": "code", "execution_count": null, - "id": "12634459", + "id": "377f2d83", "metadata": { "hide-output": false }, @@ -735,7 +735,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a8d456fb", + "id": "73525c55", "metadata": { "hide-output": false }, @@ -747,7 +747,7 @@ }, { "cell_type": "markdown", - "id": "a80eea8f", + "id": "69b852dd", "metadata": {}, "source": [ "Evidently, optimal consumption and debt decision rules for the consumer\n", @@ -766,7 +766,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7c44da2a", + "id": "8031c088", "metadata": { "hide-output": false }, @@ -786,7 +786,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05259bb5", + "id": "12831f10", "metadata": { "hide-output": false }, @@ -797,7 +797,7 @@ }, { "cell_type": "markdown", - "id": "8782676d", + "id": "c93b3ae0", "metadata": {}, "source": [ "For a consumer having access only to the information associated with the\n", @@ -850,7 +850,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1728dfc", + "id": "eb6e9d95", "metadata": { "hide-output": false }, @@ -870,7 +870,7 @@ }, { "cell_type": "markdown", - "id": "f3d29766", + "id": "7a328db2", "metadata": {}, "source": [ "The following code computes impulse response functions of\n", @@ -880,7 +880,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ce78a07", + "id": "445daaa0", "metadata": { "hide-output": false }, @@ -900,7 +900,7 @@ { "cell_type": "code", "execution_count": null, - "id": "edbd41f7", + "id": "b7491bfe", "metadata": { "hide-output": false }, @@ -912,7 +912,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9e198628", + "id": "36d33824", "metadata": { "hide-output": false }, @@ -926,7 +926,7 @@ }, { "cell_type": "markdown", - "id": "a43684a0", + "id": "2ff21b6b", "metadata": {}, "source": [ "The above two impulse response functions show that when the consumer has\n", @@ -942,7 +942,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bf9906e2", + "id": "8d0b621c", "metadata": { "hide-output": false }, @@ -954,7 +954,7 @@ { "cell_type": "code", "execution_count": null, - "id": "866d6b65", + "id": "a6654fb2", "metadata": { "hide-output": false }, @@ -969,7 +969,7 @@ }, { "cell_type": "markdown", - "id": "e2c2e3a0", + "id": "8ef131d6", "metadata": {}, "source": [ "The above impulse responses show that when the consumer has only the\n", @@ -993,7 +993,7 @@ { "cell_type": "code", "execution_count": null, - "id": "316c4c1b", + "id": "8dd448ae", "metadata": { "hide-output": false }, @@ -1006,7 +1006,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a7013a0c", + "id": "a5547c62", "metadata": { "hide-output": false }, @@ -1023,7 +1023,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16c3fbcf", + "id": "ebbffb5e", "metadata": { "hide-output": false }, @@ -1039,7 +1039,7 @@ }, { "cell_type": "markdown", - "id": "9d291670", + "id": "0b87acda", "metadata": {}, "source": [ "## Simulating Income Process and Two Associated Shock Processes\n", @@ -1078,7 +1078,7 @@ }, { "cell_type": "markdown", - "id": "46abc2f9", + "id": "5b7bcd1e", "metadata": {}, "source": [ "## Calculating Innovations in Another Way\n", @@ -1106,7 +1106,7 @@ }, { "cell_type": "markdown", - "id": "ec345368", + "id": "7b6de8d2", "metadata": {}, "source": [ "## Another Invertibility Issue\n", @@ -1115,12 +1115,12 @@ "to the LQ permanent income or consumption smoothing model.\n", "\n", "The technical issue discussed there is ultimately the source of the shock-invertibility issues discussed by\n", - "Eric Leeper, Todd Walker, and Susan Yang [[Leeper *et al.*, 2013](https://python-advanced.quantecon.org/zreferences.html#id33)] in their analysis of **fiscal foresight**." + "Eric Leeper, Todd Walker, and Susan Yang [[Leeper *et al.*, 2013](https://python-advanced.quantecon.org/zreferences.html#id34)] in their analysis of **fiscal foresight**." ] } ], "metadata": { - "date": 1724218394.3280783, + "date": 1728369868.6019912, "filename": "cons_news.md", "kernelspec": { "display_name": "Python", diff --git a/discrete_dp.ipynb b/discrete_dp.ipynb index 2fe3150..beec805 100644 --- a/discrete_dp.ipynb +++ b/discrete_dp.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4f0ff470", + "id": "97f140ed", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "741fb58e", + "id": "65c8d8c7", "metadata": {}, "source": [ "# Discrete State Dynamic Programming\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8e4b15f7", + "id": "a35bc324", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "f65814da", + "id": "94422a42", "metadata": {}, "source": [ "## Overview\n", @@ -73,7 +73,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c242f3c", + "id": "33aa536b", "metadata": { "hide-output": false }, @@ -89,7 +89,7 @@ }, { "cell_type": "markdown", - "id": "3213ee31", + "id": "c42a5663", "metadata": {}, "source": [ "### How to Read this Lecture\n", @@ -105,7 +105,7 @@ }, { "cell_type": "markdown", - "id": "41461cd0", + "id": "d91872c5", "metadata": {}, "source": [ "### Code\n", @@ -124,19 +124,19 @@ }, { "cell_type": "markdown", - "id": "b33ae78a", + "id": "599a94e5", "metadata": {}, "source": [ "### References\n", "\n", "For background reading on dynamic programming and additional applications, see, for example,\n", "\n", - "- [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)] \n", - "- [[Hernandez-Lerma and Lasserre, 1996](https://python-advanced.quantecon.org/zreferences.html#id159)], section 3.5 \n", - "- [[Puterman, 2005](https://python-advanced.quantecon.org/zreferences.html#id122)] \n", - "- [[Stokey *et al.*, 1989](https://python-advanced.quantecon.org/zreferences.html#id209)] \n", - "- [[Rust, 1996](https://python-advanced.quantecon.org/zreferences.html#id131)] \n", - "- [[Miranda and Fackler, 2002](https://python-advanced.quantecon.org/zreferences.html#id185)] \n", + "- [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)] \n", + "- [[Hernandez-Lerma and Lasserre, 1996](https://python-advanced.quantecon.org/zreferences.html#id160)], section 3.5 \n", + "- [[Puterman, 2005](https://python-advanced.quantecon.org/zreferences.html#id123)] \n", + "- [[Stokey *et al.*, 1989](https://python-advanced.quantecon.org/zreferences.html#id210)] \n", + "- [[Rust, 1996](https://python-advanced.quantecon.org/zreferences.html#id132)] \n", + "- [[Miranda and Fackler, 2002](https://python-advanced.quantecon.org/zreferences.html#id186)] \n", "- [EDTC](http://johnstachurski.net/edtc.html), chapter 5 \n", "\n", "\n", @@ -146,7 +146,7 @@ }, { "cell_type": "markdown", - "id": "9b9e2029", + "id": "4b6140b8", "metadata": {}, "source": [ "## Discrete DPs\n", @@ -185,7 +185,7 @@ }, { "cell_type": "markdown", - "id": "f537750e", + "id": "3cf2915f", "metadata": {}, "source": [ "### Policies\n", @@ -204,7 +204,7 @@ "\n", "It is known that, for any arbitrary policy, there exists a stationary Markov policy that dominates it at least weakly.\n", "\n", - "- See section 5.5 of [[Puterman, 2005](https://python-advanced.quantecon.org/zreferences.html#id122)] for discussion and proofs. \n", + "- See section 5.5 of [[Puterman, 2005](https://python-advanced.quantecon.org/zreferences.html#id123)] for discussion and proofs. \n", "\n", "\n", "In what follows, stationary Markov policies are referred to simply as policies.\n", @@ -216,7 +216,7 @@ }, { "cell_type": "markdown", - "id": "b24ff758", + "id": "fe08f867", "metadata": {}, "source": [ "### Formal Definition\n", @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "d9acd6a5", + "id": "630ab88d", "metadata": {}, "source": [ "### Value and Optimality\n", @@ -324,7 +324,7 @@ }, { "cell_type": "markdown", - "id": "1d1c4c60", + "id": "f00eee99", "metadata": {}, "source": [ "### Two Operators\n", @@ -376,7 +376,7 @@ }, { "cell_type": "markdown", - "id": "146db653", + "id": "92e249cd", "metadata": {}, "source": [ "### The Bellman Equation and the Principle of Optimality\n", @@ -412,7 +412,7 @@ }, { "cell_type": "markdown", - "id": "2673848f", + "id": "a2effb82", "metadata": {}, "source": [ "## Solving Discrete DPs\n", @@ -433,7 +433,7 @@ }, { "cell_type": "markdown", - "id": "9205ffae", + "id": "4645efaa", "metadata": {}, "source": [ "### Value Function Iteration\n", @@ -449,7 +449,7 @@ }, { "cell_type": "markdown", - "id": "0601ef0d", + "id": "0702f2ea", "metadata": {}, "source": [ "### Policy Function Iteration\n", @@ -472,7 +472,7 @@ }, { "cell_type": "markdown", - "id": "807de027", + "id": "f8eef73f", "metadata": {}, "source": [ "### Modified Policy Function Iteration\n", @@ -491,7 +491,7 @@ }, { "cell_type": "markdown", - "id": "743b4ad1", + "id": "b3a1aa6c", "metadata": {}, "source": [ "## Example: A Growth Model\n", @@ -523,7 +523,7 @@ }, { "cell_type": "markdown", - "id": "f88a5aa8", + "id": "e21015de", "metadata": {}, "source": [ "### Discrete DP Representation\n", @@ -556,7 +556,7 @@ }, { "cell_type": "markdown", - "id": "d5eab71b", + "id": "3b9de77c", "metadata": {}, "source": [ "### Defining a DiscreteDP Instance\n", @@ -585,7 +585,7 @@ { "cell_type": "code", "execution_count": null, - "id": "025765fe", + "id": "7d0cd1b1", "metadata": { "hide-output": false }, @@ -636,7 +636,7 @@ }, { "cell_type": "markdown", - "id": "9d08e8c9", + "id": "f781f8cf", "metadata": {}, "source": [ "Let’s run this code and create an instance of `SimpleOG`." @@ -645,7 +645,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fa611b3a", + "id": "846b3cc6", "metadata": { "hide-output": false }, @@ -656,7 +656,7 @@ }, { "cell_type": "markdown", - "id": "0176e4a0", + "id": "64c10de8", "metadata": {}, "source": [ "Instances of `DiscreteDP` are created using the signature `DiscreteDP(R, Q, β)`.\n", @@ -667,7 +667,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b74aa5a5", + "id": "b17ff5dc", "metadata": { "hide-output": false }, @@ -678,7 +678,7 @@ }, { "cell_type": "markdown", - "id": "552a434c", + "id": "e643c683", "metadata": {}, "source": [ "Now that we have an instance `ddp` of `DiscreteDP` we can solve it as follows" @@ -687,7 +687,7 @@ { "cell_type": "code", "execution_count": null, - "id": "22241a94", + "id": "71b654be", "metadata": { "hide-output": false }, @@ -698,7 +698,7 @@ }, { "cell_type": "markdown", - "id": "05c899dc", + "id": "6029c0e5", "metadata": {}, "source": [ "Let’s see what we’ve got here" @@ -707,7 +707,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a54776df", + "id": "df594e0e", "metadata": { "hide-output": false }, @@ -718,7 +718,7 @@ }, { "cell_type": "markdown", - "id": "0c3e8df3", + "id": "1f224d61", "metadata": {}, "source": [ "(In IPython version 4.0 and above you can also type `results.` and hit the tab key)\n", @@ -729,7 +729,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8e092965", + "id": "983beb18", "metadata": { "hide-output": false }, @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9caee759", + "id": "878afae8", "metadata": { "hide-output": false }, @@ -752,7 +752,7 @@ }, { "cell_type": "markdown", - "id": "7845b195", + "id": "823dc787", "metadata": {}, "source": [ "Since we’ve used policy iteration, these results will be exact unless we hit the iteration bound `max_iter`.\n", @@ -763,7 +763,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ab6169e", + "id": "dff52a27", "metadata": { "hide-output": false }, @@ -775,7 +775,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bf1a16a4", + "id": "796ad363", "metadata": { "hide-output": false }, @@ -786,7 +786,7 @@ }, { "cell_type": "markdown", - "id": "c4c06c86", + "id": "976b47bd", "metadata": {}, "source": [ "Another interesting object is `results.mc`, which is the controlled chain defined by $ Q_{\\sigma^*} $, where $ \\sigma^* $ is the optimal policy.\n", @@ -800,7 +800,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9fd018b6", + "id": "2300d222", "metadata": { "hide-output": false }, @@ -811,7 +811,7 @@ }, { "cell_type": "markdown", - "id": "ee943e11", + "id": "0ce7e6f9", "metadata": {}, "source": [ "Here’s the same information in a bar graph\n", @@ -825,7 +825,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e82f13f8", + "id": "1ba3443d", "metadata": { "hide-output": false }, @@ -838,7 +838,7 @@ }, { "cell_type": "markdown", - "id": "29003caf", + "id": "afd67a40", "metadata": {}, "source": [ "If we look at the bar graph we can see the rightward shift in probability mass\n", @@ -848,7 +848,7 @@ }, { "cell_type": "markdown", - "id": "3c893c83", + "id": "580e4664", "metadata": {}, "source": [ "### State-Action Pair Formulation\n", @@ -872,7 +872,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32ab2e9e", + "id": "85c73253", "metadata": { "hide-output": false }, @@ -905,7 +905,7 @@ }, { "cell_type": "markdown", - "id": "516fe9ae", + "id": "cf5b3a16", "metadata": {}, "source": [ "For larger problems, you might need to write this code more efficiently by vectorizing or using Numba." @@ -913,7 +913,7 @@ }, { "cell_type": "markdown", - "id": "ff09d0cc", + "id": "67b035a8", "metadata": {}, "source": [ "## Exercises\n", @@ -925,7 +925,7 @@ }, { "cell_type": "markdown", - "id": "4bc06a30", + "id": "f302dd1f", "metadata": {}, "source": [ "## Solutions" @@ -933,7 +933,7 @@ }, { "cell_type": "markdown", - "id": "46f2d91d", + "id": "6c544758", "metadata": {}, "source": [ "### Setup\n", @@ -947,7 +947,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97a13096", + "id": "a3bc2243", "metadata": { "hide-output": false }, @@ -961,7 +961,7 @@ }, { "cell_type": "markdown", - "id": "5faf8f30", + "id": "b561188f", "metadata": {}, "source": [ "Here we want to solve a finite state version of the continuous state model above.\n", @@ -972,7 +972,7 @@ { "cell_type": "code", "execution_count": null, - "id": "839e74be", + "id": "0c59da5e", "metadata": { "hide-output": false }, @@ -985,7 +985,7 @@ }, { "cell_type": "markdown", - "id": "408f1223", + "id": "84905ebc", "metadata": {}, "source": [ "We choose the action to be the amount of capital to save for the next\n", @@ -1014,7 +1014,7 @@ { "cell_type": "code", "execution_count": null, - "id": "03a983a1", + "id": "292ba298", "metadata": { "hide-output": false }, @@ -1036,7 +1036,7 @@ }, { "cell_type": "markdown", - "id": "60c2ff1a", + "id": "1b8b826b", "metadata": {}, "source": [ "Reward vector `R` (of length `L`):" @@ -1045,7 +1045,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f62379b8", + "id": "f2d9577e", "metadata": { "hide-output": false }, @@ -1056,7 +1056,7 @@ }, { "cell_type": "markdown", - "id": "4bb1ab9d", + "id": "6a9b55fd", "metadata": {}, "source": [ "(Degenerate) transition probability matrix `Q` (of shape `(L, grid_size)`), where we choose the [scipy.sparse.lil_matrix](http://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.lil_matrix.html) format, while any format will do (internally it will be converted to the csr format):" @@ -1065,7 +1065,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94e52130", + "id": "3ffd73b1", "metadata": { "hide-output": false }, @@ -1077,7 +1077,7 @@ }, { "cell_type": "markdown", - "id": "8ad2989a", + "id": "2f26de10", "metadata": {}, "source": [ "(If you are familiar with the data structure of [scipy.sparse.csr_matrix](http://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.html), the following is the most efficient way to create the `Q` matrix in\n", @@ -1087,7 +1087,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d8a2df26", + "id": "2dc1c163", "metadata": { "hide-output": false }, @@ -1100,7 +1100,7 @@ }, { "cell_type": "markdown", - "id": "ca418db8", + "id": "6a7e32f1", "metadata": {}, "source": [ "Discrete growth model:" @@ -1109,7 +1109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "780965ed", + "id": "1cb2b710", "metadata": { "hide-output": false }, @@ -1120,7 +1120,7 @@ }, { "cell_type": "markdown", - "id": "efa15827", + "id": "bebd0c87", "metadata": {}, "source": [ "**Notes**\n", @@ -1132,7 +1132,7 @@ }, { "cell_type": "markdown", - "id": "c8f158a0", + "id": "c09d4269", "metadata": {}, "source": [ "### Solving the Model\n", @@ -1143,7 +1143,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1958bd2", + "id": "d51b2ecf", "metadata": { "hide-output": false }, @@ -1156,7 +1156,7 @@ }, { "cell_type": "markdown", - "id": "28061e2a", + "id": "52e0b0cc", "metadata": {}, "source": [ "Note that `sigma` contains the *indices* of the optimal *capital\n", @@ -1167,7 +1167,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a136058d", + "id": "3ffe9cf8", "metadata": { "hide-output": false }, @@ -1190,7 +1190,7 @@ }, { "cell_type": "markdown", - "id": "0610b9e4", + "id": "b7949fe8", "metadata": {}, "source": [ "Let us compare the solution of the discrete model with that of the\n", @@ -1200,7 +1200,7 @@ { "cell_type": "code", "execution_count": null, - "id": "50f94e1e", + "id": "69eb9fc5", "metadata": { "hide-output": false }, @@ -1229,7 +1229,7 @@ }, { "cell_type": "markdown", - "id": "9059edfa", + "id": "7a634e17", "metadata": {}, "source": [ "The outcomes appear very close to those of the continuous version.\n", @@ -1240,7 +1240,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ea7a933", + "id": "4e7ccd03", "metadata": { "hide-output": false }, @@ -1252,7 +1252,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1a850b0a", + "id": "6ddee8e0", "metadata": { "hide-output": false }, @@ -1263,7 +1263,7 @@ }, { "cell_type": "markdown", - "id": "4b051c80", + "id": "d844934b", "metadata": {}, "source": [ "The optimal consumption functions are close as well:" @@ -1272,7 +1272,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5afa673", + "id": "07dbae5f", "metadata": { "hide-output": false }, @@ -1283,7 +1283,7 @@ }, { "cell_type": "markdown", - "id": "131abae8", + "id": "54dede33", "metadata": {}, "source": [ "In fact, the optimal consumption obtained in the discrete version is not\n", @@ -1293,7 +1293,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c4ed575b", + "id": "470566bd", "metadata": { "hide-output": false }, @@ -1306,7 +1306,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1c82fdb4", + "id": "a53096a7", "metadata": { "hide-output": false }, @@ -1319,7 +1319,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71677588", + "id": "2ac8bedb", "metadata": { "hide-output": false }, @@ -1330,7 +1330,7 @@ }, { "cell_type": "markdown", - "id": "b9272958", + "id": "ad594cf7", "metadata": {}, "source": [ "The value function is monotone:" @@ -1339,7 +1339,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3cd9adfe", + "id": "5e174bd1", "metadata": { "hide-output": false }, @@ -1350,7 +1350,7 @@ }, { "cell_type": "markdown", - "id": "bbf126b0", + "id": "f29bbe1a", "metadata": {}, "source": [ "### Comparison of the Solution Methods\n", @@ -1360,7 +1360,7 @@ }, { "cell_type": "markdown", - "id": "ecd9a04a", + "id": "47fc46a6", "metadata": {}, "source": [ "#### Value Iteration" @@ -1369,7 +1369,7 @@ { "cell_type": "code", "execution_count": null, - "id": "271d5ede", + "id": "6dfa33c8", "metadata": { "hide-output": false }, @@ -1384,7 +1384,7 @@ { "cell_type": "code", "execution_count": null, - "id": "062b58c6", + "id": "c8069691", "metadata": { "hide-output": false }, @@ -1395,7 +1395,7 @@ }, { "cell_type": "markdown", - "id": "1bd2e0a3", + "id": "9d33d1d1", "metadata": {}, "source": [ "#### Modified Policy Iteration" @@ -1404,7 +1404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b367e90c", + "id": "8811110b", "metadata": { "hide-output": false }, @@ -1417,7 +1417,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0164474a", + "id": "a5614e1f", "metadata": { "hide-output": false }, @@ -1428,7 +1428,7 @@ }, { "cell_type": "markdown", - "id": "4dd1cb3c", + "id": "1762639e", "metadata": {}, "source": [ "#### Speed Comparison" @@ -1437,7 +1437,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f4c7707d", + "id": "b0e57c84", "metadata": { "hide-output": false }, @@ -1450,7 +1450,7 @@ }, { "cell_type": "markdown", - "id": "885f09f3", + "id": "e4201c1c", "metadata": {}, "source": [ "As is often the case, policy iteration and modified policy iteration are\n", @@ -1459,7 +1459,7 @@ }, { "cell_type": "markdown", - "id": "ac70416f", + "id": "f90d6d56", "metadata": {}, "source": [ "### Replication of the Figures\n", @@ -1469,7 +1469,7 @@ }, { "cell_type": "markdown", - "id": "d20f3618", + "id": "b276d5a4", "metadata": {}, "source": [ "#### Convergence of Value Iteration\n", @@ -1482,7 +1482,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21d9d90d", + "id": "1e452a66", "metadata": { "hide-output": false }, @@ -1507,7 +1507,7 @@ }, { "cell_type": "markdown", - "id": "0a99b977", + "id": "3b04b40a", "metadata": {}, "source": [ "We next plot the consumption policies along with the value iteration" @@ -1516,7 +1516,7 @@ { "cell_type": "code", "execution_count": null, - "id": "73f10147", + "id": "ae3a7f60", "metadata": { "hide-output": false }, @@ -1549,7 +1549,7 @@ }, { "cell_type": "markdown", - "id": "52e89ea2", + "id": "9dcc0410", "metadata": {}, "source": [ "#### Dynamics of the Capital Stock\n", @@ -1564,7 +1564,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35757155", + "id": "52855084", "metadata": { "hide-output": false }, @@ -1599,7 +1599,7 @@ }, { "cell_type": "markdown", - "id": "c7877502", + "id": "255a3064", "metadata": {}, "source": [ "\n", @@ -1608,7 +1608,7 @@ }, { "cell_type": "markdown", - "id": "bc63c4f1", + "id": "6d2979c0", "metadata": {}, "source": [ "## Appendix: Algorithms\n", @@ -1623,7 +1623,7 @@ }, { "cell_type": "markdown", - "id": "7e71bd46", + "id": "2c443393", "metadata": {}, "source": [ "### Value Iteration\n", @@ -1650,7 +1650,7 @@ }, { "cell_type": "markdown", - "id": "2a64184b", + "id": "65502c80", "metadata": {}, "source": [ "### Policy Iteration\n", @@ -1676,7 +1676,7 @@ }, { "cell_type": "markdown", - "id": "6a204d7f", + "id": "01ddd386", "metadata": {}, "source": [ "### Modified Policy Iteration\n", @@ -1702,7 +1702,7 @@ } ], "metadata": { - "date": 1724218394.3891954, + "date": 1728369868.6643534, "filename": "discrete_dp.md", "kernelspec": { "display_name": "Python", diff --git a/dyn_stack.ipynb b/dyn_stack.ipynb index fa75a88..4807a97 100644 --- a/dyn_stack.ipynb +++ b/dyn_stack.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5b0d1fd7", + "id": "a6f13afe", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "f9ebe4a4", + "id": "74cdcbcc", "metadata": {}, "source": [ "# Stackelberg Plans\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e6820430", + "id": "7567a512", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "c755627c", + "id": "e635a8de", "metadata": {}, "source": [ "## Overview\n", @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5bbf965b", + "id": "c0880b08", "metadata": { "hide-output": false }, @@ -73,7 +73,7 @@ }, { "cell_type": "markdown", - "id": "9e07e226", + "id": "9cef7862", "metadata": {}, "source": [ "## Duopoly\n", @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "2ec0721b", + "id": "a7a0c5f4", "metadata": {}, "source": [ "### Stackelberg Leader and Follower\n", @@ -149,7 +149,7 @@ }, { "cell_type": "markdown", - "id": "da421476", + "id": "6f88ab7e", "metadata": {}, "source": [ "### Statement of Leader’s and Follower’s Problems\n", @@ -201,7 +201,7 @@ }, { "cell_type": "markdown", - "id": "52d6931d", + "id": "6fd1fb8c", "metadata": {}, "source": [ "### Firms’ Problems\n", @@ -225,7 +225,7 @@ "$ \\{q_{1t+1}, v_{1t} \\}_{t=0}^\\infty $ and a minimum with respect to\n", "$ \\{ \\lambda_t\\}_{t=0}^\\infty $.\n", "\n", - "We approach this problem using methods described in [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)], chapter 2, appendix A and [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], chapter IX.\n", + "We approach this problem using methods described in [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)], chapter 2, appendix A and [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], chapter IX.\n", "\n", "First-order conditions for this problem are\n", "\n", @@ -270,7 +270,7 @@ " $ \\lim_{T \\rightarrow + \\infty} \\beta^T q_{1t}^2 < + \\infty $ \n", "\n", "\n", - "Using the lag operators described in [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], chapter IX, difference equation\n", + "Using the lag operators described in [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], chapter IX, difference equation\n", "[(40.1)](#equation-sstack1) can be written as\n", "\n", "$$\n", @@ -358,7 +358,7 @@ }, { "cell_type": "markdown", - "id": "6cd5510e", + "id": "3900b80b", "metadata": {}, "source": [ "## Stackelberg Problem\n", @@ -445,7 +445,7 @@ }, { "cell_type": "markdown", - "id": "b0e5ee5b", + "id": "851998b8", "metadata": {}, "source": [ "### Interpretation of Second Block of Equations\n", @@ -480,7 +480,7 @@ }, { "cell_type": "markdown", - "id": "0cf9f2f3", + "id": "cd00981e", "metadata": {}, "source": [ "### More Mechanical Details\n", @@ -507,7 +507,7 @@ }, { "cell_type": "markdown", - "id": "4ca2f860", + "id": "6a61067e", "metadata": {}, "source": [ "### Two Subproblems\n", @@ -556,7 +556,7 @@ }, { "cell_type": "markdown", - "id": "4025fee5", + "id": "e9337dc7", "metadata": {}, "source": [ "## Two Bellman Equations\n", @@ -627,7 +627,7 @@ }, { "cell_type": "markdown", - "id": "e0c32c5b", + "id": "8f44a9a2", "metadata": {}, "source": [ "## Stackelberg Plan for Duopoly\n", @@ -672,7 +672,7 @@ }, { "cell_type": "markdown", - "id": "c04255e0", + "id": "74cecc82", "metadata": {}, "source": [ "### Calculations to Prepare Duopoly Model\n", @@ -690,7 +690,7 @@ }, { "cell_type": "markdown", - "id": "f1513a4d", + "id": "472cfb4e", "metadata": {}, "source": [ "### Firm 1’s Problem\n", @@ -788,7 +788,7 @@ }, { "cell_type": "markdown", - "id": "245339be", + "id": "103ab9e0", "metadata": {}, "source": [ "## Recursive Representation of Stackelberg Plan\n", @@ -879,7 +879,7 @@ }, { "cell_type": "markdown", - "id": "f5e75390", + "id": "91892ea2", "metadata": {}, "source": [ "### Comments and Interpretations\n", @@ -899,7 +899,7 @@ }, { "cell_type": "markdown", - "id": "07f7b78f", + "id": "56cc0f6a", "metadata": {}, "source": [ "## Dynamic Programming and Time Consistency of Follower’s Problem\n", @@ -918,7 +918,7 @@ }, { "cell_type": "markdown", - "id": "d1cb537d", + "id": "5cfb9082", "metadata": {}, "source": [ "### Recursive Formulation of a Follower’s Problem\n", @@ -1041,7 +1041,7 @@ }, { "cell_type": "markdown", - "id": "7d50abeb", + "id": "281e2a19", "metadata": {}, "source": [ "### Time Consistency of Follower’s Plan\n", @@ -1059,7 +1059,7 @@ }, { "cell_type": "markdown", - "id": "6956a034", + "id": "eb9462b7", "metadata": {}, "source": [ "## Computing Stackelberg Plan\n", @@ -1073,7 +1073,7 @@ { "cell_type": "code", "execution_count": null, - "id": "58528397", + "id": "8921cfe8", "metadata": { "hide-output": false }, @@ -1097,7 +1097,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1c4469e", + "id": "bfec3c54", "metadata": { "hide-output": false }, @@ -1157,7 +1157,7 @@ }, { "cell_type": "markdown", - "id": "8d508360", + "id": "5ca1b99e", "metadata": {}, "source": [ "## Time Series for Price and Quantities\n", @@ -1170,7 +1170,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc09a8d8", + "id": "ad7cb3f3", "metadata": { "hide-output": false }, @@ -1193,7 +1193,7 @@ }, { "cell_type": "markdown", - "id": "d6701943", + "id": "c75f1abd", "metadata": {}, "source": [ "### Value of Stackelberg Leader\n", @@ -1208,7 +1208,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1ad2a92", + "id": "95ef6680", "metadata": { "hide-output": false }, @@ -1226,7 +1226,7 @@ { "cell_type": "code", "execution_count": null, - "id": "633ded11", + "id": "94103c60", "metadata": { "hide-output": false }, @@ -1240,7 +1240,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8bf7def9", + "id": "c930c15d", "metadata": { "hide-output": false }, @@ -1255,7 +1255,7 @@ }, { "cell_type": "markdown", - "id": "13a441b9", + "id": "59eb1191", "metadata": {}, "source": [ "## Time Inconsistency of Stackelberg Plan\n", @@ -1275,7 +1275,7 @@ { "cell_type": "code", "execution_count": null, - "id": "49a16351", + "id": "36d6546c", "metadata": { "hide-output": false }, @@ -1296,7 +1296,7 @@ { "cell_type": "code", "execution_count": null, - "id": "79c2d1fd", + "id": "e48fd085", "metadata": { "hide-output": false }, @@ -1325,7 +1325,7 @@ }, { "cell_type": "markdown", - "id": "22e8b325", + "id": "40b86d14", "metadata": {}, "source": [ "The figure above shows\n", @@ -1340,7 +1340,7 @@ }, { "cell_type": "markdown", - "id": "fe40355c", + "id": "cb40a4fd", "metadata": {}, "source": [ "## Recursive Formulation of Follower’s Problem\n", @@ -1355,7 +1355,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ed223010", + "id": "72db16c2", "metadata": { "hide-output": false }, @@ -1383,7 +1383,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2b1b46c", + "id": "e607b7a0", "metadata": { "hide-output": false }, @@ -1400,7 +1400,7 @@ }, { "cell_type": "markdown", - "id": "99cbc9cd", + "id": "95ef29c6", "metadata": {}, "source": [ "Note: Variables with `_tilde` are obtained from solving the follower’s\n", @@ -1410,7 +1410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32248e09", + "id": "6f83dcb8", "metadata": { "hide-output": false }, @@ -1424,7 +1424,7 @@ { "cell_type": "code", "execution_count": null, - "id": "59c1c6ec", + "id": "760cedf1", "metadata": { "hide-output": false }, @@ -1436,7 +1436,7 @@ }, { "cell_type": "markdown", - "id": "0882b369", + "id": "33617261", "metadata": {}, "source": [ "### Explanation of Alignment\n", @@ -1454,7 +1454,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f8dc55ff", + "id": "5652998e", "metadata": { "hide-output": false }, @@ -1467,7 +1467,7 @@ { "cell_type": "code", "execution_count": null, - "id": "206898e3", + "id": "f25cbf8d", "metadata": { "hide-output": false }, @@ -1480,7 +1480,7 @@ { "cell_type": "code", "execution_count": null, - "id": "916ef53d", + "id": "1a0e9c98", "metadata": { "hide-output": false }, @@ -1493,7 +1493,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a0181a52", + "id": "98219d43", "metadata": { "hide-output": false }, @@ -1506,7 +1506,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8383b291", + "id": "7cc8da42", "metadata": { "hide-output": false }, @@ -1525,7 +1525,7 @@ { "cell_type": "code", "execution_count": null, - "id": "99119a15", + "id": "3991ca4e", "metadata": { "hide-output": false }, @@ -1538,7 +1538,7 @@ { "cell_type": "code", "execution_count": null, - "id": "248dd160", + "id": "f8a8a791", "metadata": { "hide-output": false }, @@ -1551,7 +1551,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a55f45ca", + "id": "257c8d4a", "metadata": { "hide-output": false }, @@ -1594,7 +1594,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2207b463", + "id": "b7555a12", "metadata": { "hide-output": false }, @@ -1620,7 +1620,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5e4feaa2", + "id": "407f802d", "metadata": { "hide-output": false }, @@ -1632,7 +1632,7 @@ }, { "cell_type": "markdown", - "id": "389d9439", + "id": "a4b3b864", "metadata": {}, "source": [ "## Markov Perfect Equilibrium\n", @@ -1672,7 +1672,7 @@ { "cell_type": "code", "execution_count": null, - "id": "96b777f6", + "id": "0f39215f", "metadata": { "hide-output": false }, @@ -1715,7 +1715,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b3fc279", + "id": "f4c59725", "metadata": { "hide-output": false }, @@ -1738,7 +1738,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15eed5b5", + "id": "3f12d6fb", "metadata": { "hide-output": false }, @@ -1751,7 +1751,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21c1eb69", + "id": "dbb855aa", "metadata": { "hide-output": false }, @@ -1779,7 +1779,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c29d97d8", + "id": "10c7b0cc", "metadata": { "hide-output": false }, @@ -1797,7 +1797,7 @@ }, { "cell_type": "markdown", - "id": "fc43b318", + "id": "cb3c1fba", "metadata": {}, "source": [ "## Comparing Markov Perfect Equilibrium and Stackelberg Outcome\n", @@ -1815,7 +1815,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2169bcb6", + "id": "d5a49dff", "metadata": { "hide-output": false }, @@ -1841,7 +1841,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c763129", + "id": "f7e8c8fa", "metadata": { "hide-output": false }, @@ -1857,7 +1857,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ea32325", + "id": "72c0ce0b", "metadata": { "hide-output": false }, @@ -1869,7 +1869,7 @@ } ], "metadata": { - "date": 1724218394.609035, + "date": 1728369868.719928, "filename": "dyn_stack.md", "kernelspec": { "display_name": "Python", diff --git a/entropy.ipynb b/entropy.ipynb index 43ab4dc..6a1e1e3 100644 --- a/entropy.ipynb +++ b/entropy.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4077ad40", + "id": "2a0165f2", "metadata": {}, "source": [ "# Etymology of Entropy\n", @@ -11,7 +11,7 @@ "\n", "Among the senses of entropy, we’ll encounter these\n", "\n", - "- A measure of **uncertainty** of a random variable advanced by Claude Shannon [[Shannon and Weaver, 1949](https://python-advanced.quantecon.org/zreferences.html#id3)] \n", + "- A measure of **uncertainty** of a random variable advanced by Claude Shannon [[Shannon and Weaver, 1949](https://python-advanced.quantecon.org/zreferences.html#id4)] \n", "- A key object governing thermodynamics \n", "- Kullback and Leibler’s measure of the statistical divergence between two probability distributions \n", "- A measure of the volatility of stochastic discount factors that appear in asset pricing theory \n", @@ -26,18 +26,18 @@ }, { "cell_type": "markdown", - "id": "7de5b196", + "id": "e54e2c2d", "metadata": {}, "source": [ "## Information Theory\n", "\n", - "In information theory [[Shannon and Weaver, 1949](https://python-advanced.quantecon.org/zreferences.html#id3)], entropy is a measure of the unpredictability of a random variable.\n", + "In information theory [[Shannon and Weaver, 1949](https://python-advanced.quantecon.org/zreferences.html#id4)], entropy is a measure of the unpredictability of a random variable.\n", "\n", "To illustrate\n", "things, let $ X $ be a discrete random variable taking values $ x_1, \\ldots, x_n $\n", "with probabilities $ p_i = \\textrm{Prob}(X = x_i) \\geq 0, \\sum_i p_i =1 $.\n", "\n", - "Claude Shannon’s [[Shannon and Weaver, 1949](https://python-advanced.quantecon.org/zreferences.html#id3)] definition of entropy is\n", + "Claude Shannon’s [[Shannon and Weaver, 1949](https://python-advanced.quantecon.org/zreferences.html#id4)] definition of entropy is\n", "\n", "\n", "\n", @@ -65,7 +65,7 @@ }, { "cell_type": "markdown", - "id": "47fdcbff", + "id": "b0e15c7f", "metadata": {}, "source": [ "## A Measure of Unpredictability\n", @@ -85,7 +85,7 @@ }, { "cell_type": "markdown", - "id": "ffff195a", + "id": "58394e93", "metadata": {}, "source": [ "### Example\n", @@ -119,7 +119,7 @@ }, { "cell_type": "markdown", - "id": "1011553f", + "id": "4884faab", "metadata": {}, "source": [ "### Example\n", @@ -142,7 +142,7 @@ }, { "cell_type": "markdown", - "id": "3bf531f4", + "id": "fe412ffa", "metadata": {}, "source": [ "## Mathematical Properties of Entropy\n", @@ -160,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "9979731a", + "id": "6b267198", "metadata": {}, "source": [ "## Conditional Entropy\n", @@ -182,7 +182,7 @@ }, { "cell_type": "markdown", - "id": "0952780b", + "id": "5dd01f88", "metadata": {}, "source": [ "## Independence as Maximum Conditional Entropy\n", @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "8433a6d8", + "id": "ec6190a0", "metadata": {}, "source": [ "## Thermodynamics\n", @@ -235,7 +235,7 @@ }, { "cell_type": "markdown", - "id": "1f7afc7b", + "id": "b70716a7", "metadata": {}, "source": [ "## Statistical Divergence\n", @@ -270,7 +270,7 @@ }, { "cell_type": "markdown", - "id": "bb865f87", + "id": "b952af31", "metadata": {}, "source": [ "## Continuous distributions\n", @@ -284,7 +284,7 @@ }, { "cell_type": "markdown", - "id": "4a1dbd9b", + "id": "916546d4", "metadata": {}, "source": [ "## Relative entropy and Gaussian distributions\n", @@ -375,7 +375,7 @@ }, { "cell_type": "markdown", - "id": "c58aae00", + "id": "81d43452", "metadata": {}, "source": [ "## Von Neumann Entropy\n", @@ -401,16 +401,16 @@ }, { "cell_type": "markdown", - "id": "acd03dde", + "id": "7c942199", "metadata": {}, "source": [ "## Backus-Chernov-Zin Entropy\n", "\n", - "After flipping signs, [[Backus *et al.*, 2014](https://python-advanced.quantecon.org/zreferences.html#id4)] use Kullback-Leibler relative entropy as a measure of volatility of stochastic discount factors that they\n", + "After flipping signs, [[Backus *et al.*, 2014](https://python-advanced.quantecon.org/zreferences.html#id5)] use Kullback-Leibler relative entropy as a measure of volatility of stochastic discount factors that they\n", "assert is useful for characterizing features of both the data and various theoretical models of stochastic discount factors.\n", "\n", "Where $ p_{t+1} $ is the physical or true measure, $ p_{t+1}^* $ is the risk-neutral measure, and $ E_t $ denotes conditional\n", - "expectation under the $ p_{t+1} $ measure, [[Backus *et al.*, 2014](https://python-advanced.quantecon.org/zreferences.html#id4)] define entropy as\n", + "expectation under the $ p_{t+1} $ measure, [[Backus *et al.*, 2014](https://python-advanced.quantecon.org/zreferences.html#id5)] define entropy as\n", "\n", "\n", "\n", @@ -436,7 +436,7 @@ "E_t (m_{t+1} r_{t+1}) = 1\n", "$$\n", "\n", - "[[Backus *et al.*, 2014](https://python-advanced.quantecon.org/zreferences.html#id4)] note that a stochastic discount factor satisfies\n", + "[[Backus *et al.*, 2014](https://python-advanced.quantecon.org/zreferences.html#id5)] note that a stochastic discount factor satisfies\n", "\n", "$$\n", "m_{t+1} = q_t^1 p_{t+1}^*/p_{t+1} .\n", @@ -448,12 +448,12 @@ "E L_t (m_{t+1}) \\geq E (\\log r_{t+1} - \\log r_{t+1}^1 )\n", "$$\n", "\n", - "which they propose as a complement to a Hansen-Jagannathan [[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id20)] bound." + "which they propose as a complement to a Hansen-Jagannathan [[Hansen and Jagannathan, 1991](https://python-advanced.quantecon.org/zreferences.html#id21)] bound." ] }, { "cell_type": "markdown", - "id": "35150380", + "id": "d7c445a1", "metadata": {}, "source": [ "## Wiener-Kolmogorov Prediction Error Formula as Entropy\n", @@ -467,7 +467,7 @@ "\\sigma_x^2 =\\left( \\frac{1}{2\\pi}\\right) \\int_{-\\pi}^\\pi S_x (\\omega) d \\omega .\n", "$$\n", "\n", - "As described in chapter XIV of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], the Wiener-Kolmogorov formula for the one-period ahead prediction error is\n", + "As described in chapter XIV of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], the Wiener-Kolmogorov formula for the one-period ahead prediction error is\n", "\n", "\n", "\n", @@ -500,7 +500,7 @@ }, { "cell_type": "markdown", - "id": "cc40cad9", + "id": "29c11bf3", "metadata": {}, "source": [ "## Multivariate Processes\n", @@ -537,12 +537,12 @@ }, { "cell_type": "markdown", - "id": "480ae2e9", + "id": "82502876", "metadata": {}, "source": [ "## Frequency Domain Robust Control\n", "\n", - "Chapter 8 of [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id105)] adapts work in the control theory literature to define a\n", + "Chapter 8 of [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id106)] adapts work in the control theory literature to define a\n", "**frequency domain entropy** criterion for robust control as\n", "\n", "\n", @@ -554,7 +554,7 @@ "where $ \\theta \\in (\\underline \\theta, +\\infty) $ is a positive robustness parameter and $ G_F(\\zeta) $ is a $ \\zeta $-transform of the\n", "objective function.\n", "\n", - "Hansen and Sargent [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id105)] show that criterion [(25.13)](#equation-eq-shannon21) can be represented as\n", + "Hansen and Sargent [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id106)] show that criterion [(25.13)](#equation-eq-shannon21) can be represented as\n", "\n", "\n", "\n", @@ -570,7 +570,7 @@ }, { "cell_type": "markdown", - "id": "664e1220", + "id": "495d7ed4", "metadata": {}, "source": [ "## Relative Entropy for a Continuous Random Variable\n", @@ -610,7 +610,7 @@ } ], "metadata": { - "date": 1724218394.6622012, + "date": 1728369868.9385147, "filename": "entropy.md", "kernelspec": { "display_name": "Python", diff --git a/estspec.ipynb b/estspec.ipynb index 16b33a8..74eef81 100644 --- a/estspec.ipynb +++ b/estspec.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2c89a7f1", + "id": "1ff354e7", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "eb1ac4f3", + "id": "e4e5dea3", "metadata": {}, "source": [ "# Estimation of Spectra\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4075615f", + "id": "4cb438bd", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "6683a5ff", + "id": "22d36eee", "metadata": {}, "source": [ "## Overview\n", @@ -53,7 +53,7 @@ "\n", "Once the basic technique has been explained, we will apply it to the analysis of several key macroeconomic time series.\n", "\n", - "For supplementary reading, see [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)] or [[Cryer and Chan, 2008](https://python-advanced.quantecon.org/zreferences.html#id143)].\n", + "For supplementary reading, see [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)] or [[Cryer and Chan, 2008](https://python-advanced.quantecon.org/zreferences.html#id144)].\n", "\n", "Let’s start with some standard imports:" ] @@ -61,7 +61,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc362048", + "id": "6beb648c", "metadata": { "hide-output": false }, @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "679405b1", + "id": "ee3bb62b", "metadata": {}, "source": [ "\n", @@ -83,7 +83,7 @@ }, { "cell_type": "markdown", - "id": "5de866cd", + "id": "6a61465f", "metadata": {}, "source": [ "## Periodograms\n", @@ -136,7 +136,7 @@ }, { "cell_type": "markdown", - "id": "d58c3df5", + "id": "1d5f5e15", "metadata": {}, "source": [ "### Interpretation\n", @@ -203,7 +203,7 @@ }, { "cell_type": "markdown", - "id": "9b51b30b", + "id": "7b9b87f6", "metadata": {}, "source": [ "### Calculation\n", @@ -261,7 +261,7 @@ { "cell_type": "code", "execution_count": null, - "id": "333de9df", + "id": "89cfcc49", "metadata": { "hide-output": false }, @@ -283,7 +283,7 @@ }, { "cell_type": "markdown", - "id": "f03a5957", + "id": "9b8b6b6c", "metadata": {}, "source": [ "This estimate looks rather disappointing, but the data size is only 40, so\n", @@ -301,7 +301,7 @@ }, { "cell_type": "markdown", - "id": "a090bf2c", + "id": "a99a2ac3", "metadata": {}, "source": [ "## Smoothing\n", @@ -354,7 +354,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a4e9a6f5", + "id": "5b9df364", "metadata": { "hide-output": false }, @@ -376,7 +376,7 @@ }, { "cell_type": "markdown", - "id": "de72477c", + "id": "993c0711", "metadata": {}, "source": [ "### Estimation with Smoothing\n", @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "2f397965", + "id": "54e459c0", "metadata": {}, "source": [ "### Pre-Filtering and Smoothing\n", @@ -472,7 +472,7 @@ }, { "cell_type": "markdown", - "id": "e57fc19e", + "id": "bc16de10", "metadata": {}, "source": [ "### The AR(1) Setting\n", @@ -548,7 +548,7 @@ }, { "cell_type": "markdown", - "id": "45fd0dc6", + "id": "a69bd119", "metadata": {}, "source": [ "## Exercises\n", @@ -559,7 +559,7 @@ }, { "cell_type": "markdown", - "id": "615de240", + "id": "97158ecd", "metadata": {}, "source": [ "## Exercise 29.1\n", @@ -573,7 +573,7 @@ }, { "cell_type": "markdown", - "id": "fb91cc67", + "id": "3f22fdb2", "metadata": {}, "source": [ "## Solution to[ Exercise 29.1](https://python-advanced.quantecon.org/#est_ex1)" @@ -582,7 +582,7 @@ { "cell_type": "code", "execution_count": null, - "id": "09dfb445", + "id": "b01cfd20", "metadata": { "hide-output": false }, @@ -615,7 +615,7 @@ }, { "cell_type": "markdown", - "id": "2d7466dc", + "id": "fb7254f0", "metadata": {}, "source": [ "\n", @@ -624,7 +624,7 @@ }, { "cell_type": "markdown", - "id": "bf607268", + "id": "d05bd44e", "metadata": {}, "source": [ "## Exercise 29.2\n", @@ -639,7 +639,7 @@ }, { "cell_type": "markdown", - "id": "6a88e4ea", + "id": "dfa4107d", "metadata": {}, "source": [ "## Solution to[ Exercise 29.2](https://python-advanced.quantecon.org/#est_ex2)" @@ -648,7 +648,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6023f8f3", + "id": "17999bc4", "metadata": { "hide-output": false }, @@ -682,7 +682,7 @@ } ], "metadata": { - "date": 1724218394.6862314, + "date": 1728369868.9630425, "filename": "estspec.md", "kernelspec": { "display_name": "Python", diff --git a/five_preferences.ipynb b/five_preferences.ipynb index 4a5fc9a..1f44f61 100644 --- a/five_preferences.ipynb +++ b/five_preferences.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "d9a322d2", + "id": "19597093", "metadata": {}, "source": [ "# Risk and Model Uncertainty" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "a74204a9", + "id": "9de4b440", "metadata": {}, "source": [ "## Overview\n", @@ -19,7 +19,7 @@ "this lecture describes static representations of five classes of preferences over risky prospects.\n", "\n", "These preference specifications allow us to distinguish **risk** from **uncertainty** along lines proposed by\n", - "[[Knight, 1921](https://python-advanced.quantecon.org/zreferences.html#id8)].\n", + "[[Knight, 1921](https://python-advanced.quantecon.org/zreferences.html#id9)].\n", "\n", "All five preference specifications incorporate **risk aversion**, meaning displeasure from risks governed by well known probability distributions.\n", "\n", @@ -34,7 +34,7 @@ "- Ex post Bayesian expected utility preferences \n", "\n", "\n", - "This labeling scheme is taken from [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id59)].\n", + "This labeling scheme is taken from [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id60)].\n", "\n", "Constraint and multiplier preferences express aversion to not knowing a unique probability distribution\n", "that describes random outcomes.\n", @@ -56,7 +56,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f4ca53f5", + "id": "600c3fbc", "metadata": { "hide-output": false }, @@ -78,7 +78,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ae4b5af5", + "id": "5307df6b", "metadata": { "hide-output": false }, @@ -106,7 +106,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87dee755", + "id": "d0ec96f5", "metadata": { "hide-output": false }, @@ -164,7 +164,7 @@ }, { "cell_type": "markdown", - "id": "e293f7b4", + "id": "873e28af", "metadata": {}, "source": [ "## Basic objects\n", @@ -229,7 +229,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35d81f40", + "id": "70c3c206", "metadata": { "hide-output": false }, @@ -261,7 +261,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a81a5c75", + "id": "279a2726", "metadata": { "hide-output": false }, @@ -276,7 +276,7 @@ }, { "cell_type": "markdown", - "id": "9728224a", + "id": "7f836452", "metadata": {}, "source": [ "The heat maps in the next two figures vary both $ \\hat{\\pi}_1 $ and $ \\pi_1 $.\n", @@ -287,7 +287,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c9e0a0d", + "id": "dd258cfe", "metadata": { "hide-output": false }, @@ -316,7 +316,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f69be648", + "id": "536642b4", "metadata": { "hide-output": false }, @@ -334,7 +334,7 @@ }, { "cell_type": "markdown", - "id": "3e766106", + "id": "eefdef0a", "metadata": {}, "source": [ "The next figure plots the logarithm of entropy." @@ -343,7 +343,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6e171af", + "id": "8827d4c4", "metadata": { "hide-output": false }, @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ca2ff0d9", + "id": "5a71baa4", "metadata": { "hide-output": false }, @@ -375,7 +375,7 @@ }, { "cell_type": "markdown", - "id": "f8883919", + "id": "291eca23", "metadata": {}, "source": [ "## Five preference specifications\n", @@ -400,7 +400,7 @@ }, { "cell_type": "markdown", - "id": "200b28bd", + "id": "662f5488", "metadata": {}, "source": [ "## Expected utility\n", @@ -422,7 +422,7 @@ }, { "cell_type": "markdown", - "id": "6f5c51cb", + "id": "1dd34440", "metadata": {}, "source": [ "## Constraint preferences\n", @@ -457,7 +457,7 @@ "\n", "Larger values of the entropy constraint $ \\eta $ indicate more apprehension about the baseline probability distribution $ \\{\\pi_i\\}_{i=1}^I $.\n", "\n", - "Following [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id59)] and [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)], we call minimization problem [(24.2)](#equation-tom2) subject to [(24.3)](#equation-tom3) and[(24.4)](#equation-tom4) a **constraint problem**.\n", + "Following [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id60)] and [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)], we call minimization problem [(24.2)](#equation-tom2) subject to [(24.3)](#equation-tom3) and[(24.4)](#equation-tom4) a **constraint problem**.\n", "\n", "To find minimizing probabilities, we form a Lagrangian\n", "\n", @@ -547,7 +547,7 @@ }, { "cell_type": "markdown", - "id": "fb253155", + "id": "b844a9e2", "metadata": {}, "source": [ "## Multiplier preferences\n", @@ -570,7 +570,7 @@ "\n", "Lower values of the penalty parameter $ \\theta $ express more apprehension about the baseline probability distribution $ \\pi $.\n", "\n", - "Following [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id59)] and [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)], we call the minimization problem on the right side of [(24.11)](#equation-tom11) a **multiplier problem**.\n", + "Following [[Hansen and Sargent, 2001](https://python-advanced.quantecon.org/zreferences.html#id60)] and [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)], we call the minimization problem on the right side of [(24.11)](#equation-tom11) a **multiplier problem**.\n", "\n", "The minimizing probability distortion that solves the multiplier problem is\n", "\n", @@ -610,7 +610,7 @@ }, { "cell_type": "markdown", - "id": "d2a64057", + "id": "1b152c32", "metadata": {}, "source": [ "## Risk-sensitive preferences\n", @@ -623,7 +623,7 @@ "{\\sf T} u(c) \\doteq - \\theta \\log \\sum_{i=1}^I \\pi_i \\exp\\bigl(- u(c_i)/\\theta \\bigr). \\tag{24.15}\n", "$$\n", "\n", - "Here $ {\\sf T} u $ in [(24.15)](#equation-tom14) is the **risk-sensitivity** operator of [[Jacobson, 1973](https://python-advanced.quantecon.org/zreferences.html#id242)], [[Whittle, 1981](https://python-advanced.quantecon.org/zreferences.html#id84)], and [[Whittle, 1990](https://python-advanced.quantecon.org/zreferences.html#id86)].\n", + "Here $ {\\sf T} u $ in [(24.15)](#equation-tom14) is the **risk-sensitivity** operator of [[Jacobson, 1973](https://python-advanced.quantecon.org/zreferences.html#id243)], [[Whittle, 1981](https://python-advanced.quantecon.org/zreferences.html#id85)], and [[Whittle, 1990](https://python-advanced.quantecon.org/zreferences.html#id87)].\n", "\n", "It defines a **risk-sensitive** preference ordering over plans $ c $.\n", "\n", @@ -639,7 +639,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ba02905", + "id": "aba0fc37", "metadata": { "hide-output": false }, @@ -671,7 +671,7 @@ { "cell_type": "code", "execution_count": null, - "id": "430f0558", + "id": "e1b3f487", "metadata": { "hide-output": false }, @@ -687,7 +687,7 @@ }, { "cell_type": "markdown", - "id": "120b2634", + "id": "f7ac8f71", "metadata": {}, "source": [ "For large values of $ \\theta $, $ {\\sf T} u(c) $ is approximately linear in the probability $ \\pi_1 $, but for lower values of $ \\theta $, $ {\\sf T} u(c) $ has considerable curvature as a function of $ \\pi_1 $.\n", @@ -702,7 +702,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3425b8a0", + "id": "d0b12ace", "metadata": { "hide-output": false }, @@ -745,7 +745,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c48771f", + "id": "55a7d821", "metadata": { "hide-output": false }, @@ -788,7 +788,7 @@ }, { "cell_type": "markdown", - "id": "63db1725", + "id": "b2963880", "metadata": {}, "source": [ "The panel on the right portrays how the transformation $ \\exp\\left(\\frac{-u\\left(c\\right)}{\\theta}\\right) $ sends $ u\\left(c\\right) $ to a new function by (i) flipping the sign, and (ii) increasing curvature in proportion to $ \\theta $.\n", @@ -809,7 +809,7 @@ }, { "cell_type": "markdown", - "id": "ffd08b2e", + "id": "e86b7a3c", "metadata": {}, "source": [ "### Digression on moment generating functions\n", @@ -861,7 +861,7 @@ }, { "cell_type": "markdown", - "id": "92fa43fb", + "id": "9f8095b4", "metadata": {}, "source": [ "## Ex post Bayesian preferences\n", @@ -881,7 +881,7 @@ }, { "cell_type": "markdown", - "id": "e45644b8", + "id": "5e0fa30b", "metadata": {}, "source": [ "## Comparing preferences\n", @@ -906,7 +906,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0cc9cbda", + "id": "a6010c3f", "metadata": { "hide-output": false }, @@ -936,7 +936,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3fb75f4b", + "id": "d4d4d750", "metadata": { "hide-output": false }, @@ -955,7 +955,7 @@ }, { "cell_type": "markdown", - "id": "bc6dce2d", + "id": "089101c7", "metadata": {}, "source": [ "The next figure shows the function $ \\sum_{i=1}^I \\pi_i m_i [ u(c_i) + \\theta \\log m_i ] $ that is to be\n", @@ -967,7 +967,7 @@ { "cell_type": "code", "execution_count": null, - "id": "491a25e7", + "id": "4f3d9118", "metadata": { "hide-output": false }, @@ -995,7 +995,7 @@ { "cell_type": "code", "execution_count": null, - "id": "11675036", + "id": "f6680c82", "metadata": { "hide-output": false }, @@ -1033,7 +1033,7 @@ }, { "cell_type": "markdown", - "id": "1b2c1220", + "id": "bc99599e", "metadata": {}, "source": [ "Evidently, from this figure and also from formula [(24.12)](#equation-tom12), lower values of $ \\theta $ lead to lower,\n", @@ -1061,7 +1061,7 @@ }, { "cell_type": "markdown", - "id": "8ebfa0a6", + "id": "9bb8afe8", "metadata": {}, "source": [ "## Risk aversion and misspecification aversion\n", @@ -1081,13 +1081,13 @@ "\n", "By penalizing minimization over the\n", "likelihood ratio $ m $, a decrease in $ \\theta $ represents an **increase** in\n", - "ambiguity (or what [[Knight, 1921](https://python-advanced.quantecon.org/zreferences.html#id8)] called uncertainty) about the specification of the baseline\n", + "ambiguity (or what [[Knight, 1921](https://python-advanced.quantecon.org/zreferences.html#id9)] called uncertainty) about the specification of the baseline\n", "approximating model $ \\{\\pi_i\\}_{i=1}^I $.\n", "\n", "Formulas [(24.6)](#equation-tom6) assert that the decision maker acts as if\n", "he is pessimistic relative to an approximating model $ \\pi $.\n", "\n", - "It expresses what [[Bucklew, 2004](https://python-advanced.quantecon.org/zreferences.html#id7)] [p. 27] calls a statistical version of *Murphy’s law*:\n", + "It expresses what [[Bucklew, 2004](https://python-advanced.quantecon.org/zreferences.html#id8)] [p. 27] calls a statistical version of *Murphy’s law*:\n", "\n", "**$ \\quad \\quad $ The probability of anything happening is in inverse ratio to its desirability.**\n", "\n", @@ -1106,13 +1106,13 @@ "\n", "A decision rule is said to be **admissible** if it is undominated.\n", "\n", - "[[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)] use ex post Bayesian preferences to show that robust\n", + "[[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)] use ex post Bayesian preferences to show that robust\n", "decision rules are undominated and therefore admissible." ] }, { "cell_type": "markdown", - "id": "1b565782", + "id": "25dd15af", "metadata": {}, "source": [ "## Indifference curves\n", @@ -1156,7 +1156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7a4d9d6c", + "id": "8a8054de", "metadata": { "hide-output": false }, @@ -1277,7 +1277,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b59c25d1", + "id": "ed105005", "metadata": { "hide-output": false }, @@ -1325,7 +1325,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c2f91c44", + "id": "83cf77b9", "metadata": { "hide-output": false }, @@ -1353,7 +1353,7 @@ }, { "cell_type": "markdown", - "id": "5877b1a8", + "id": "88542cb4", "metadata": {}, "source": [ "**Kink at 45 degree line**\n", @@ -1423,7 +1423,7 @@ { "cell_type": "code", "execution_count": null, - "id": "caf51151", + "id": "67da45c3", "metadata": { "hide-output": false }, @@ -1472,7 +1472,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be52127f", + "id": "9ac0fdf4", "metadata": { "hide-output": false }, @@ -1500,7 +1500,7 @@ }, { "cell_type": "markdown", - "id": "1cf11779", + "id": "efa462cb", "metadata": {}, "source": [ "Note that all three lines of the left graph intersect at (1, 3). While the intersection at (3, 1) is hard-coded, the intersection at (1,3) arises from the computation, which confirms that the code seems to be\n", @@ -1537,7 +1537,7 @@ }, { "cell_type": "markdown", - "id": "8cb5b54e", + "id": "a6d83ffb", "metadata": {}, "source": [ "## State price deflators\n", @@ -1577,7 +1577,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cea11278", + "id": "f8894445", "metadata": { "hide-output": false }, @@ -1607,7 +1607,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a23fc857", + "id": "b3eb9a19", "metadata": { "hide-output": false }, @@ -1630,7 +1630,7 @@ }, { "cell_type": "markdown", - "id": "08ed6835", + "id": "8b6c81c6", "metadata": {}, "source": [ "Because budget constraints are linear, asset prices are identical under\n", @@ -1641,14 +1641,14 @@ "However, as we note next, though they are tangent at\n", "the endowment point, the fact that indifference curves differ for\n", "multiplier and constraint preferences means that certainty equivalent\n", - "consumption compensations of the kind that [[Lucas, 1987](https://python-advanced.quantecon.org/zreferences.html#id102)],\n", - "[[Hansen *et al.*, 1999](https://python-advanced.quantecon.org/zreferences.html#id13)], [[Tallarini, 2000](https://python-advanced.quantecon.org/zreferences.html#id101)], and [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id12)] used to measure the costs of\n", + "consumption compensations of the kind that [[Lucas, 1987](https://python-advanced.quantecon.org/zreferences.html#id103)],\n", + "[[Hansen *et al.*, 1999](https://python-advanced.quantecon.org/zreferences.html#id14)], [[Tallarini, 2000](https://python-advanced.quantecon.org/zreferences.html#id102)], and [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id13)] used to measure the costs of\n", "business cycles must differ." ] }, { "cell_type": "markdown", - "id": "9cc64d7f", + "id": "355e458a", "metadata": {}, "source": [ "### Consumption-equivalent measures of uncertainty aversion\n", @@ -1663,7 +1663,7 @@ { "cell_type": "code", "execution_count": null, - "id": "263883d0", + "id": "df85ba27", "metadata": { "hide-output": false }, @@ -1695,7 +1695,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43194cbb", + "id": "b518514a", "metadata": { "hide-output": false }, @@ -1732,7 +1732,7 @@ }, { "cell_type": "markdown", - "id": "bcc55a9e", + "id": "ca33fa73", "metadata": {}, "source": [ "The figure indicates that the certainty equivalent\n", @@ -1760,7 +1760,7 @@ }, { "cell_type": "markdown", - "id": "9334dffc", + "id": "bed41ec3", "metadata": {}, "source": [ "## Iso-utility and iso-entropy curves and expansion paths\n", @@ -1794,7 +1794,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46e39a13", + "id": "4a34384d", "metadata": { "hide-output": false }, @@ -1843,7 +1843,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72c306e1", + "id": "1b50a61a", "metadata": { "hide-output": false }, @@ -1918,7 +1918,7 @@ { "cell_type": "code", "execution_count": null, - "id": "75471c6f", + "id": "da4e7334", "metadata": { "hide-output": false }, @@ -1932,7 +1932,7 @@ { "cell_type": "code", "execution_count": null, - "id": "11d5d1f1", + "id": "574b6dc1", "metadata": { "hide-output": false }, @@ -1945,7 +1945,7 @@ }, { "cell_type": "markdown", - "id": "cbe80fc8", + "id": "09b062f6", "metadata": {}, "source": [ "## Bounds on expected utility\n", @@ -2008,7 +2008,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4d844c99", + "id": "dd727de3", "metadata": { "hide-output": false }, @@ -2074,7 +2074,7 @@ { "cell_type": "code", "execution_count": null, - "id": "29a572e5", + "id": "8253e92a", "metadata": { "hide-output": false }, @@ -2101,7 +2101,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f3834314", + "id": "2e83a1d7", "metadata": { "hide-output": false }, @@ -2117,7 +2117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5627ac4", + "id": "e39a4836", "metadata": { "hide-output": false }, @@ -2134,7 +2134,7 @@ }, { "cell_type": "markdown", - "id": "fbf5c850", + "id": "f296681e", "metadata": {}, "source": [ "In this figure, expected utility is on the co-ordinate axis\n", @@ -2184,7 +2184,7 @@ }, { "cell_type": "markdown", - "id": "de8e432e", + "id": "2ed6f8c0", "metadata": {}, "source": [ "## Why entropy?\n", @@ -2202,7 +2202,7 @@ }, { "cell_type": "markdown", - "id": "63903d59", + "id": "50885bee", "metadata": {}, "source": [ "### Entropy and statistical detection\n", @@ -2218,16 +2218,16 @@ "\n", "He uses relative entropy to quantify what close means.\n", "\n", - "[[Anderson *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id11)] and [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id12)]describe links between entropy and large deviations\n", + "[[Anderson *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id12)] and [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id13)]describe links between entropy and large deviations\n", "bounds on test statistics for discriminating between models, in particular, statistics that describe the probability of making an error in applying a likelihood ratio test to decide whether model A or model B\n", "generated a data record of length $ T $.\n", "\n", "For a given sample size, an\n", "informative bound on the detection error probability is a function of\n", - "the entropy parameter $ \\eta $ in constraint preferences. [[Anderson *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id11)] and [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id12)]\n", + "the entropy parameter $ \\eta $ in constraint preferences. [[Anderson *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id12)] and [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id13)]\n", "use detection error probabilities to calibrate reasonable values of $ \\eta $.\n", "\n", - "[[Anderson *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id11)] and [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)] also\n", + "[[Anderson *et al.*, 2003](https://python-advanced.quantecon.org/zreferences.html#id12)] and [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)] also\n", "use detection error probabilities to calibrate reasonable values of the\n", "penalty parameter $ \\theta $ in multiplier preferences.\n", "\n", @@ -2242,7 +2242,7 @@ "To indicate outcomes from this approach, the following figure\n", "plots the histogram for U.S. quarterly consumption growth along with a\n", "representative agent’s approximating density and a worst-case density\n", - "that [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id12)] show imply high measured market prices of risk even when a\n", + "that [[Barillas *et al.*, 2009](https://python-advanced.quantecon.org/zreferences.html#id13)] show imply high measured market prices of risk even when a\n", "representative consumer has the unit coefficient of relative risk\n", "aversion associated with a logarithmic one-period utility function." ] @@ -2250,7 +2250,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d7ead1b8", + "id": "5eb0fad3", "metadata": { "hide-output": false }, @@ -2268,7 +2268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2947bfa5", + "id": "3f4e0ea0", "metadata": { "hide-output": false }, @@ -2296,7 +2296,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1594d5bd", + "id": "445b0af5", "metadata": { "hide-output": false }, @@ -2319,7 +2319,7 @@ { "cell_type": "code", "execution_count": null, - "id": "92c7da79", + "id": "076c85eb", "metadata": { "hide-output": false }, @@ -2330,7 +2330,7 @@ }, { "cell_type": "markdown", - "id": "c55c9c02", + "id": "b437cffa", "metadata": {}, "source": [ "The density for the approximating model is\n", @@ -2350,23 +2350,23 @@ }, { "cell_type": "markdown", - "id": "d1f6ae97", + "id": "24327769", "metadata": {}, "source": [ "### Axiomatic justifications\n", "\n", "Multiplier and constraint preferences are both special cases of what\n", - "[[Maccheroni *et al.*, 2006](https://python-advanced.quantecon.org/zreferences.html#id9)] call variational preferences.\n", + "[[Maccheroni *et al.*, 2006](https://python-advanced.quantecon.org/zreferences.html#id10)] call variational preferences.\n", "\n", "They provide an axiomatic foundation for variational preferences and describe how they\n", "express ambiguity aversion.\n", "\n", - "Constraint preferences are particular instances of the multiple priors model of [[Gilboa and Schmeidler, 1989](https://python-advanced.quantecon.org/zreferences.html#id10)]." + "Constraint preferences are particular instances of the multiple priors model of [[Gilboa and Schmeidler, 1989](https://python-advanced.quantecon.org/zreferences.html#id11)]." ] } ], "metadata": { - "date": 1724218394.7614148, + "date": 1728369869.041677, "filename": "five_preferences.md", "kernelspec": { "display_name": "Python", diff --git a/growth_in_dles.ipynb b/growth_in_dles.ipynb index a876685..ae1189b 100644 --- a/growth_in_dles.ipynb +++ b/growth_in_dles.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0c13e2a1", + "id": "8ab10cb0", "metadata": {}, "source": [ "\n", @@ -13,13 +13,13 @@ }, { "cell_type": "markdown", - "id": "407555ee", + "id": "76b54355", "metadata": {}, "source": [ "# Growth in Dynamic Linear Economies\n", "\n", "This is another member of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s included in Anaconda, this lecture uses the quantecon library." ] @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb9b16ca", + "id": "afed4879", "metadata": { "hide-output": false }, @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "77eb4027", + "id": "98e74cd4", "metadata": {}, "source": [ "This lecture describes several complete market economies having a\n", @@ -55,7 +55,7 @@ { "cell_type": "code", "execution_count": null, - "id": "320d1321", + "id": "c7c877c1", "metadata": { "hide-output": false }, @@ -68,7 +68,7 @@ }, { "cell_type": "markdown", - "id": "cc370022", + "id": "c636e765", "metadata": {}, "source": [ "## Common Structure\n", @@ -132,7 +132,7 @@ }, { "cell_type": "markdown", - "id": "e4475d25", + "id": "195a9efd", "metadata": {}, "source": [ "## A Planning Problem\n", @@ -181,7 +181,7 @@ "The DLE class in Python maps this planning problem into a linear-quadratic dynamic programming problem and then solves it by using\n", "QuantEcon’s LQ class.\n", "\n", - "(See Section 5.5 of Hansen & Sargent (2013) [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] for a full\n", + "(See Section 5.5 of Hansen & Sargent (2013) [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] for a full\n", "description of how to map these economies into an LQ setting, and how to\n", "use the solution to the LQ problem to construct the output matrices in\n", "order to simulate the economies)\n", @@ -215,7 +215,7 @@ }, { "cell_type": "markdown", - "id": "3aca01e9", + "id": "051cc813", "metadata": {}, "source": [ "## Example Economies\n", @@ -300,7 +300,7 @@ }, { "cell_type": "markdown", - "id": "de28fdaf", + "id": "1e6b8a39", "metadata": {}, "source": [ "### Example 1: Hall (1978)\n", @@ -333,7 +333,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ea7a6115", + "id": "eeb30174", "metadata": { "hide-output": false }, @@ -376,7 +376,7 @@ }, { "cell_type": "markdown", - "id": "3bac592c", + "id": "ee87045a", "metadata": {}, "source": [ "These parameter values are used to define an economy of the DLE class." @@ -385,7 +385,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1de5b22f", + "id": "6bb6c01c", "metadata": { "hide-output": false }, @@ -396,7 +396,7 @@ }, { "cell_type": "markdown", - "id": "acc42df0", + "id": "1769de08", "metadata": {}, "source": [ "We can then simulate the economy for a chosen length of time, from our\n", @@ -406,7 +406,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f368fd70", + "id": "b0f381fe", "metadata": { "hide-output": false }, @@ -417,7 +417,7 @@ }, { "cell_type": "markdown", - "id": "da25d2b7", + "id": "3fdf1c35", "metadata": {}, "source": [ "The economy stores the simulated values for each variable. Below we plot\n", @@ -427,7 +427,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c67e7c57", + "id": "d1bf4108", "metadata": { "hide-output": false }, @@ -442,7 +442,7 @@ }, { "cell_type": "markdown", - "id": "30237798", + "id": "621423ef", "metadata": {}, "source": [ "Inspection of the plot shows that the sample paths of consumption and\n", @@ -455,7 +455,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d7bd5427", + "id": "e5594fe0", "metadata": { "hide-output": false }, @@ -466,7 +466,7 @@ }, { "cell_type": "markdown", - "id": "b830d6e4", + "id": "ca48b9c6", "metadata": {}, "source": [ "The endogenous eigenvalue that appears to be unity reflects the random\n", @@ -479,7 +479,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8e22574e", + "id": "2b2e2385", "metadata": { "hide-output": false }, @@ -490,7 +490,7 @@ }, { "cell_type": "markdown", - "id": "18991d42", + "id": "9632ff27", "metadata": {}, "source": [ "The fact that the largest endogenous eigenvalue is strictly less than\n", @@ -501,7 +501,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a524c183", + "id": "85b7ca6f", "metadata": { "hide-output": false }, @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "2c11d6c5", + "id": "3607c3d0", "metadata": {}, "source": [ "However, the near-unity endogenous eigenvalue means that these steady\n", @@ -523,7 +523,7 @@ }, { "cell_type": "markdown", - "id": "31c11ac1", + "id": "34dbf1f0", "metadata": {}, "source": [ "### Example 2: Altered Growth Condition\n", @@ -557,7 +557,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8eb6c178", + "id": "458f9ca5", "metadata": { "hide-output": false }, @@ -576,7 +576,7 @@ }, { "cell_type": "markdown", - "id": "9f0f9f0c", + "id": "5b810603", "metadata": {}, "source": [ "Creating the DLE class and then simulating gives the following plot for\n", @@ -586,7 +586,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9e8ae8b", + "id": "8a1cc9e6", "metadata": { "hide-output": false }, @@ -604,7 +604,7 @@ }, { "cell_type": "markdown", - "id": "f927436f", + "id": "5c2879f6", "metadata": {}, "source": [ "Simulating our new economy shows that consumption grows quickly in the\n", @@ -617,7 +617,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff9f88a6", + "id": "c46a4d30", "metadata": { "hide-output": false }, @@ -629,7 +629,7 @@ }, { "cell_type": "markdown", - "id": "c05bb165", + "id": "7647fe57", "metadata": {}, "source": [ "The economy converges faster to this level than in Example 1 because the\n", @@ -640,7 +640,7 @@ { "cell_type": "code", "execution_count": null, - "id": "911dfcdd", + "id": "02d80d99", "metadata": { "hide-output": false }, @@ -651,7 +651,7 @@ }, { "cell_type": "markdown", - "id": "d2b3cf65", + "id": "ef093c28", "metadata": {}, "source": [ "### Example 3: A Jones-Manuelli (1990) Economy\n", @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "edf12b6d", + "id": "c20c8551", "metadata": { "hide-output": false }, @@ -712,7 +712,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0b72a305", + "id": "55e2689f", "metadata": { "hide-output": false }, @@ -723,7 +723,7 @@ }, { "cell_type": "markdown", - "id": "23dea7ab", + "id": "198e9dbb", "metadata": {}, "source": [ "We simulate this economy from the original state vector" @@ -732,7 +732,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1d9d42f2", + "id": "dfcb06a8", "metadata": { "hide-output": false }, @@ -749,7 +749,7 @@ }, { "cell_type": "markdown", - "id": "744c7bf9", + "id": "3650d7c1", "metadata": {}, "source": [ "Thus, adding habit persistence to the Hall model of Example 1 is enough\n", @@ -762,7 +762,7 @@ { "cell_type": "code", "execution_count": null, - "id": "de3159a3", + "id": "51e70ce6", "metadata": { "hide-output": false }, @@ -773,7 +773,7 @@ }, { "cell_type": "markdown", - "id": "fc768e26", + "id": "a5970c99", "metadata": {}, "source": [ "We now have two unit endogenous eigenvalues. One stems from satisfying\n", @@ -787,7 +787,7 @@ }, { "cell_type": "markdown", - "id": "4ff5c89c", + "id": "e1072777", "metadata": {}, "source": [ "### Example 3.1: Varying Sensitivity\n", @@ -798,7 +798,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cba0a910", + "id": "166d5206", "metadata": { "hide-output": false }, @@ -819,7 +819,7 @@ }, { "cell_type": "markdown", - "id": "3fc9a34a", + "id": "e73d08d6", "metadata": {}, "source": [ "We no longer achieve sustained growth if $ \\lambda $ is raised from -1 to -0.7.\n", @@ -831,7 +831,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c796496f", + "id": "732fe882", "metadata": { "hide-output": false }, @@ -842,7 +842,7 @@ }, { "cell_type": "markdown", - "id": "49254e4c", + "id": "151056f3", "metadata": {}, "source": [ "### Example 3.2: More Impatience\n", @@ -853,7 +853,7 @@ { "cell_type": "code", "execution_count": null, - "id": "65ef1c3d", + "id": "aeac0378", "metadata": { "hide-output": false }, @@ -874,7 +874,7 @@ }, { "cell_type": "markdown", - "id": "2a3d2fd2", + "id": "dc74dc07", "metadata": {}, "source": [ "Growth also fails if we lower $ \\beta $, since we now have\n", @@ -891,7 +891,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46d04013", + "id": "d8fa1876", "metadata": { "hide-output": false }, @@ -902,7 +902,7 @@ } ], "metadata": { - "date": 1724218394.788976, + "date": 1728369869.069877, "filename": "growth_in_dles.md", "kernelspec": { "display_name": "Python", diff --git a/hs_invertibility_example.ipynb b/hs_invertibility_example.ipynb index 683b1bd..4eab1cb 100644 --- a/hs_invertibility_example.ipynb +++ b/hs_invertibility_example.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "3cd70e56", + "id": "269d8713", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "8188dad7", + "id": "f16a2283", "metadata": {}, "source": [ "# Shock Non Invertibility" @@ -21,13 +21,13 @@ }, { "cell_type": "markdown", - "id": "9ef27398", + "id": "93e37fb6", "metadata": {}, "source": [ "## Overview\n", "\n", "This is another member of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s in Anaconda, this lecture uses the quantecon library." ] @@ -35,7 +35,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b2566ad", + "id": "726f3fbc", "metadata": { "hide-output": false }, @@ -46,7 +46,7 @@ }, { "cell_type": "markdown", - "id": "0fedc576", + "id": "f687b075", "metadata": {}, "source": [ "We’ll make these imports:" @@ -55,7 +55,7 @@ { "cell_type": "code", "execution_count": null, - "id": "63be32e7", + "id": "eb45b3a1", "metadata": { "hide-output": false }, @@ -70,7 +70,7 @@ }, { "cell_type": "markdown", - "id": "7b1390ef", + "id": "f602350c", "metadata": {}, "source": [ "This lecture describes an early contribution to what is now often called\n", @@ -88,7 +88,7 @@ "problem would misinterpret shocks and likely responses to them.\n", "\n", "A shock-invertibility that is technically close to the one studied here is discussed by\n", - "Eric Leeper, Todd Walker, and Susan Yang [[Leeper *et al.*, 2013](https://python-advanced.quantecon.org/zreferences.html#id33)] in their analysis of **fiscal foresight**.\n", + "Eric Leeper, Todd Walker, and Susan Yang [[Leeper *et al.*, 2013](https://python-advanced.quantecon.org/zreferences.html#id34)] in their analysis of **fiscal foresight**.\n", "\n", "A distinct shock-invertibility issue is present in the special LQ consumption smoothing model\n", "in this quantecon lecture [Information and Consumption Smoothing](https://python-advanced.quantecon.org/cons_news.html)." @@ -96,12 +96,12 @@ }, { "cell_type": "markdown", - "id": "9883a372", + "id": "88f78ace", "metadata": {}, "source": [ "## Model\n", "\n", - "We consider the following modification of Robert Hall’s (1978) model [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)] in which the endowment process is the sum of two orthogonal autoregressive processes:\n", + "We consider the following modification of Robert Hall’s (1978) model [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)] in which the endowment process is the sum of two orthogonal autoregressive processes:\n", "\n", "**Preferences**\n", "\n", @@ -191,7 +191,7 @@ { "cell_type": "code", "execution_count": null, - "id": "28882dc3", + "id": "3d1eab81", "metadata": { "hide-output": false }, @@ -229,7 +229,7 @@ }, { "cell_type": "markdown", - "id": "309c3bfb", + "id": "e866ad81", "metadata": {}, "source": [ "We define the household’s net of interest deficit as $ c_t - d_t $.\n", @@ -277,7 +277,7 @@ "\n", "A representation with equivalent shocks would be recovered by estimating a bivariate vector autoregression for $ c_t, c_t-d_t $.\n", "\n", - "The Appendix of chapter 8 of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] explains why the impulse\n", + "The Appendix of chapter 8 of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] explains why the impulse\n", "response functions in the Wold representation estimated by the\n", "econometrician do not resemble the impulse response functions that\n", "depict the response of consumption and the net-of-interest deficit to innovations $ w_t $ to\n", @@ -300,19 +300,19 @@ }, { "cell_type": "markdown", - "id": "626bb60a", + "id": "5e7c1cfc", "metadata": {}, "source": [ "## Code\n", "\n", - "We will construct Figures from Chapter 8 Appendix E of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] to\n", + "We will construct Figures from Chapter 8 Appendix E of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] to\n", "illustrate these ideas:" ] }, { "cell_type": "code", "execution_count": null, - "id": "441615c5", + "id": "0b76de26", "metadata": { "hide-output": false }, @@ -340,7 +340,7 @@ }, { "cell_type": "markdown", - "id": "ec9d9af9", + "id": "8b8edcc5", "metadata": {}, "source": [ "The above figure displays the impulse response of consumption and the\n", @@ -360,7 +360,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ae46d30c", + "id": "a8d80421", "metadata": { "hide-output": false }, @@ -410,7 +410,7 @@ }, { "cell_type": "markdown", - "id": "294a9acf", + "id": "2747d7dd", "metadata": {}, "source": [ "The above figure displays the impulse response of consumption and the\n", @@ -430,7 +430,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9b497619", + "id": "2f6abe43", "metadata": { "hide-output": false }, @@ -467,7 +467,7 @@ }, { "cell_type": "markdown", - "id": "0dbc684b", + "id": "cac7ca41", "metadata": {}, "source": [ "The above figure displays the impulse responses of $ u_t $ to\n", @@ -488,7 +488,7 @@ } ], "metadata": { - "date": 1724218394.805222, + "date": 1728369869.086332, "filename": "hs_invertibility_example.md", "kernelspec": { "display_name": "Python", diff --git a/hs_recursive_models.ipynb b/hs_recursive_models.ipynb index 5d0dc4e..53c4fb4 100644 --- a/hs_recursive_models.ipynb +++ b/hs_recursive_models.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "1c422309", + "id": "6c123667", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "69958308", + "id": "12976a03", "metadata": {}, "source": [ "# Recursive Models of Dynamic Linear Economies\n", @@ -29,13 +29,13 @@ }, { "cell_type": "markdown", - "id": "0c735d3b", + "id": "64aa0ff4", "metadata": {}, "source": [ "## A Suite of Models\n", "\n", "This lecture presents a class of linear-quadratic-Gaussian models of general economic equilibrium\n", - "designed by Lars Peter Hansen and Thomas J. Sargent [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)].\n", + "designed by Lars Peter Hansen and Thomas J. Sargent [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)].\n", "\n", "The class of models is implemented in a Python class DLE that is part of quantecon.\n", "\n", @@ -52,7 +52,7 @@ }, { "cell_type": "markdown", - "id": "b4be44bf", + "id": "ff8540fb", "metadata": {}, "source": [ "### Overview of the Models\n", @@ -92,18 +92,18 @@ "The Arrow trick of indexing commodities by chance is the idea that **analysis of trade under uncertainty is a special\n", "case of the analysis of trade under certainty**.\n", "\n", - "The [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models specify the commodity space, preferences, technologies, stochastic shocks and information flows in ways\n", + "The [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models specify the commodity space, preferences, technologies, stochastic shocks and information flows in ways\n", "that allow the models to be analyzed completely using only the tools of linear time series models and linear-quadratic optimal control described\n", "in the two lectures [Linear State Space Models](https://python-intro.quantecon.org/linear_models.html) and [Linear Quadratic Control](https://python-intro.quantecon.org/lqcontrol.html).\n", "\n", "There are costs and benefits associated with the simplifications and specializations needed to make a particular model fit within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class\n", "\n", "- the costs are that linear-quadratic structures are sometimes too confining. \n", "- benefits include computational speed, simplicity, and ability to analyze many model features analytically or nearly analytically. \n", "\n", "\n", - "A variety of superficially different models are all instances of the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models\n", + "A variety of superficially different models are all instances of the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models\n", "\n", "- Lucas asset pricing model \n", "- Lucas-Prescott model of investment under uncertainty \n", @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "44a424eb", + "id": "94ab4a70", "metadata": {}, "source": [ "### Forecasting?\n", @@ -140,12 +140,12 @@ }, { "cell_type": "markdown", - "id": "e610638c", + "id": "fdd96f96", "metadata": {}, "source": [ "### Theory and Econometrics\n", "\n", - "For an application of the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models, the outcome of theorizing is a stochastic process, i.e., a probability\n", + "For an application of the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models, the outcome of theorizing is a stochastic process, i.e., a probability\n", "distribution over sequences of prices and quantities, indexed by parameters describing preferences, technologies, and information flows.\n", "\n", "Another name for that object is a likelihood function, a key object of both frequentist and Bayesian statistics.\n", @@ -165,12 +165,12 @@ }, { "cell_type": "markdown", - "id": "0af12101", + "id": "cb0f80f2", "metadata": {}, "source": [ "### More Details\n", "\n", - "A [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] economy consists of **lists of matrices** that describe peoples’ household technologies, their preferences over\n", + "A [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] economy consists of **lists of matrices** that describe peoples’ household technologies, their preferences over\n", "consumption services, their production technologies, and their information sets.\n", "\n", "There are complete markets in history-contingent commodities.\n", @@ -183,7 +183,7 @@ "\n", "Different example economies manifest themselves simply as different settings for various matrices.\n", "\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] use these tools:\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] use these tools:\n", "\n", "- A theory of recursive dynamic competitive economies \n", "- Linear optimal control theory \n", @@ -248,7 +248,7 @@ }, { "cell_type": "markdown", - "id": "d4a2049a", + "id": "b2400a64", "metadata": {}, "source": [ "### Stochastic Model of Information Flows and Outcomes\n", @@ -290,7 +290,7 @@ }, { "cell_type": "markdown", - "id": "0993af30", + "id": "0d3b2aa0", "metadata": {}, "source": [ "### Information Sets\n", @@ -304,7 +304,7 @@ }, { "cell_type": "markdown", - "id": "fde2dc64", + "id": "df5a2fee", "metadata": {}, "source": [ "### Prediction Theory\n", @@ -380,7 +380,7 @@ }, { "cell_type": "markdown", - "id": "5d84ff77", + "id": "239bf894", "metadata": {}, "source": [ "### Orthogonal Decomposition\n", @@ -413,7 +413,7 @@ }, { "cell_type": "markdown", - "id": "b4c85521", + "id": "1ad4a168", "metadata": {}, "source": [ "### Taste and Technology Shocks\n", @@ -454,7 +454,7 @@ }, { "cell_type": "markdown", - "id": "2dd31cdd", + "id": "6536076d", "metadata": {}, "source": [ "### Production Technology\n", @@ -479,7 +479,7 @@ }, { "cell_type": "markdown", - "id": "faadd812", + "id": "1b4e1261", "metadata": {}, "source": [ "### Household Technology\n", @@ -506,7 +506,7 @@ }, { "cell_type": "markdown", - "id": "bd4f706c", + "id": "9b3fb1df", "metadata": {}, "source": [ "### Preferences\n", @@ -536,7 +536,7 @@ }, { "cell_type": "markdown", - "id": "de60deb4", + "id": "5c3f551e", "metadata": {}, "source": [ "### Endowment Economy\n", @@ -584,7 +584,7 @@ }, { "cell_type": "markdown", - "id": "f0a66443", + "id": "758b9920", "metadata": {}, "source": [ "### Single-Period Adjustment Costs\n", @@ -898,7 +898,7 @@ }, { "cell_type": "markdown", - "id": "26d6aaa4", + "id": "3bb45aee", "metadata": {}, "source": [ "### Optimal Resource Allocation\n", @@ -951,7 +951,7 @@ }, { "cell_type": "markdown", - "id": "b34d2088", + "id": "068103b5", "metadata": {}, "source": [ "### Lagrangian Formulation\n", @@ -1070,7 +1070,7 @@ }, { "cell_type": "markdown", - "id": "b7098ba7", + "id": "5fec7d70", "metadata": {}, "source": [ "### Dynamic Programming\n", @@ -1286,7 +1286,7 @@ }, { "cell_type": "markdown", - "id": "93a02d95", + "id": "241c616c", "metadata": {}, "source": [ "### Other mathematical infrastructure\n", @@ -1315,7 +1315,7 @@ }, { "cell_type": "markdown", - "id": "f8154b40", + "id": "d4c0242e", "metadata": {}, "source": [ "### Representative Household\n", @@ -1352,7 +1352,7 @@ }, { "cell_type": "markdown", - "id": "c6b51173", + "id": "69dcf3c2", "metadata": {}, "source": [ "### Type I Firm\n", @@ -1382,7 +1382,7 @@ }, { "cell_type": "markdown", - "id": "86f5c9ac", + "id": "df9c23ca", "metadata": {}, "source": [ "### Type II Firm\n", @@ -1410,7 +1410,7 @@ }, { "cell_type": "markdown", - "id": "8c8b5d79", + "id": "34de6789", "metadata": {}, "source": [ "### Competitive Equilibrium: Definition\n", @@ -1473,7 +1473,7 @@ }, { "cell_type": "markdown", - "id": "e1a1b256", + "id": "4c0f7f20", "metadata": {}, "source": [ "### Asset pricing\n", @@ -1521,7 +1521,7 @@ }, { "cell_type": "markdown", - "id": "9ae61f11", + "id": "9ce43b16", "metadata": {}, "source": [ "### Re-Opening Markets\n", @@ -1567,7 +1567,7 @@ }, { "cell_type": "markdown", - "id": "dd99bd4f", + "id": "f0da99d2", "metadata": {}, "source": [ "## Econometrics\n", @@ -1579,7 +1579,7 @@ "\n", "Another name for the inverse problem is **econometrics**.\n", "\n", - "An advantage of the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] structure is that it comes with a self-contained theory of econometrics.\n", + "An advantage of the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] structure is that it comes with a self-contained theory of econometrics.\n", "\n", "It is really just a tale of two state-space representations.\n", "\n", @@ -1680,7 +1680,7 @@ }, { "cell_type": "markdown", - "id": "c983b530", + "id": "7da33021", "metadata": {}, "source": [ "### Factorization of Likelihood Function\n", @@ -1707,7 +1707,7 @@ }, { "cell_type": "markdown", - "id": "aff04e4e", + "id": "e6e9bbba", "metadata": {}, "source": [ "### Covariance Generating Functions\n", @@ -1720,7 +1720,7 @@ }, { "cell_type": "markdown", - "id": "ad4ed262", + "id": "70cce048", "metadata": {}, "source": [ "### Spectral Factorization Identity\n", @@ -1764,7 +1764,7 @@ }, { "cell_type": "markdown", - "id": "f2adb8c5", + "id": "13d4e722", "metadata": {}, "source": [ "### Wold and Vector Autoregressive Representations\n", @@ -1806,7 +1806,7 @@ }, { "cell_type": "markdown", - "id": "70c2ccf2", + "id": "31e86e79", "metadata": {}, "source": [ "## Dynamic Demand Curves and Canonical Household Technologies" @@ -1814,7 +1814,7 @@ }, { "cell_type": "markdown", - "id": "53b3c117", + "id": "f7bd7031", "metadata": {}, "source": [ "### Canonical Household Technologies\n", @@ -1862,7 +1862,7 @@ }, { "cell_type": "markdown", - "id": "06c14364", + "id": "1c9b06fc", "metadata": {}, "source": [ "### Dynamic Demand Functions\n", @@ -1915,7 +1915,7 @@ }, { "cell_type": "markdown", - "id": "a6887d2f", + "id": "44802140", "metadata": {}, "source": [ "## Gorman Aggregation and Engel Curves\n", @@ -1945,7 +1945,7 @@ }, { "cell_type": "markdown", - "id": "60789fa6", + "id": "964fd682", "metadata": {}, "source": [ "### Re-Opened Markets\n", @@ -1989,7 +1989,7 @@ }, { "cell_type": "markdown", - "id": "733e9883", + "id": "c4960902", "metadata": {}, "source": [ "### Dynamic Demand\n", @@ -2017,7 +2017,7 @@ }, { "cell_type": "markdown", - "id": "790408dc", + "id": "5f95b7bb", "metadata": {}, "source": [ "### Attaining a Canonical Household Technology\n", @@ -2043,7 +2043,7 @@ }, { "cell_type": "markdown", - "id": "a764d338", + "id": "a2d3bab8", "metadata": {}, "source": [ "## Partial Equilibrium\n", @@ -2113,7 +2113,7 @@ }, { "cell_type": "markdown", - "id": "2e7fe5f5", + "id": "01d1c177", "metadata": {}, "source": [ "## Equilibrium Investment Under Uncertainty\n", @@ -2150,7 +2150,7 @@ }, { "cell_type": "markdown", - "id": "98691502", + "id": "4cd0dda3", "metadata": {}, "source": [ "## A Rosen-Topel Housing Model\n", @@ -2199,7 +2199,7 @@ }, { "cell_type": "markdown", - "id": "15760038", + "id": "f0c968f4", "metadata": {}, "source": [ "## Cattle Cycles\n", @@ -2269,7 +2269,7 @@ }, { "cell_type": "markdown", - "id": "c0a937b7", + "id": "817cb2e9", "metadata": {}, "source": [ "## Models of Occupational Choice and Pay\n", @@ -2282,12 +2282,12 @@ }, { "cell_type": "markdown", - "id": "511f9b56", + "id": "2b6916ab", "metadata": {}, "source": [ "### Market for Engineers\n", "\n", - "Ryoo and Rosen’s (2004) [[Ryoo and Rosen, 2004](https://python-advanced.quantecon.org/zreferences.html#id69)] model consists of the following equations:\n", + "Ryoo and Rosen’s (2004) [[Ryoo and Rosen, 2004](https://python-advanced.quantecon.org/zreferences.html#id70)] model consists of the following equations:\n", "\n", "first, a demand curve for engineers\n", "\n", @@ -2359,7 +2359,7 @@ }, { "cell_type": "markdown", - "id": "5762c45a", + "id": "79153ddb", "metadata": {}, "source": [ "### Skilled and Unskilled Workers\n", @@ -2422,7 +2422,7 @@ }, { "cell_type": "markdown", - "id": "82851690", + "id": "8c9b5649", "metadata": {}, "source": [ "## Permanent Income Models\n", @@ -2494,13 +2494,13 @@ "- Martingale $ {\\mathcal M}_t^k $. \n", "\n", "\n", - "These have been tested in work by Hansen, Sargent, and Roberts (1991) [[Sargent *et al.*, 1991](https://python-advanced.quantecon.org/zreferences.html#id58)]\n", - "and by Attanasio and Pavoni (2011) [[Attanasio and Pavoni, 2011](https://python-advanced.quantecon.org/zreferences.html#id57)]." + "These have been tested in work by Hansen, Sargent, and Roberts (1991) [[Sargent *et al.*, 1991](https://python-advanced.quantecon.org/zreferences.html#id59)]\n", + "and by Attanasio and Pavoni (2011) [[Attanasio and Pavoni, 2011](https://python-advanced.quantecon.org/zreferences.html#id58)]." ] }, { "cell_type": "markdown", - "id": "9ceffb6e", + "id": "45f3daeb", "metadata": {}, "source": [ "## Gorman Heterogeneous Households\n", @@ -2600,7 +2600,7 @@ }, { "cell_type": "markdown", - "id": "29d63f25", + "id": "9e5abcc3", "metadata": {}, "source": [ "## Non-Gorman Heterogeneous Households\n", @@ -2765,12 +2765,12 @@ "$ \\{c_t\\} = \\{c_{1t} + c_{2t}\\} $.\n", "\n", "In solving this problem, it is convenient to proceed by using Fourier\n", - "transforms.  For details, please see [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] where they deploy a\n", + "transforms.  For details, please see [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] where they deploy a\n", "\n", "**Secret Weapon:** Another application of the spectral factorization\n", "identity.\n", "\n", - "**Concluding remark:** The [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in this lecture are all complete markets models. We have exploited\n", + "**Concluding remark:** The [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in this lecture are all complete markets models. We have exploited\n", "the fact that complete market models **are all alike** to allow us to define a class that **gives the same name to different things** in the\n", "spirit of Henri Poincare.\n", "\n", @@ -2784,7 +2784,7 @@ } ], "metadata": { - "date": 1724218395.063743, + "date": 1728369869.3278134, "filename": "hs_recursive_models.md", "kernelspec": { "display_name": "Python", diff --git a/intro.ipynb b/intro.ipynb index 91e6cae..7e3341f 100644 --- a/intro.ipynb +++ b/intro.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "215db290", + "id": "792371df", "metadata": {}, "source": [ "# Advanced Quantitative Economics with Python\n", @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "8142d6bf", + "id": "70c337d9", "metadata": {}, "source": [ "# Tools and Techniques\n", @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "303a8c12", + "id": "6879f116", "metadata": {}, "source": [ "# LQ Control\n", @@ -42,7 +42,7 @@ }, { "cell_type": "markdown", - "id": "7219ffac", + "id": "3bea27f0", "metadata": {}, "source": [ "# Multiple Agent Models\n", @@ -54,7 +54,7 @@ }, { "cell_type": "markdown", - "id": "821168d0", + "id": "545eb3e1", "metadata": {}, "source": [ "# Dynamic Linear Economies\n", @@ -71,7 +71,7 @@ }, { "cell_type": "markdown", - "id": "b7cb43b0", + "id": "21ad0595", "metadata": {}, "source": [ "# Risk, Model Uncertainty, and Robustness\n", @@ -84,7 +84,7 @@ }, { "cell_type": "markdown", - "id": "38afeab6", + "id": "66f1e8d8", "metadata": {}, "source": [ "# Time Series Models\n", @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "88bb847e", + "id": "8e1a00a0", "metadata": {}, "source": [ "# Asset Pricing and Finance\n", @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "a8916d43", + "id": "684be789", "metadata": {}, "source": [ "# Dynamic Programming Squared\n", @@ -132,7 +132,7 @@ }, { "cell_type": "markdown", - "id": "5ccde81e", + "id": "f24693de", "metadata": {}, "source": [ "# Other\n", @@ -144,7 +144,7 @@ } ], "metadata": { - "date": 1724218395.096389, + "date": 1728369869.3599648, "filename": "intro.md", "kernelspec": { "display_name": "Python", diff --git a/irfs_in_hall_model.ipynb b/irfs_in_hall_model.ipynb index 2a17725..d44c29c 100644 --- a/irfs_in_hall_model.ipynb +++ b/irfs_in_hall_model.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "deb882d0", + "id": "c72e493b", "metadata": {}, "source": [ "\n", @@ -13,13 +13,13 @@ }, { "cell_type": "markdown", - "id": "4cd9550b", + "id": "ca11bcfe", "metadata": {}, "source": [ "# IRFs in Hall Models\n", "\n", "This is another member of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s in Anaconda, this lecture uses the quantecon library." ] @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "91631b2f", + "id": "d5ccc26c", "metadata": { "hide-output": false }, @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "c87fa5e9", + "id": "678040e4", "metadata": {}, "source": [ "We’ll make these imports:" @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf1a4027", + "id": "8d8f7d1a", "metadata": { "hide-output": false }, @@ -60,12 +60,12 @@ }, { "cell_type": "markdown", - "id": "49a6bcaa", + "id": "017f9c30", "metadata": {}, "source": [ "This lecture shows how the DLE class can be used to create impulse\n", "response functions for three related economies, starting from\n", - "Hall (1978) [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)].\n", + "Hall (1978) [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)].\n", "\n", "Knowledge of the basic economic environment is assumed.\n", "\n", @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "3d91b266", + "id": "259a965f", "metadata": {}, "source": [ "## Example 1: Hall (1978)\n", @@ -110,7 +110,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4f982614", + "id": "e5b19325", "metadata": { "hide-output": false }, @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "db5c39b5", + "id": "84651220", "metadata": {}, "source": [ "These parameter values are used to define an economy of the DLE class.\n", @@ -162,7 +162,7 @@ { "cell_type": "code", "execution_count": null, - "id": "adb332f2", + "id": "f25bf342", "metadata": { "hide-output": false }, @@ -180,7 +180,7 @@ }, { "cell_type": "markdown", - "id": "e33a41b5", + "id": "1c1e508b", "metadata": {}, "source": [ "The DLE class can be used to create impulse response functions for each\n", @@ -197,7 +197,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f9f88041", + "id": "e281c6f7", "metadata": { "hide-output": false }, @@ -213,7 +213,7 @@ }, { "cell_type": "markdown", - "id": "5fca0fd4", + "id": "f2d661ca", "metadata": {}, "source": [ "It can be seen that the endowment shock has permanent effects on the\n", @@ -226,7 +226,7 @@ }, { "cell_type": "markdown", - "id": "0402c1a9", + "id": "9c638633", "metadata": {}, "source": [ "## Example 2: Higher Adjustment Costs\n", @@ -242,7 +242,7 @@ { "cell_type": "code", "execution_count": null, - "id": "91a6843f", + "id": "fd200034", "metadata": { "hide-output": false }, @@ -265,7 +265,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04119c97", + "id": "4ce1ad84", "metadata": { "hide-output": false }, @@ -282,7 +282,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8887aaa7", + "id": "925029f7", "metadata": { "hide-output": false }, @@ -294,7 +294,7 @@ { "cell_type": "code", "execution_count": null, - "id": "92d829ac", + "id": "2b1abab7", "metadata": { "hide-output": false }, @@ -306,7 +306,7 @@ }, { "cell_type": "markdown", - "id": "c83fc794", + "id": "790f9a01", "metadata": {}, "source": [ "The first graph shows that there seems to be a downward trend in both\n", @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "411a193a", + "id": "97478ab8", "metadata": {}, "source": [ "## Example 3: Durable Consumption Goods\n", @@ -370,7 +370,7 @@ { "cell_type": "code", "execution_count": null, - "id": "491c93c2", + "id": "1e59241b", "metadata": { "hide-output": false }, @@ -402,7 +402,7 @@ }, { "cell_type": "markdown", - "id": "b7504206", + "id": "a8cdaa0c", "metadata": {}, "source": [ "In contrast to Hall’s original model of Example 1, it is now investment\n", @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64c1265d", + "id": "705b9289", "metadata": { "hide-output": false }, @@ -431,7 +431,7 @@ }, { "cell_type": "markdown", - "id": "5997c9df", + "id": "651ecf40", "metadata": {}, "source": [ "The impulse response functions confirm that consumption is now much more\n", @@ -444,7 +444,7 @@ } ], "metadata": { - "date": 1724218395.1095133, + "date": 1728369869.373228, "filename": "irfs_in_hall_model.md", "kernelspec": { "display_name": "Python", diff --git a/knowing_forecasts_of_others.ipynb b/knowing_forecasts_of_others.ipynb index 3c43128..97da8fb 100644 --- a/knowing_forecasts_of_others.ipynb +++ b/knowing_forecasts_of_others.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e8e8f73b", + "id": "d50b9d41", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "8ec8f2e8", + "id": "650734ac", "metadata": {}, "source": [ "# Knowing the Forecasts of Others\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "93c242c3", + "id": "9a7f34df", "metadata": { "hide-output": false }, @@ -34,34 +34,34 @@ }, { "cell_type": "markdown", - "id": "9079e11d", + "id": "7e741ee3", "metadata": {}, "source": [ "## Introduction\n", "\n", - "Robert E. Lucas, Jr. [[Robert E. Lucas, 1975](https://python-advanced.quantecon.org/zreferences.html#id21)], Kenneth Kasa [[Kasa, 2000](https://python-advanced.quantecon.org/zreferences.html#id24)], and Robert Townsend\n", - "[[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)] showed that putting decision makers into environments in which they want to infer persistent hidden state\n", + "Robert E. Lucas, Jr. [[Robert E. Lucas, 1975](https://python-advanced.quantecon.org/zreferences.html#id22)], Kenneth Kasa [[Kasa, 2000](https://python-advanced.quantecon.org/zreferences.html#id25)], and Robert Townsend\n", + "[[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)] showed that putting decision makers into environments in which they want to infer persistent hidden state\n", "variables from equilibrium prices and quantities can\n", "elongate and amplify impulse responses to aggregate\n", "shocks.\n", "\n", "This provides a promising way to think about amplification mechanisms in business cycle models.\n", "\n", - "Townsend [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)]\n", + "Townsend [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)]\n", "noted that living in such environments makes decision makers want to forecast forecasts of others.\n", "\n", "This theme has been pursued for situations in which\n", "decision makers’ imperfect information forces them to pursue an\n", "infinite recursion that involves forming beliefs about the beliefs of others\n", - "(e.g., [[Allen *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id28)]).\n", + "(e.g., [[Allen *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id29)]).\n", "\n", - "Lucas [[Robert E. Lucas, 1975](https://python-advanced.quantecon.org/zreferences.html#id21)] side stepped having decision makers forecast the\n", + "Lucas [[Robert E. Lucas, 1975](https://python-advanced.quantecon.org/zreferences.html#id22)] side stepped having decision makers forecast the\n", "forecasts of other decision makers by assuming that they simply **pool their\n", "information** before forecasting.\n", "\n", "A **pooling equilibrium** like Lucas’s plays a prominent role in this lecture.\n", "\n", - "Because he didn’t assume such pooling, [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)]\n", + "Because he didn’t assume such pooling, [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)]\n", "confronted the forecasting the forecasts of others problem.\n", "\n", "To formulate the problem recursively required that Townsend define a decision maker’s **state** vector.\n", @@ -78,10 +78,10 @@ "We show that Townsend’s model shares equilibrium prices and quantities with those that\n", "prevail in a pooling equilibrium.\n", "\n", - "That finding emerged from a line of research about Townsend’s model that built on [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id23)] and that culminated in\n", - "[[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] .\n", + "That finding emerged from a line of research about Townsend’s model that built on [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id24)] and that culminated in\n", + "[[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] .\n", "\n", - "Rather than directly deploying the [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id23)] machinery here, we shall instead implement a sneaky\n", + "Rather than directly deploying the [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id24)] machinery here, we shall instead implement a sneaky\n", "**guess-and-verify** tactic.\n", "\n", "- We first compute a pooling equilibrium and represent it as an instance of a linear state-space system provided by\n", @@ -102,7 +102,7 @@ }, { "cell_type": "markdown", - "id": "54de5c2d", + "id": "57522ed6", "metadata": {}, "source": [ "### A Sequence of Models\n", @@ -114,7 +114,7 @@ " component. \n", "\n", "\n", - "The models are simplified versions of Townsend’s [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)].\n", + "The models are simplified versions of Townsend’s [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)].\n", "\n", "Townsend’s is a model of a rational expectations equilibrium in which firms want to **forecast forecasts of others**.\n", "\n", @@ -135,7 +135,7 @@ }, { "cell_type": "markdown", - "id": "ba8aabbc", + "id": "ce08785c", "metadata": {}, "source": [ "## The Setting\n", @@ -222,7 +222,7 @@ }, { "cell_type": "markdown", - "id": "2ca6601a", + "id": "a9a870d6", "metadata": {}, "source": [ "## Tactics\n", @@ -292,7 +292,7 @@ "\n", "We want ultimately to compare outcomes in a pooling equilibrium\n", "with an equilibrium under the following alternative information structure for a firm\n", - "in industry $ i $ that originally interested Townsend [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)]:\n", + "in industry $ i $ that originally interested Townsend [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)]:\n", "\n", "- **Firm** $ i $’s **noise-ridden signal on** $ \\theta_t $ **and the\n", " price in industry** $ -i $, a firm in industry\n", @@ -322,7 +322,7 @@ }, { "cell_type": "markdown", - "id": "0794d5ef", + "id": "271a7a99", "metadata": {}, "source": [ "## Equilibrium Conditions\n", @@ -417,7 +417,7 @@ }, { "cell_type": "markdown", - "id": "77c8911b", + "id": "dc9a2e22", "metadata": {}, "source": [ "### Equilibrium under perfect foresight\n", @@ -497,7 +497,7 @@ }, { "cell_type": "markdown", - "id": "53cdb622", + "id": "2c803cce", "metadata": {}, "source": [ "## Equilibrium with $ \\theta_t $ stochastic but observed at $ t $\n", @@ -562,7 +562,7 @@ }, { "cell_type": "markdown", - "id": "e207f255", + "id": "4f03d7ff", "metadata": {}, "source": [ "### Filtering" @@ -570,7 +570,7 @@ }, { "cell_type": "markdown", - "id": "727df619", + "id": "0d6a5c0f", "metadata": {}, "source": [ "#### One noisy signal\n", @@ -642,7 +642,7 @@ }, { "cell_type": "markdown", - "id": "2e26ae01", + "id": "ab67d850", "metadata": {}, "source": [ "#### State-reconstruction error\n", @@ -721,7 +721,7 @@ }, { "cell_type": "markdown", - "id": "13c6a2ae", + "id": "1141578f", "metadata": {}, "source": [ "### A new state variable\n", @@ -760,7 +760,7 @@ }, { "cell_type": "markdown", - "id": "7c43df70", + "id": "02364161", "metadata": {}, "source": [ "### Two Noisy Signals\n", @@ -848,12 +848,12 @@ "$$\n", "\n", "Below, by using a guess-and-verify tactic, we shall show that outcomes in this **pooling equilibrium** equal those in an equilibrium under the alternative\n", - "information structure that interested Townsend [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)] but that originally seemed too challenging to compute. [4]" + "information structure that interested Townsend [[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)] but that originally seemed too challenging to compute. [4]" ] }, { "cell_type": "markdown", - "id": "c2c4ceee", + "id": "37f64fa9", "metadata": {}, "source": [ "## Guess-and-Verify Tactic\n", @@ -884,7 +884,7 @@ }, { "cell_type": "markdown", - "id": "c4728828", + "id": "8f0814b3", "metadata": {}, "source": [ "## Equilibrium with One Noisy Signal on $ \\theta_t $" @@ -892,7 +892,7 @@ }, { "cell_type": "markdown", - "id": "65b8219f", + "id": "2f353dc6", "metadata": {}, "source": [ "### Step 1: Solve for $ \\tilde{\\lambda} $ and $ \\lambda $\n", @@ -911,7 +911,7 @@ }, { "cell_type": "markdown", - "id": "f9873993", + "id": "49b68d96", "metadata": {}, "source": [ "### Step 2: Solve for $ p $\n", @@ -944,7 +944,7 @@ }, { "cell_type": "markdown", - "id": "0a4b5906", + "id": "39e4caed", "metadata": {}, "source": [ "### Step 3: Represent the system using `quantecon.LinearStateSpace`\n", @@ -1026,7 +1026,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e7a69b4", + "id": "658d1696", "metadata": { "hide-output": false }, @@ -1045,7 +1045,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5287498b", + "id": "1b86a3e7", "metadata": { "hide-output": false }, @@ -1061,7 +1061,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dab1a9c5", + "id": "f9b6d9a0", "metadata": { "hide-output": false }, @@ -1077,7 +1077,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35ad5c12", + "id": "0e82caf8", "metadata": { "hide-output": false }, @@ -1091,7 +1091,7 @@ { "cell_type": "code", "execution_count": null, - "id": "54844130", + "id": "73a5bcf6", "metadata": { "hide-output": false }, @@ -1110,7 +1110,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35c76c8c", + "id": "4a201765", "metadata": { "hide-output": false }, @@ -1124,7 +1124,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8c64547b", + "id": "30c639a0", "metadata": { "hide-output": false }, @@ -1157,7 +1157,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ccc71095", + "id": "cce2556b", "metadata": { "hide-output": false }, @@ -1171,7 +1171,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ed3aacd8", + "id": "1bfd36c4", "metadata": { "hide-output": false }, @@ -1184,7 +1184,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f6d7cac2", + "id": "a51467fb", "metadata": { "hide-output": false }, @@ -1196,7 +1196,7 @@ }, { "cell_type": "markdown", - "id": "ec3ca246", + "id": "a73041e2", "metadata": {}, "source": [ "### Step 4: Compute impulse response functions\n", @@ -1208,7 +1208,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a67720c2", + "id": "1eb99fbd", "metadata": { "hide-output": false }, @@ -1231,7 +1231,7 @@ }, { "cell_type": "markdown", - "id": "3631b39a", + "id": "7a00fc85", "metadata": {}, "source": [ "### Step 5: Compute stationary covariance matrices and population regressions\n", @@ -1265,7 +1265,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c46da76c", + "id": "e4d92ab0", "metadata": { "hide-output": false }, @@ -1290,7 +1290,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9ffad023", + "id": "ddbd5e71", "metadata": { "hide-output": false }, @@ -1304,7 +1304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a58c723f", + "id": "b1635507", "metadata": { "hide-output": false }, @@ -1319,7 +1319,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9389d211", + "id": "c342a000", "metadata": { "hide-output": false }, @@ -1332,7 +1332,7 @@ { "cell_type": "code", "execution_count": null, - "id": "aa44c6cc", + "id": "b290ef63", "metadata": { "hide-output": false }, @@ -1346,7 +1346,7 @@ }, { "cell_type": "markdown", - "id": "fed1152e", + "id": "dcaeec8d", "metadata": {}, "source": [ "## Equilibrium with Two Noisy Signals on $ \\theta_t $\n", @@ -1450,7 +1450,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4cfc662", + "id": "2529267e", "metadata": { "hide-output": false }, @@ -1469,7 +1469,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c69f7bc", + "id": "df45e68f", "metadata": { "hide-output": false }, @@ -1483,7 +1483,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8c76ba46", + "id": "a0eab483", "metadata": { "hide-output": false }, @@ -1523,7 +1523,7 @@ { "cell_type": "code", "execution_count": null, - "id": "006bfe24", + "id": "c911f9de", "metadata": { "hide-output": false }, @@ -1537,7 +1537,7 @@ { "cell_type": "code", "execution_count": null, - "id": "861078a4", + "id": "deaa0dd7", "metadata": { "hide-output": false }, @@ -1550,7 +1550,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8d4d240d", + "id": "e91f5456", "metadata": { "hide-output": false }, @@ -1562,7 +1562,7 @@ { "cell_type": "code", "execution_count": null, - "id": "79d87ff0", + "id": "29ddcdf7", "metadata": { "hide-output": false }, @@ -1586,7 +1586,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d5537d7", + "id": "8173f8e7", "metadata": { "hide-output": false }, @@ -1611,7 +1611,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f26b10d0", + "id": "84912209", "metadata": { "hide-output": false }, @@ -1625,7 +1625,7 @@ { "cell_type": "code", "execution_count": null, - "id": "07fa8145", + "id": "7a268792", "metadata": { "hide-output": false }, @@ -1640,7 +1640,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dee863dd", + "id": "c24532bf", "metadata": { "hide-output": false }, @@ -1653,7 +1653,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5bb5d03e", + "id": "6c58bbc2", "metadata": { "hide-output": false }, @@ -1679,7 +1679,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5fcecda1", + "id": "14b47756", "metadata": { "hide-output": false }, @@ -1692,7 +1692,7 @@ }, { "cell_type": "markdown", - "id": "42e76591", + "id": "89f7b43c", "metadata": {}, "source": [ "## Key Step\n", @@ -1710,7 +1710,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2d84b72", + "id": "1f0f03db", "metadata": { "hide-output": false }, @@ -1729,7 +1729,7 @@ { "cell_type": "code", "execution_count": null, - "id": "93902356", + "id": "b7527824", "metadata": { "hide-output": false }, @@ -1740,7 +1740,7 @@ }, { "cell_type": "markdown", - "id": "084178f5", + "id": "78cf6ff3", "metadata": {}, "source": [ "The $ R^2 $ in this regression equals $ 1 $.\n", @@ -1753,7 +1753,7 @@ }, { "cell_type": "markdown", - "id": "2d33bb3a", + "id": "a2bae8e0", "metadata": {}, "source": [ "## An observed common shock benchmark\n", @@ -1816,7 +1816,7 @@ { "cell_type": "code", "execution_count": null, - "id": "08bcfcd5", + "id": "fb17b1c7", "metadata": { "hide-output": false }, @@ -1833,7 +1833,7 @@ { "cell_type": "code", "execution_count": null, - "id": "854644cb", + "id": "d7a3ca3b", "metadata": { "hide-output": false }, @@ -1846,7 +1846,7 @@ }, { "cell_type": "markdown", - "id": "7b29751d", + "id": "82165845", "metadata": {}, "source": [ "Now let’s form and plot an impulse response function of $ k_t^i $ to shocks $ v_t $ to $ \\theta_{t+1} $" @@ -1855,7 +1855,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4f046aef", + "id": "6cb573da", "metadata": { "hide-output": false }, @@ -1877,7 +1877,7 @@ }, { "cell_type": "markdown", - "id": "e62f25f6", + "id": "cbca9a1f", "metadata": {}, "source": [ "## Comparison of All Signal Structures\n", @@ -1892,7 +1892,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bd844f64", + "id": "1ed85c07", "metadata": { "hide-output": false }, @@ -1916,7 +1916,7 @@ }, { "cell_type": "markdown", - "id": "f7989a85", + "id": "2e59206d", "metadata": {}, "source": [ "The three panels in the graph above show that\n", @@ -1943,7 +1943,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7aa1c638", + "id": "88344127", "metadata": { "hide-output": false }, @@ -1956,7 +1956,7 @@ }, { "cell_type": "markdown", - "id": "966f7c5b", + "id": "b8d77e21", "metadata": {}, "source": [ "Kalman gains for the two\n", @@ -1966,7 +1966,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b0d32a4e", + "id": "4a7107a5", "metadata": { "hide-output": false }, @@ -1979,7 +1979,7 @@ }, { "cell_type": "markdown", - "id": "723fda3d", + "id": "8fcf04d2", "metadata": {}, "source": [ "Another lesson that comes from the preceding three-panel graph is that the presence of iid noise\n", @@ -1988,7 +1988,7 @@ }, { "cell_type": "markdown", - "id": "7135c1ea", + "id": "c95acc46", "metadata": {}, "source": [ "## Notes on History of the Problem\n", @@ -2012,23 +2012,23 @@ "approximating the intractable model in which the Markov component of the demand shock remains unobserved\n", "for ever.\n", "\n", - "By applying technical machinery of [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id23)], [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] showed that there is a recursive\n", + "By applying technical machinery of [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id24)], [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] showed that there is a recursive\n", "representation of the equilibrium of the perpetually and symmetrically\n", "uninformed model that Townsend wanted to solve\n", - "[[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id25)].\n", + "[[Townsend, 1983](https://python-advanced.quantecon.org/zreferences.html#id26)].\n", "\n", - "A reader of [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] will notice that their representation of the equilibrium of\n", + "A reader of [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] will notice that their representation of the equilibrium of\n", "Townsend’s model exactly matches that of the **pooling equilibrium** presented here.\n", "\n", "We have structured our notation in this lecture to faciliate comparison of the **pooling equilibrium**\n", - "constructed here with the equilibrium of Townsend’s model reported in [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)].\n", + "constructed here with the equilibrium of Townsend’s model reported in [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)].\n", "\n", - "The computational method of [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] is recursive:\n", + "The computational method of [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] is recursive:\n", "it enlists the Kalman filter and invariant subspace methods for\n", "solving systems of Euler\n", "equations [5] .\n", "\n", - "As [[Singleton, 1987](https://python-advanced.quantecon.org/zreferences.html#id27)], [[Kasa, 2000](https://python-advanced.quantecon.org/zreferences.html#id24)], and [[Sargent, 1991](https://python-advanced.quantecon.org/zreferences.html#id26)] also\n", + "As [[Singleton, 1987](https://python-advanced.quantecon.org/zreferences.html#id28)], [[Kasa, 2000](https://python-advanced.quantecon.org/zreferences.html#id25)], and [[Sargent, 1991](https://python-advanced.quantecon.org/zreferences.html#id27)] also\n", "found, the equilibrium is fully revealing: observed prices tell\n", "participants in industry $ i $ all of the information held by\n", "participants in market $ -i $ ($ -i $ means not $ i $).\n", @@ -2048,15 +2048,15 @@ }, { "cell_type": "markdown", - "id": "a0b68ff8", + "id": "bc5a67d8", "metadata": {}, "source": [ "### Further historical remarks\n", "\n", - "Sargent [[Sargent, 1991](https://python-advanced.quantecon.org/zreferences.html#id26)] proposed a way to compute an equilibrium\n", + "Sargent [[Sargent, 1991](https://python-advanced.quantecon.org/zreferences.html#id27)] proposed a way to compute an equilibrium\n", "without making Townsend’s approximation.\n", "\n", - "Extending the reasoning of [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)], Sargent noticed that it is possible to\n", + "Extending the reasoning of [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)], Sargent noticed that it is possible to\n", "summarize the relevant history with a low dimensional object, namely, a\n", "small number of current and lagged forecasting errors.\n", "\n", @@ -2072,16 +2072,16 @@ "the equilibrium representation.\n", "\n", "By working in the frequency\n", - "domain [[Kasa, 2000](https://python-advanced.quantecon.org/zreferences.html#id24)] showed how to discover the appropriate\n", + "domain [[Kasa, 2000](https://python-advanced.quantecon.org/zreferences.html#id25)] showed how to discover the appropriate\n", "orders of the autoregressive and moving average parts, and also how to\n", "compute an equilibrium.\n", "\n", - "The [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] recursive computational method, which stays in the time domain, also\n", + "The [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] recursive computational method, which stays in the time domain, also\n", "discovered appropriate orders of the autoregressive and moving\n", "average pieces.\n", "\n", "In addition, by displaying equilibrium representations\n", - "in the form of [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id23)], [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)]\n", + "in the form of [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id24)], [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)]\n", "showed how the moving average piece is linked to the innovation process\n", "of the hidden persistent component of the demand shock.\n", "\n", @@ -2090,25 +2090,25 @@ "problem of extracting a signal from equilibrium prices that decision\n", "makers face in Townsend’s model.\n", "\n", - "

[1] [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] verified this assertion using a different tactic, namely, by constructing\n", + "

[1] [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] verified this assertion using a different tactic, namely, by constructing\n", "analytic formulas for an equilibrium under the incomplete\n", "information structure and confirming that they match the pooling equilibrium formulas derived here.\n", "\n", - "

[2] See [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], especially\n", + "

[2] See [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], especially\n", "chapters IX and XIV, for principles that guide solving some roots backwards and others forwards.\n", "\n", - "

[3] As noted by [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], this difference equation is the Euler equation for\n", + "

[3] As noted by [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], this difference equation is the Euler equation for\n", "a planning problem that maximizes the discounted sum of consumer plus\n", "producer surplus.\n", "\n", - "

[4] [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id22)] verify the same claim by applying machinery of [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id23)].\n", + "

[4] [[Pearlman and Sargent, 2005](https://python-advanced.quantecon.org/zreferences.html#id23)] verify the same claim by applying machinery of [[Pearlman *et al.*, 1986](https://python-advanced.quantecon.org/zreferences.html#id24)].\n", "\n", - "

[5] See [[Anderson *et al.*, 1996](https://python-advanced.quantecon.org/zreferences.html#id135)] for an account of invariant subspace methods.\n", + "

[5] See [[Anderson *et al.*, 1996](https://python-advanced.quantecon.org/zreferences.html#id136)] for an account of invariant subspace methods.\n", "\n", - "

[6] See [[Allen *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id28)] for a discussion\n", + "

[6] See [[Allen *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id29)] for a discussion\n", "of information assumptions needed to create a situation\n", "in which higher order beliefs appear in equilibrium decision rules. A way\n", - "to read our findings in light of [[Allen *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id28)] is that, relative\n", + "to read our findings in light of [[Allen *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id29)] is that, relative\n", "to the number of signals agents observe, Townsend’s\n", "section 8 model has too few random shocks to get higher order beliefs to\n", "play a role." @@ -2116,7 +2116,7 @@ } ], "metadata": { - "date": 1724218395.1963494, + "date": 1728369869.4583848, "filename": "knowing_forecasts_of_others.md", "kernelspec": { "display_name": "Python", diff --git a/lqramsey.ipynb b/lqramsey.ipynb index 5d218b5..a93463f 100644 --- a/lqramsey.ipynb +++ b/lqramsey.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "746dec95", + "id": "8f878110", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "bf34e048", + "id": "ab49ffb0", "metadata": {}, "source": [ "# Optimal Taxation in an LQ Economy\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41a72203", + "id": "c22e2c8a", "metadata": { "hide-output": false }, @@ -35,14 +35,14 @@ }, { "cell_type": "markdown", - "id": "9caea658", + "id": "2118aa8a", "metadata": {}, "source": [ "## Overview\n", "\n", "In this lecture, we study optimal fiscal policy in a linear quadratic setting.\n", "\n", - "We modify a model of Robert Lucas and Nancy Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)] so that convenient formulas for\n", + "We modify a model of Robert Lucas and Nancy Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)] so that convenient formulas for\n", "solving linear-quadratic models can be applied.\n", "\n", "The economy consists of a representative household and a benevolent government.\n", @@ -55,7 +55,7 @@ "\n", "Maximum attainable utility for the household depends on the government’s tax and borrowing plans.\n", "\n", - "The *Ramsey problem* [[Ramsey, 1927](https://python-advanced.quantecon.org/zreferences.html#id194)] is to choose tax and borrowing plans that maximize the household’s welfare, taking the household’s optimizing behavior as given.\n", + "The *Ramsey problem* [[Ramsey, 1927](https://python-advanced.quantecon.org/zreferences.html#id195)] is to choose tax and borrowing plans that maximize the household’s welfare, taking the household’s optimizing behavior as given.\n", "\n", "There is a large number of competitive equilibria indexed by different government fiscal policies.\n", "\n", @@ -63,7 +63,7 @@ "\n", "We want to study the dynamics of tax rates, tax revenues, government debt under a Ramsey plan.\n", "\n", - "Because the Lucas and Stokey model features state-contingent government debt, the government debt dynamics differ substantially from those in a model of Robert Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)].\n", + "Because the Lucas and Stokey model features state-contingent government debt, the government debt dynamics differ substantially from those in a model of Robert Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)].\n", "\n", "We cover only the key features of the problem in this lecture, leaving you to refer to that source for additional results and intuition.\n", "\n", @@ -73,7 +73,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be205bd5", + "id": "a0d4cc80", "metadata": { "hide-output": false }, @@ -91,7 +91,7 @@ }, { "cell_type": "markdown", - "id": "6d238d1b", + "id": "9e0472d7", "metadata": {}, "source": [ "### Model Features\n", @@ -104,7 +104,7 @@ }, { "cell_type": "markdown", - "id": "3c630c23", + "id": "0d6ef639", "metadata": {}, "source": [ "## The Ramsey Problem\n", @@ -114,7 +114,7 @@ }, { "cell_type": "markdown", - "id": "ca9231b0", + "id": "728ea4c5", "metadata": {}, "source": [ "### Technology\n", @@ -130,7 +130,7 @@ }, { "cell_type": "markdown", - "id": "1e2000ba", + "id": "569b4fe6", "metadata": {}, "source": [ "### Households\n", @@ -186,7 +186,7 @@ }, { "cell_type": "markdown", - "id": "56204c66", + "id": "312c20ca", "metadata": {}, "source": [ "### Government\n", @@ -202,7 +202,7 @@ }, { "cell_type": "markdown", - "id": "82d7322a", + "id": "5f1e6c14", "metadata": {}, "source": [ "### Exogenous Variables\n", @@ -229,7 +229,7 @@ }, { "cell_type": "markdown", - "id": "f6b66a90", + "id": "c382c08f", "metadata": {}, "source": [ "### Feasibility\n", @@ -247,7 +247,7 @@ }, { "cell_type": "markdown", - "id": "8bd0ef8a", + "id": "de4a9428", "metadata": {}, "source": [ "### Government Budget Constraint\n", @@ -264,7 +264,7 @@ }, { "cell_type": "markdown", - "id": "7c381873", + "id": "8631b20f", "metadata": {}, "source": [ "### Equilibrium\n", @@ -298,7 +298,7 @@ }, { "cell_type": "markdown", - "id": "a8dc39ef", + "id": "7916c2de", "metadata": {}, "source": [ "### Solution\n", @@ -419,7 +419,7 @@ }, { "cell_type": "markdown", - "id": "f02cd54e", + "id": "b5492aec", "metadata": {}, "source": [ "### Computing the Quadratic Term\n", @@ -492,7 +492,7 @@ }, { "cell_type": "markdown", - "id": "8ae8a20e", + "id": "f5596a3d", "metadata": {}, "source": [ "### Finite State Markov Case\n", @@ -534,7 +534,7 @@ }, { "cell_type": "markdown", - "id": "9369c1aa", + "id": "029f62d7", "metadata": {}, "source": [ "### Other Variables\n", @@ -608,7 +608,7 @@ }, { "cell_type": "markdown", - "id": "750822a1", + "id": "71b98d7e", "metadata": {}, "source": [ "### A Martingale\n", @@ -665,14 +665,14 @@ "which asserts that $ \\{\\pi_{t+1}\\} $ is a martingale difference sequence under the distorted probability measure, and\n", "that $ \\{\\Pi_t\\} $ is a martingale under the distorted probability measure.\n", "\n", - "In the tax-smoothing model of Robert Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)], government debt is a random walk.\n", + "In the tax-smoothing model of Robert Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)], government debt is a random walk.\n", "\n", "In the current model, government debt $ \\{B_t\\} $ is not a random walk, but the `excess payoff` $ \\{\\Pi_t\\} $ on it is." ] }, { "cell_type": "markdown", - "id": "276ef3a7", + "id": "6a38387f", "metadata": {}, "source": [ "## Implementation\n", @@ -689,7 +689,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6168c525", + "id": "25f6a1a6", "metadata": { "hide-output": false }, @@ -957,7 +957,7 @@ }, { "cell_type": "markdown", - "id": "ad57b02b", + "id": "a9478fba", "metadata": {}, "source": [ "### Comments on the Code\n", @@ -985,7 +985,7 @@ }, { "cell_type": "markdown", - "id": "008e4320", + "id": "3479c3d8", "metadata": {}, "source": [ "## Examples\n", @@ -998,7 +998,7 @@ }, { "cell_type": "markdown", - "id": "98445653", + "id": "15f0208f", "metadata": {}, "source": [ "### The Continuous Case\n", @@ -1025,7 +1025,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41def5e4", + "id": "2a4075f0", "metadata": { "hide-output": false }, @@ -1053,7 +1053,7 @@ }, { "cell_type": "markdown", - "id": "46a7b300", + "id": "81481882", "metadata": {}, "source": [ "The legends on the figures indicate the variables being tracked.\n", @@ -1065,7 +1065,7 @@ { "cell_type": "code", "execution_count": null, - "id": "70fdcc9a", + "id": "cf8573fb", "metadata": { "hide-output": false }, @@ -1076,7 +1076,7 @@ }, { "cell_type": "markdown", - "id": "042b709a", + "id": "45b99bbe", "metadata": {}, "source": [ "### The Discrete Case\n", @@ -1087,7 +1087,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8955644f", + "id": "2557c4b6", "metadata": { "hide-output": false }, @@ -1122,7 +1122,7 @@ }, { "cell_type": "markdown", - "id": "f70707ad", + "id": "4206aec3", "metadata": {}, "source": [ "The call `gen_fig_2(path)` generates" @@ -1131,7 +1131,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a29d0b47", + "id": "8642c25d", "metadata": { "hide-output": false }, @@ -1142,7 +1142,7 @@ }, { "cell_type": "markdown", - "id": "a55c9d0d", + "id": "d92de72a", "metadata": {}, "source": [ "## Exercises\n", @@ -1153,7 +1153,7 @@ }, { "cell_type": "markdown", - "id": "eccef214", + "id": "e9855816", "metadata": {}, "source": [ "## Exercise 12.1\n", @@ -1171,7 +1171,7 @@ }, { "cell_type": "markdown", - "id": "6974fb0b", + "id": "1375a8d6", "metadata": {}, "source": [ "## Solution to[ Exercise 12.1](https://python-advanced.quantecon.org/#lq_ex1)" @@ -1180,7 +1180,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d5a18dfa", + "id": "a234e35f", "metadata": { "hide-output": false }, @@ -1214,7 +1214,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3557173f", + "id": "0a62cab5", "metadata": { "hide-output": false }, @@ -1225,7 +1225,7 @@ } ], "metadata": { - "date": 1724218395.2350297, + "date": 1728369869.497144, "filename": "lqramsey.md", "kernelspec": { "display_name": "Python", diff --git a/lu_tricks.ipynb b/lu_tricks.ipynb index dc517df..a738040 100644 --- a/lu_tricks.ipynb +++ b/lu_tricks.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4b5192db", + "id": "8ba8f4a2", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "04a09051", + "id": "d2df6ecd", "metadata": {}, "source": [ "# Classical Control with Linear Algebra" @@ -19,7 +19,7 @@ }, { "cell_type": "markdown", - "id": "84341bf5", + "id": "a8720f2c", "metadata": {}, "source": [ "## Overview\n", @@ -60,7 +60,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6aee5f46", + "id": "53fbe598", "metadata": { "hide-output": false }, @@ -72,17 +72,17 @@ }, { "cell_type": "markdown", - "id": "20ab1846", + "id": "eef86654", "metadata": {}, "source": [ "### References\n", "\n", - "Useful references include [[Whittle, 1963](https://python-advanced.quantecon.org/zreferences.html#id106)], [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id107)], [[Orfanidis, 1988](https://python-advanced.quantecon.org/zreferences.html#id108)], [[Athanasios and Pillai, 1991](https://python-advanced.quantecon.org/zreferences.html#id109)], and [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)]." + "Useful references include [[Whittle, 1963](https://python-advanced.quantecon.org/zreferences.html#id107)], [[Hansen and Sargent, 1980](https://python-advanced.quantecon.org/zreferences.html#id108)], [[Orfanidis, 1988](https://python-advanced.quantecon.org/zreferences.html#id109)], [[Athanasios and Pillai, 1991](https://python-advanced.quantecon.org/zreferences.html#id110)], and [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)]." ] }, { "cell_type": "markdown", - "id": "f5347dcc", + "id": "24566440", "metadata": {}, "source": [ "## A Control Problem\n", @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "196dddc7", + "id": "6660f699", "metadata": {}, "source": [ "### Example\n", @@ -160,12 +160,12 @@ "- $ d(L) := \\sqrt{2 \\gamma}(I - L) $ \n", "\n", "\n", - "Further examples of this problem for factor demand, economic growth, and government policy problems are given in ch. IX of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)]." + "Further examples of this problem for factor demand, economic growth, and government policy problems are given in ch. IX of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)]." ] }, { "cell_type": "markdown", - "id": "1724c5d8", + "id": "252ff9e8", "metadata": {}, "source": [ "## Finite Horizon Theory\n", @@ -295,7 +295,7 @@ }, { "cell_type": "markdown", - "id": "3db84830", + "id": "76355cc7", "metadata": {}, "source": [ "### Matrix Methods\n", @@ -305,7 +305,7 @@ }, { "cell_type": "markdown", - "id": "41b2d3ad", + "id": "936142ca", "metadata": {}, "source": [ "#### A Single Lag Term\n", @@ -404,7 +404,7 @@ }, { "cell_type": "markdown", - "id": "571d7d03", + "id": "1d9d0c39", "metadata": {}, "source": [ "#### An Alternative Representation\n", @@ -497,7 +497,7 @@ }, { "cell_type": "markdown", - "id": "c694a5cf", + "id": "169ac85e", "metadata": {}, "source": [ "#### Additional Lag Terms\n", @@ -616,7 +616,7 @@ }, { "cell_type": "markdown", - "id": "1c0dc017", + "id": "02fb3170", "metadata": {}, "source": [ "## Infinite Horizon Limit\n", @@ -758,10 +758,10 @@ "$$\n", "\n", "This can be established by using an argument paralleling that in\n", - "chapter IX of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)].\n", + "chapter IX of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)].\n", "\n", "To exhibit the solution in a form\n", - "paralleling that of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)], we use [(31.17)](#equation-oneeleven) to write\n", + "paralleling that of [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)], we use [(31.17)](#equation-oneeleven) to write\n", "[(31.18)](#equation-onethirteen) as\n", "\n", "\n", @@ -803,7 +803,7 @@ "\n", "In effect, condition [(31.12)](#equation-onesix) compels us to\n", "solve the “unstable” roots of $ h+d (\\beta z^{-1})d(z) $ forward\n", - "(see [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id197)]).\n", + "(see [[Sargent, 1987](https://python-advanced.quantecon.org/zreferences.html#id198)]).\n", "\n", "The step of factoring the polynomial $ h+d (\\beta z^{-1})\\, d(z) $ into\n", "$ c\\, (\\beta z^{-1})c\\,(z) $, where the zeros of $ c\\,(z) $ all\n", @@ -846,7 +846,7 @@ }, { "cell_type": "markdown", - "id": "7ef2cff3", + "id": "cdde8ca5", "metadata": {}, "source": [ "## Undiscounted Problems\n", @@ -888,7 +888,7 @@ }, { "cell_type": "markdown", - "id": "7afceed1", + "id": "5d4013bc", "metadata": {}, "source": [ "### Transforming Discounted to Undiscounted Problem\n", @@ -973,7 +973,7 @@ }, { "cell_type": "markdown", - "id": "20008893", + "id": "4bfb1036", "metadata": {}, "source": [ "## Implementation\n", @@ -985,7 +985,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6420140d", + "id": "26325602", "metadata": { "hide-output": false }, @@ -1301,7 +1301,7 @@ }, { "cell_type": "markdown", - "id": "43a94364", + "id": "1cdcf93f", "metadata": {}, "source": [ "### Example\n", @@ -1334,7 +1334,7 @@ { "cell_type": "code", "execution_count": null, - "id": "98c805aa", + "id": "83bd77b9", "metadata": { "hide-output": false }, @@ -1374,7 +1374,7 @@ }, { "cell_type": "markdown", - "id": "3a4b17b8", + "id": "f9a32c77", "metadata": {}, "source": [ "Here’s what happens when we change $ \\gamma $ to 5.0" @@ -1383,7 +1383,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eebdb538", + "id": "13fd725f", "metadata": { "hide-output": false }, @@ -1394,7 +1394,7 @@ }, { "cell_type": "markdown", - "id": "742b4ad5", + "id": "81f727b8", "metadata": {}, "source": [ "And here’s $ \\gamma = 10 $" @@ -1403,7 +1403,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ece382ea", + "id": "b6c99ebf", "metadata": { "hide-output": false }, @@ -1414,7 +1414,7 @@ }, { "cell_type": "markdown", - "id": "1bcf3f01", + "id": "ca760db6", "metadata": {}, "source": [ "## Exercises" @@ -1422,7 +1422,7 @@ }, { "cell_type": "markdown", - "id": "a87f3bb8", + "id": "d8cab1dc", "metadata": {}, "source": [ "## Exercise 31.1\n", @@ -1468,7 +1468,7 @@ }, { "cell_type": "markdown", - "id": "6ec62e87", + "id": "faea9f78", "metadata": {}, "source": [ "## Exercise 31.2\n", @@ -1492,7 +1492,7 @@ }, { "cell_type": "markdown", - "id": "9eb4bfc3", + "id": "78d8644f", "metadata": {}, "source": [ "## Exercise 31.3\n", @@ -1513,7 +1513,7 @@ }, { "cell_type": "markdown", - "id": "8f8fe5ac", + "id": "33af8f5d", "metadata": {}, "source": [ "## Exercise 31.4\n", @@ -1533,7 +1533,7 @@ } ], "metadata": { - "date": 1724218395.281455, + "date": 1728369869.5451348, "filename": "lu_tricks.md", "kernelspec": { "display_name": "Python", diff --git a/lucas_asset_pricing_dles.ipynb b/lucas_asset_pricing_dles.ipynb index 8a01eb3..74a208b 100644 --- a/lucas_asset_pricing_dles.ipynb +++ b/lucas_asset_pricing_dles.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e0c8d530", + "id": "bfd6be1d", "metadata": {}, "source": [ "\n", @@ -13,13 +13,13 @@ }, { "cell_type": "markdown", - "id": "bebfdede", + "id": "86b73aa0", "metadata": {}, "source": [ "# Lucas Asset Pricing Using DLE\n", "\n", "This is one of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s in Anaconda, this lecture uses the quantecon library" ] @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "815b33cf", + "id": "335bd895", "metadata": { "hide-output": false }, @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "0c0aa578", + "id": "78d7f035", "metadata": {}, "source": [ "This lecture uses the DLE class to price payout\n", @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "af6d0aa2", + "id": "1cbd0e50", "metadata": { "hide-output": false }, @@ -71,10 +71,10 @@ }, { "cell_type": "markdown", - "id": "6f49bc78", + "id": "d5eac14c", "metadata": {}, "source": [ - "We use a linear-quadratic version of an economy that Lucas (1978) [[Lucas, 1978](https://python-advanced.quantecon.org/zreferences.html#id174)] used\n", + "We use a linear-quadratic version of an economy that Lucas (1978) [[Lucas, 1978](https://python-advanced.quantecon.org/zreferences.html#id175)] used\n", "to develop an equilibrium theory of asset prices:\n", "\n", "**Preferences**\n", @@ -155,12 +155,12 @@ }, { "cell_type": "markdown", - "id": "6b754b77", + "id": "2919115b", "metadata": {}, "source": [ "## Asset Pricing Equations\n", "\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] show that the time t value of a permanent claim to a stream\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] show that the time t value of a permanent claim to a stream\n", "$ y_s = U_ax_s \\, , s \\geq t $ is:\n", "\n", "$$\n", @@ -189,7 +189,7 @@ }, { "cell_type": "markdown", - "id": "86187b55", + "id": "a50304fe", "metadata": {}, "source": [ "## Asset Pricing Simulations" @@ -198,7 +198,7 @@ { "cell_type": "code", "execution_count": null, - "id": "07fd4fb3", + "id": "a7857603", "metadata": { "hide-output": false }, @@ -235,7 +235,7 @@ { "cell_type": "code", "execution_count": null, - "id": "10f6af8b", + "id": "305371d8", "metadata": { "hide-output": false }, @@ -246,7 +246,7 @@ }, { "cell_type": "markdown", - "id": "0c2947c6", + "id": "48e7706c", "metadata": {}, "source": [ "After specifying a “Pay” matrix, we simulate the economy.\n", @@ -258,7 +258,7 @@ { "cell_type": "code", "execution_count": null, - "id": "feda23a8", + "id": "d962d6c4", "metadata": { "hide-output": false }, @@ -269,7 +269,7 @@ }, { "cell_type": "markdown", - "id": "caab020e", + "id": "45d2cfd9", "metadata": {}, "source": [ "The graph below plots the price of this claim over time:" @@ -278,7 +278,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ba5f5b56", + "id": "e3957775", "metadata": { "hide-output": false }, @@ -292,7 +292,7 @@ }, { "cell_type": "markdown", - "id": "4a558c45", + "id": "ac4223b4", "metadata": {}, "source": [ "The next plot displays the realized gross rate of return on this “Lucas\n", @@ -302,7 +302,7 @@ { "cell_type": "code", "execution_count": null, - "id": "704dd8ae", + "id": "372f7f34", "metadata": { "hide-output": false }, @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff6ddeeb", + "id": "e6a5217e", "metadata": { "hide-output": false }, @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "91763cbd", + "id": "e8d21714", "metadata": {}, "source": [ "Above we have also calculated the correlation coefficient between these\n", @@ -343,7 +343,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f3ef62cd", + "id": "fcd6404b", "metadata": { "hide-output": false }, @@ -358,7 +358,7 @@ }, { "cell_type": "markdown", - "id": "3939411e", + "id": "755ebf38", "metadata": {}, "source": [ "From the above plot, we can see the tendency of the term structure to\n", @@ -376,7 +376,7 @@ { "cell_type": "code", "execution_count": null, - "id": "087cf7ab", + "id": "d54166e9", "metadata": { "hide-output": false }, @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9d66c97b", + "id": "d6237fb7", "metadata": { "hide-output": false }, @@ -410,7 +410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4571801e", + "id": "e3516dac", "metadata": { "hide-output": false }, @@ -421,7 +421,7 @@ }, { "cell_type": "markdown", - "id": "46893f36", + "id": "f06df92e", "metadata": {}, "source": [ "The correlation between these two gross rates is now more negative.\n", @@ -433,7 +433,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b784dbab", + "id": "0d3da0df", "metadata": { "hide-output": false }, @@ -448,7 +448,7 @@ }, { "cell_type": "markdown", - "id": "e1390c7d", + "id": "8ad2148d", "metadata": {}, "source": [ "We can see the tendency of the term structure to slope up when rates are\n", @@ -458,7 +458,7 @@ } ], "metadata": { - "date": 1724218395.4802005, + "date": 1728369869.5602775, "filename": "lucas_asset_pricing_dles.md", "kernelspec": { "display_name": "Python", diff --git a/lucas_model.ipynb b/lucas_model.ipynb index a04956d..7d0c4db 100644 --- a/lucas_model.ipynb +++ b/lucas_model.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "49928d77", + "id": "e92a28e5", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "6bd950f6", + "id": "34bb2bf2", "metadata": {}, "source": [ "# Asset Pricing II: The Lucas Asset Pricing Model\n", @@ -22,7 +22,7 @@ }, { "cell_type": "markdown", - "id": "4cd39417", + "id": "bbdc3ba2", "metadata": {}, "source": [ "## Overview\n", @@ -31,7 +31,7 @@ "\n", "What is the correct price to pay for such a claim?\n", "\n", - "The elegant asset pricing model of Lucas [[Lucas, 1978](https://python-advanced.quantecon.org/zreferences.html#id174)] attempts to answer this question in an equilibrium setting with risk-averse agents.\n", + "The elegant asset pricing model of Lucas [[Lucas, 1978](https://python-advanced.quantecon.org/zreferences.html#id175)] attempts to answer this question in an equilibrium setting with risk-averse agents.\n", "\n", "While we mentioned some consequences of Lucas’ model [earlier](https://python.quantecon.org/markov_asset.html#risk-neutral-pricing), it is now time to work through the model more carefully and try to understand where the fundamental asset pricing equation comes from.\n", "\n", @@ -45,7 +45,7 @@ { "cell_type": "code", "execution_count": null, - "id": "044d62da", + "id": "d74d2672", "metadata": { "hide-output": false }, @@ -59,7 +59,7 @@ }, { "cell_type": "markdown", - "id": "5af2549b", + "id": "b93cd124", "metadata": {}, "source": [ "## The Lucas Model\n", @@ -81,7 +81,7 @@ }, { "cell_type": "markdown", - "id": "58776af0", + "id": "52069f6a", "metadata": {}, "source": [ "### Basic Setup\n", @@ -91,7 +91,7 @@ }, { "cell_type": "markdown", - "id": "c3fe5344", + "id": "c70fd539", "metadata": {}, "source": [ "#### Assets\n", @@ -121,7 +121,7 @@ }, { "cell_type": "markdown", - "id": "a67af61f", + "id": "b0880098", "metadata": {}, "source": [ "#### Consumers\n", @@ -145,7 +145,7 @@ }, { "cell_type": "markdown", - "id": "4933e8e8", + "id": "fb9b6eb0", "metadata": {}, "source": [ "### Pricing a Lucas Tree\n", @@ -184,7 +184,7 @@ }, { "cell_type": "markdown", - "id": "c5ba4a6a", + "id": "1cfb6145", "metadata": {}, "source": [ "#### The Dynamic Program\n", @@ -242,7 +242,7 @@ }, { "cell_type": "markdown", - "id": "02d98c71", + "id": "61a4e9de", "metadata": {}, "source": [ "#### Next Steps\n", @@ -261,7 +261,7 @@ }, { "cell_type": "markdown", - "id": "7c6c1379", + "id": "72200c3c", "metadata": {}, "source": [ "#### Equilibrium Constraints\n", @@ -280,7 +280,7 @@ }, { "cell_type": "markdown", - "id": "f482fffa", + "id": "2b4a6453", "metadata": {}, "source": [ "#### The Equilibrium Price Function\n", @@ -326,7 +326,7 @@ }, { "cell_type": "markdown", - "id": "497f0a06", + "id": "102e2924", "metadata": {}, "source": [ "### Solving the Model\n", @@ -342,7 +342,7 @@ }, { "cell_type": "markdown", - "id": "8af82155", + "id": "d37f77b5", "metadata": {}, "source": [ "#### Setting up the Problem\n", @@ -392,7 +392,7 @@ }, { "cell_type": "markdown", - "id": "a2dab988", + "id": "913eb11f", "metadata": {}, "source": [ "#### A Little Fixed Point Theory\n", @@ -454,7 +454,7 @@ }, { "cell_type": "markdown", - "id": "ee09ac33", + "id": "8833dc92", "metadata": {}, "source": [ "### Computation – An Example\n", @@ -475,7 +475,7 @@ { "cell_type": "code", "execution_count": null, - "id": "85396951", + "id": "a1bc61fe", "metadata": { "hide-output": false }, @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "29d52061", + "id": "6072a391", "metadata": {}, "source": [ "The following function takes an instance of the `LucasTree` and generates a\n", @@ -524,7 +524,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6240dad0", + "id": "102252b1", "metadata": { "hide-output": false }, @@ -566,7 +566,7 @@ }, { "cell_type": "markdown", - "id": "93c48933", + "id": "c5f3774b", "metadata": {}, "source": [ "To solve the model, we write a function that iterates using the Lucas operator\n", @@ -576,7 +576,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1806902a", + "id": "fb5fc7d8", "metadata": { "hide-output": false }, @@ -612,7 +612,7 @@ }, { "cell_type": "markdown", - "id": "566e7d6a", + "id": "c2a61411", "metadata": {}, "source": [ "Solving the model and plotting the resulting price function" @@ -621,7 +621,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ef22391", + "id": "6b3708c4", "metadata": { "hide-output": false }, @@ -640,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "b04cb05b", + "id": "517c3523", "metadata": {}, "source": [ "We see that the price is increasing, even if we remove all serial correlation from the endowment process.\n", @@ -666,7 +666,7 @@ }, { "cell_type": "markdown", - "id": "775daaf5", + "id": "ffd8c268", "metadata": {}, "source": [ "## Exercises\n", @@ -677,7 +677,7 @@ }, { "cell_type": "markdown", - "id": "420659d3", + "id": "0cb44979", "metadata": {}, "source": [ "## Exercise 34.1\n", @@ -687,7 +687,7 @@ }, { "cell_type": "markdown", - "id": "efafc750", + "id": "89493c20", "metadata": {}, "source": [ "## Solution to[ Exercise 34.1](https://python-advanced.quantecon.org/#lucas_ex1)" @@ -696,7 +696,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b8b00eb", + "id": "68a24dc3", "metadata": { "hide-output": false }, @@ -718,7 +718,7 @@ } ], "metadata": { - "date": 1724218395.5039375, + "date": 1728369869.5832202, "filename": "lucas_model.md", "kernelspec": { "display_name": "Python", diff --git a/markov_jump_lq.ipynb b/markov_jump_lq.ipynb index 1c2f394..c2c0820 100644 --- a/markov_jump_lq.ipynb +++ b/markov_jump_lq.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "09637b58", + "id": "d05dcf36", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "e8719f06", + "id": "558ad1ab", "metadata": {}, "source": [ "# Markov Jump Linear Quadratic Dynamic Programming\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c0f86f43", + "id": "cefb9ac8", "metadata": { "hide-output": false }, @@ -35,18 +35,18 @@ }, { "cell_type": "markdown", - "id": "3774ec76", + "id": "35f56a33", "metadata": {}, "source": [ "## Overview\n", "\n", "This lecture describes **Markov jump linear quadratic dynamic programming**, an extension of the method described in the [first LQ control lecture](https://python-intro.quantecon.org/lqcontrol.html).\n", "\n", - "Markov jump linear quadratic dynamic programming is described and analyzed in [[Do Val *et al.*, 1999](https://python-advanced.quantecon.org/zreferences.html#id233)] and the references cited there.\n", + "Markov jump linear quadratic dynamic programming is described and analyzed in [[Do Val *et al.*, 1999](https://python-advanced.quantecon.org/zreferences.html#id234)] and the references cited there.\n", "\n", - "The method has been applied to problems in macroeconomics and monetary economics by [[Svensson *et al.*, 2008](https://python-advanced.quantecon.org/zreferences.html#id234)] and [[Svensson and Williams, 2009](https://python-advanced.quantecon.org/zreferences.html#id235)].\n", + "The method has been applied to problems in macroeconomics and monetary economics by [[Svensson *et al.*, 2008](https://python-advanced.quantecon.org/zreferences.html#id235)] and [[Svensson and Williams, 2009](https://python-advanced.quantecon.org/zreferences.html#id236)].\n", "\n", - "The periodic models of seasonality described in chapter 14 of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] are a special case of Markov jump linear quadratic problems.\n", + "The periodic models of seasonality described in chapter 14 of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] are a special case of Markov jump linear quadratic problems.\n", "\n", "**Markov jump linear quadratic dynamic programming** combines advantages\n", "of\n", @@ -75,7 +75,7 @@ }, { "cell_type": "markdown", - "id": "6a1ab1e4", + "id": "fbb984f0", "metadata": {}, "source": [ "## Review of useful LQ dynamic programming formulas\n", @@ -149,7 +149,7 @@ }, { "cell_type": "markdown", - "id": "7243c3d4", + "id": "4c34fc9b", "metadata": {}, "source": [ "## Linked Riccati equations for Markov LQ dynamic programming\n", @@ -262,7 +262,7 @@ }, { "cell_type": "markdown", - "id": "77018d45", + "id": "0f107eed", "metadata": {}, "source": [ "## Applications\n", @@ -275,7 +275,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1e8ed965", + "id": "6dddcd61", "metadata": { "hide-output": false }, @@ -290,7 +290,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7ba0541", + "id": "6de9baac", "metadata": { "hide-output": false }, @@ -302,7 +302,7 @@ }, { "cell_type": "markdown", - "id": "c388008a", + "id": "cd898728", "metadata": {}, "source": [ "## Example 1\n", @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6af584c9", + "id": "bc2ee3c8", "metadata": { "hide-output": false }, @@ -417,7 +417,7 @@ }, { "cell_type": "markdown", - "id": "66acf69b", + "id": "db26c87f", "metadata": {}, "source": [ "The continuous part of the state $ x_t $ consists of two variables,\n", @@ -427,7 +427,7 @@ { "cell_type": "code", "execution_count": null, - "id": "58234e08", + "id": "3bf4d511", "metadata": { "hide-output": false }, @@ -438,7 +438,7 @@ }, { "cell_type": "markdown", - "id": "1a4aac2b", + "id": "5e026afc", "metadata": {}, "source": [ "We start with a Markov transition matrix that makes the Markov state be\n", @@ -478,7 +478,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd3d6e23", + "id": "083d240b", "metadata": { "hide-output": false }, @@ -492,7 +492,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dcc32848", + "id": "48afe0e5", "metadata": { "hide-output": false }, @@ -505,7 +505,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ac7cf7c2", + "id": "81c0acba", "metadata": { "hide-output": false }, @@ -519,7 +519,7 @@ }, { "cell_type": "markdown", - "id": "08d75a69", + "id": "a379d880", "metadata": {}, "source": [ "Let’s look at the value function matrices and the decision rules for\n", @@ -529,7 +529,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1faa8882", + "id": "44017413", "metadata": { "hide-output": false }, @@ -542,7 +542,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3186091", + "id": "0fb9293b", "metadata": { "hide-output": false }, @@ -555,7 +555,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7af9c077", + "id": "69826adb", "metadata": { "hide-output": false }, @@ -567,7 +567,7 @@ }, { "cell_type": "markdown", - "id": "1e678109", + "id": "788d7c5b", "metadata": {}, "source": [ "Now we’ll plot the decision rules and see if they make sense" @@ -576,7 +576,7 @@ { "cell_type": "code", "execution_count": null, - "id": "74573a7e", + "id": "374f8629", "metadata": { "hide-output": false }, @@ -608,7 +608,7 @@ }, { "cell_type": "markdown", - "id": "04e4602c", + "id": "dabd57bc", "metadata": {}, "source": [ "The above graph plots $ k_{t+1}= k_t + u_t = k_t - F x_t $ as an affine\n", @@ -634,7 +634,7 @@ { "cell_type": "code", "execution_count": null, - "id": "313b8e4b", + "id": "ce60a354", "metadata": { "hide-output": false }, @@ -655,7 +655,7 @@ }, { "cell_type": "markdown", - "id": "5c3675eb", + "id": "4cb9431f", "metadata": {}, "source": [ "Now we’ll depart from the preceding transition matrix that made the\n", @@ -674,7 +674,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41b7b5ed", + "id": "ae62f8a2", "metadata": { "hide-output": false }, @@ -692,7 +692,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a93ba2df", + "id": "9b5c1dce", "metadata": { "hide-output": false }, @@ -709,7 +709,7 @@ }, { "cell_type": "markdown", - "id": "d2a3940c", + "id": "35d7879b", "metadata": {}, "source": [ "We can plot optimal decision rules associated with different\n", @@ -719,7 +719,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e92e414", + "id": "3a75a303", "metadata": { "hide-output": false }, @@ -742,7 +742,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9576a9f8", + "id": "9af24127", "metadata": { "hide-output": false }, @@ -762,7 +762,7 @@ }, { "cell_type": "markdown", - "id": "b29a3684", + "id": "8ed8f09a", "metadata": {}, "source": [ "Notice how the decision rules’ constants and slopes behave as functions\n", @@ -787,7 +787,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71ca4ac0", + "id": "ca2d0d8b", "metadata": { "hide-output": false }, @@ -804,7 +804,7 @@ }, { "cell_type": "markdown", - "id": "e748248f", + "id": "fa6c75eb", "metadata": {}, "source": [ "We can plot optimal decision rules for different $ \\lambda $ and\n", @@ -814,7 +814,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c1d041d5", + "id": "9b1e63db", "metadata": { "hide-output": false }, @@ -844,7 +844,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e07e73e2", + "id": "b9c7494f", "metadata": { "hide-output": false }, @@ -866,7 +866,7 @@ }, { "cell_type": "markdown", - "id": "03741231", + "id": "1b7c64a4", "metadata": {}, "source": [ "The following code defines a wrapper function that computes optimal\n", @@ -876,7 +876,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec2514e5", + "id": "ad786a84", "metadata": { "hide-output": false }, @@ -977,7 +977,7 @@ }, { "cell_type": "markdown", - "id": "3e00e4ed", + "id": "4d8953ca", "metadata": {}, "source": [ "To illustrate the code with another example, we shall set\n", @@ -1029,7 +1029,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97067050", + "id": "043a580a", "metadata": { "hide-output": false }, @@ -1040,7 +1040,7 @@ }, { "cell_type": "markdown", - "id": "efe625dc", + "id": "cfc7cb61", "metadata": {}, "source": [ "Set $ f_{1,{s_t}} $ and $ d_{s_t} $ as constant functions and\n", @@ -1053,7 +1053,7 @@ { "cell_type": "code", "execution_count": null, - "id": "098f3aa9", + "id": "892e075f", "metadata": { "hide-output": false }, @@ -1064,7 +1064,7 @@ }, { "cell_type": "markdown", - "id": "11d25ff1", + "id": "97736906", "metadata": {}, "source": [ "## Example 2\n", @@ -1134,7 +1134,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbc03ca9", + "id": "457e6920", "metadata": { "hide-output": false }, @@ -1187,7 +1187,7 @@ { "cell_type": "code", "execution_count": null, - "id": "27dae892", + "id": "32aaee60", "metadata": { "hide-output": false }, @@ -1198,7 +1198,7 @@ }, { "cell_type": "markdown", - "id": "a93ff1c8", + "id": "9ab1e2f7", "metadata": {}, "source": [ "Only $ d_{s_t} $ depends on $ s_t $." @@ -1207,7 +1207,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3e27284b", + "id": "5a1d8740", "metadata": { "hide-output": false }, @@ -1218,7 +1218,7 @@ }, { "cell_type": "markdown", - "id": "face19aa", + "id": "aa9bb710", "metadata": {}, "source": [ "Only $ f_{1,{s_t}} $ depends on $ s_t $." @@ -1227,7 +1227,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da139f00", + "id": "bee34c4a", "metadata": { "hide-output": false }, @@ -1238,7 +1238,7 @@ }, { "cell_type": "markdown", - "id": "6e794e2d", + "id": "d096ada2", "metadata": {}, "source": [ "Only $ f_{2,{s_t}} $ depends on $ s_t $." @@ -1247,7 +1247,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c72541af", + "id": "2fdebc6e", "metadata": { "hide-output": false }, @@ -1258,7 +1258,7 @@ }, { "cell_type": "markdown", - "id": "961ce001", + "id": "b354ab41", "metadata": {}, "source": [ "Only $ \\alpha_0(s_t) $ depends on $ s_t $." @@ -1267,7 +1267,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d16a558", + "id": "7541da1c", "metadata": { "hide-output": false }, @@ -1278,7 +1278,7 @@ }, { "cell_type": "markdown", - "id": "13525403", + "id": "fad5db0c", "metadata": {}, "source": [ "Only $ \\rho_{s_t} $ depends on $ s_t $." @@ -1287,7 +1287,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bdc83f65", + "id": "05969a78", "metadata": { "hide-output": false }, @@ -1298,7 +1298,7 @@ }, { "cell_type": "markdown", - "id": "572c4729", + "id": "731df248", "metadata": {}, "source": [ "Only $ \\sigma_{s_t} $ depends on $ s_t $." @@ -1307,7 +1307,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8419eb0", + "id": "14c6ad72", "metadata": { "hide-output": false }, @@ -1318,12 +1318,12 @@ }, { "cell_type": "markdown", - "id": "c82ff5a4", + "id": "110025ca", "metadata": {}, "source": [ "## More examples\n", "\n", - "The following lectures describe how Markov jump linear quadratic dynamic programming can be used to extend the [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model\n", + "The following lectures describe how Markov jump linear quadratic dynamic programming can be used to extend the [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model\n", "of optimal tax-smoothing and government debt in several interesting directions\n", "\n", "1. [How to Pay for a War: Part 1](https://python-advanced.quantecon.org/tax_smoothing_1.html) \n", @@ -1333,7 +1333,7 @@ } ], "metadata": { - "date": 1724218395.5449488, + "date": 1728369869.6216416, "filename": "markov_jump_lq.md", "kernelspec": { "display_name": "Python", diff --git a/matsuyama.ipynb b/matsuyama.ipynb index 71afda8..3787be3 100644 --- a/matsuyama.ipynb +++ b/matsuyama.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e52e22fc", + "id": "7a02a5f5", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "8e2f3fa7", + "id": "25455ad1", "metadata": {}, "source": [ "# Globalization and Cycles" @@ -19,7 +19,7 @@ }, { "cell_type": "markdown", - "id": "1416129a", + "id": "4d1e7ab0", "metadata": {}, "source": [ "## Overview\n", @@ -44,7 +44,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72821d2e", + "id": "b1216743", "metadata": { "hide-output": false }, @@ -58,12 +58,12 @@ }, { "cell_type": "markdown", - "id": "74f06075", + "id": "ffc6eeb7", "metadata": {}, "source": [ "### Background\n", "\n", - "The model builds on work by Judd [[Judd, 1985](https://python-advanced.quantecon.org/zreferences.html#id89)], Deneckner and Judd [[Deneckere and Judd, 1992](https://python-advanced.quantecon.org/zreferences.html#id88)] and Helpman and Krugman [[Helpman and Krugman, 1985](https://python-advanced.quantecon.org/zreferences.html#id90)] by developing a two-country model with trade and innovation.\n", + "The model builds on work by Judd [[Judd, 1985](https://python-advanced.quantecon.org/zreferences.html#id90)], Deneckner and Judd [[Deneckere and Judd, 1992](https://python-advanced.quantecon.org/zreferences.html#id89)] and Helpman and Krugman [[Helpman and Krugman, 1985](https://python-advanced.quantecon.org/zreferences.html#id91)] by developing a two-country model with trade and innovation.\n", "\n", "On the technical side, the paper introduces the concept of [coupled oscillators](https://en.wikipedia.org/wiki/Oscillation#Coupled_oscillations) to economic modeling.\n", "\n", @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "b9e358ca", + "id": "29effef2", "metadata": {}, "source": [ "## Key Ideas\n", @@ -84,7 +84,7 @@ }, { "cell_type": "markdown", - "id": "9f0464da", + "id": "1abae40f", "metadata": {}, "source": [ "### Innovation Cycles\n", @@ -112,7 +112,7 @@ }, { "cell_type": "markdown", - "id": "59b29a0a", + "id": "eca4de6e", "metadata": {}, "source": [ "### Synchronization\n", @@ -128,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "db746fcd", + "id": "dd51567a", "metadata": {}, "source": [ "## Model\n", @@ -176,7 +176,7 @@ }, { "cell_type": "markdown", - "id": "7630a773", + "id": "f5cc5b33", "metadata": {}, "source": [ "### Prices\n", @@ -266,7 +266,7 @@ }, { "cell_type": "markdown", - "id": "3acbb6fd", + "id": "3b162dd9", "metadata": {}, "source": [ "### New Varieties\n", @@ -298,7 +298,7 @@ }, { "cell_type": "markdown", - "id": "a0a88651", + "id": "2e5ea932", "metadata": {}, "source": [ "### Law of Motion\n", @@ -377,7 +377,7 @@ }, { "cell_type": "markdown", - "id": "e791507c", + "id": "d09b688c", "metadata": {}, "source": [ "## Simulation\n", @@ -404,7 +404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0debe638", + "id": "a418546d", "metadata": { "hide-output": false }, @@ -717,7 +717,7 @@ }, { "cell_type": "markdown", - "id": "54ae86fc", + "id": "565f2f00", "metadata": {}, "source": [ "### Time Series of Firm Measures\n", @@ -734,7 +734,7 @@ { "cell_type": "code", "execution_count": null, - "id": "902c5b14", + "id": "c8470055", "metadata": { "hide-output": false }, @@ -774,7 +774,7 @@ }, { "cell_type": "markdown", - "id": "49247f8e", + "id": "6947f4e3", "metadata": {}, "source": [ "In the first case, innovation in the two countries does not synchronize.\n", @@ -785,7 +785,7 @@ }, { "cell_type": "markdown", - "id": "872d8633", + "id": "7738705a", "metadata": {}, "source": [ "### Basin of Attraction\n", @@ -820,7 +820,7 @@ }, { "cell_type": "markdown", - "id": "1aae4923", + "id": "d8c14ba2", "metadata": {}, "source": [ "## Exercises" @@ -828,7 +828,7 @@ }, { "cell_type": "markdown", - "id": "a74a69b8", + "id": "9bc391c0", "metadata": {}, "source": [ "## Exercise 14.1\n", @@ -838,7 +838,7 @@ }, { "cell_type": "markdown", - "id": "5c3f802f", + "id": "49706bc8", "metadata": {}, "source": [ "## Solution to[ Exercise 14.1](https://python-advanced.quantecon.org/#matsuyama_ex1)" @@ -847,7 +847,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4fc883b9", + "id": "5bc1af8e", "metadata": { "hide-output": false }, @@ -903,7 +903,7 @@ }, { "cell_type": "markdown", - "id": "f4d8d129", + "id": "7a37f00e", "metadata": {}, "source": [ "Additionally, instead of just seeing 4 plots at once, we might want to\n", @@ -916,7 +916,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8ab9d448", + "id": "9471c832", "metadata": { "hide-output": false }, @@ -943,7 +943,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c812ac94", + "id": "c19be76d", "metadata": { "hide-output": false }, @@ -957,7 +957,7 @@ } ], "metadata": { - "date": 1724218395.5671296, + "date": 1728369869.6427402, "filename": "matsuyama.md", "kernelspec": { "display_name": "Python", diff --git a/muth_kalman.ipynb b/muth_kalman.ipynb index f87028f..df612fc 100644 --- a/muth_kalman.ipynb +++ b/muth_kalman.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5234a8bb", + "id": "e5aa2079", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "c9386347", + "id": "4972af80", "metadata": {}, "source": [ "# Reverse Engineering a la Muth\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "977a3c2b", + "id": "eb0cfafc", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "49077193", + "id": "18cec8b8", "metadata": {}, "source": [ "We’ll also need the following imports:" @@ -44,7 +44,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8d4c219d", + "id": "1f1512d2", "metadata": { "hide-output": false }, @@ -60,25 +60,25 @@ }, { "cell_type": "markdown", - "id": "3f8088d2", + "id": "183adf6f", "metadata": {}, "source": [ "This lecture uses the Kalman filter to reformulate John F. Muth’s first\n", - "paper [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)] about rational expectations.\n", + "paper [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)] about rational expectations.\n", "\n", "Muth used *classical* prediction methods to reverse engineer a\n", - "stochastic process that renders optimal Milton Friedman’s [[Friedman, 1956](https://python-advanced.quantecon.org/zreferences.html#id151)] “adaptive\n", + "stochastic process that renders optimal Milton Friedman’s [[Friedman, 1956](https://python-advanced.quantecon.org/zreferences.html#id152)] “adaptive\n", "expectations” scheme." ] }, { "cell_type": "markdown", - "id": "997594c4", + "id": "8b3d060b", "metadata": {}, "source": [ "## Friedman (1956) and Muth (1960)\n", "\n", - "Milton Friedman [[Friedman, 1956](https://python-advanced.quantecon.org/zreferences.html#id151)] (1956) posited that\n", + "Milton Friedman [[Friedman, 1956](https://python-advanced.quantecon.org/zreferences.html#id152)] (1956) posited that\n", "consumer’s forecast their future disposable income with the adaptive\n", "expectations scheme\n", "\n", @@ -95,7 +95,7 @@ "scheme [(3.1)](#equation-expectations) informally, noting that it seemed a plausible way to use\n", "past income to forecast future income.\n", "\n", - "In his first paper about rational expectations, John F. Muth [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id110)]\n", + "In his first paper about rational expectations, John F. Muth [[Muth, 1960](https://python-advanced.quantecon.org/zreferences.html#id111)]\n", "reverse-engineered a univariate stochastic process\n", "$ \\{y_t\\}_{t=- \\infty}^\\infty $ for which Milton Friedman’s adaptive\n", "expectations scheme gives linear least forecasts of $ y_{t+j} $ for\n", @@ -124,7 +124,7 @@ }, { "cell_type": "markdown", - "id": "24050239", + "id": "3ffc098d", "metadata": {}, "source": [ "## A Process for Which Adaptive Expectations are Optimal\n", @@ -192,7 +192,7 @@ { "cell_type": "code", "execution_count": null, - "id": "18cfb248", + "id": "c1f92a2e", "metadata": { "hide-output": false }, @@ -225,7 +225,7 @@ }, { "cell_type": "markdown", - "id": "b647dd85", + "id": "94731216", "metadata": {}, "source": [ "## Some Useful State-Space Math\n", @@ -282,7 +282,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64e97496", + "id": "10599bd5", "metadata": { "hide-output": false }, @@ -315,7 +315,7 @@ }, { "cell_type": "markdown", - "id": "25f9f430", + "id": "1080541b", "metadata": {}, "source": [ "Now that we have simulated our joint system, we have $ x_t $,\n", @@ -327,7 +327,7 @@ }, { "cell_type": "markdown", - "id": "f8e628f5", + "id": "9a5bddd9", "metadata": {}, "source": [ "## Estimates of Unobservables\n", @@ -340,7 +340,7 @@ { "cell_type": "code", "execution_count": null, - "id": "22468e32", + "id": "56c2c2b7", "metadata": { "hide-output": false }, @@ -357,7 +357,7 @@ }, { "cell_type": "markdown", - "id": "4c4c90ac", + "id": "e9b9829b", "metadata": {}, "source": [ "Note how $ x_t $ and $ \\hat{x_t} $ differ.\n", @@ -368,7 +368,7 @@ }, { "cell_type": "markdown", - "id": "f9b52909", + "id": "8ebbb411", "metadata": {}, "source": [ "## Relationship of Unobservables to Observables\n", @@ -381,7 +381,7 @@ { "cell_type": "code", "execution_count": null, - "id": "163e19af", + "id": "bb15cab7", "metadata": { "hide-output": false }, @@ -398,7 +398,7 @@ }, { "cell_type": "markdown", - "id": "18f1f65b", + "id": "a62791a3", "metadata": {}, "source": [ "We see above that $ y $ seems to look like white noise around the\n", @@ -407,7 +407,7 @@ }, { "cell_type": "markdown", - "id": "f666964f", + "id": "aee19937", "metadata": {}, "source": [ "### Innovations\n", @@ -419,7 +419,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a33c2866", + "id": "9a6d2b19", "metadata": { "hide-output": false }, @@ -435,7 +435,7 @@ }, { "cell_type": "markdown", - "id": "abb8bfd7", + "id": "c31ec438", "metadata": {}, "source": [ "## MA and AR Representations\n", @@ -456,7 +456,7 @@ { "cell_type": "code", "execution_count": null, - "id": "382e2cbf", + "id": "40451e3c", "metadata": { "hide-output": false }, @@ -482,7 +482,7 @@ }, { "cell_type": "markdown", - "id": "4adf2bcd", + "id": "962681f8", "metadata": {}, "source": [ "The **moving average** coefficients in the top panel show tell-tale\n", @@ -499,7 +499,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b2d1fc2", + "id": "d5021325", "metadata": { "hide-output": false }, @@ -510,7 +510,7 @@ } ], "metadata": { - "date": 1724218395.5867877, + "date": 1728369869.8520656, "filename": "muth_kalman.md", "kernelspec": { "display_name": "Python", diff --git a/opt_tax_recur.ipynb b/opt_tax_recur.ipynb index 5a76fc3..98f3671 100644 --- a/opt_tax_recur.ipynb +++ b/opt_tax_recur.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "d51c7cf3", + "id": "0525ce9f", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "510c9f6b", + "id": "73409566", "metadata": {}, "source": [ "# Optimal Taxation with State-Contingent Debt\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8d4922fc", + "id": "395eed08", "metadata": { "hide-output": false }, @@ -33,13 +33,13 @@ }, { "cell_type": "markdown", - "id": "71c71729", + "id": "6126aba2", "metadata": {}, "source": [ "## Overview\n", "\n", "This lecture describes a celebrated model of optimal fiscal policy by Robert E.\n", - "Lucas, Jr., and Nancy Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)].\n", + "Lucas, Jr., and Nancy Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)].\n", "\n", "The model revisits classic issues about how to pay for a war.\n", "\n", @@ -74,7 +74,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8b9564be", + "id": "5f313469", "metadata": { "hide-output": false }, @@ -91,7 +91,7 @@ }, { "cell_type": "markdown", - "id": "124ecc56", + "id": "ad5733af", "metadata": {}, "source": [ "## A Competitive Equilibrium with Distorting Taxes\n", @@ -208,7 +208,7 @@ }, { "cell_type": "markdown", - "id": "74357182", + "id": "9ea1eade", "metadata": {}, "source": [ "### Arrow-Debreu Version of Price System\n", @@ -236,7 +236,7 @@ }, { "cell_type": "markdown", - "id": "33cd690d", + "id": "e42b0e77", "metadata": {}, "source": [ "### Primal Approach\n", @@ -268,7 +268,7 @@ }, { "cell_type": "markdown", - "id": "36ea47c3", + "id": "5da9b170", "metadata": {}, "source": [ "### The Implementability Constraint\n", @@ -344,7 +344,7 @@ }, { "cell_type": "markdown", - "id": "1fc716ae", + "id": "815744ea", "metadata": {}, "source": [ "### Solution Details\n", @@ -486,7 +486,7 @@ }, { "cell_type": "markdown", - "id": "097136a4", + "id": "0041f0ac", "metadata": {}, "source": [ "### The Ramsey Allocation for a Given Multiplier\n", @@ -522,7 +522,7 @@ }, { "cell_type": "markdown", - "id": "c6d70c50", + "id": "1b5404e2", "metadata": {}, "source": [ "### Further Specialization\n", @@ -544,7 +544,7 @@ }, { "cell_type": "markdown", - "id": "54f00294", + "id": "45b0500c", "metadata": {}, "source": [ "### Determining the Lagrange Multiplier\n", @@ -680,7 +680,7 @@ }, { "cell_type": "markdown", - "id": "8326127a", + "id": "1b531df5", "metadata": {}, "source": [ "### Time Inconsistency\n", @@ -711,15 +711,15 @@ }, { "cell_type": "markdown", - "id": "1b1b8ffc", + "id": "5c7512ed", "metadata": {}, "source": [ "### Specification with CRRA Utility\n", "\n", "In our calculations below and in a [subsequent lecture](https://python-advanced.quantecon.org/amss.html) based on an *extension* of the Lucas-Stokey model\n", - "by Aiyagari, Marcet, Sargent, and Seppälä (2002) [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)], we shall modify the one-period utility function assumed above.\n", + "by Aiyagari, Marcet, Sargent, and Seppälä (2002) [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)], we shall modify the one-period utility function assumed above.\n", "\n", - "(We adopted the preceding utility specification because it was the one used in the original Lucas-Stokey paper [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)]. We shall soon revert to that specification in a subsequent section.)\n", + "(We adopted the preceding utility specification because it was the one used in the original Lucas-Stokey paper [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)]. We shall soon revert to that specification in a subsequent section.)\n", "\n", "We will modify their specification by instead assuming that the representative agent has utility function\n", "\n", @@ -796,7 +796,7 @@ }, { "cell_type": "markdown", - "id": "5fda9beb", + "id": "9acc0a66", "metadata": {}, "source": [ "### Sequence Implementation\n", @@ -807,7 +807,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0c0d2d02", + "id": "3e2614d1", "metadata": { "hide-output": false }, @@ -1015,7 +1015,7 @@ }, { "cell_type": "markdown", - "id": "689f9e0b", + "id": "cdccc058", "metadata": {}, "source": [ "## Recursive Formulation of the Ramsey Problem\n", @@ -1032,7 +1032,7 @@ }, { "cell_type": "markdown", - "id": "085ad788", + "id": "93256873", "metadata": {}, "source": [ "### Intertemporal Delegation\n", @@ -1081,7 +1081,7 @@ }, { "cell_type": "markdown", - "id": "b46e770f", + "id": "7c52ea7a", "metadata": {}, "source": [ "### Two Bellman Equations\n", @@ -1100,7 +1100,7 @@ }, { "cell_type": "markdown", - "id": "a0d8a6ae", + "id": "d33c618a", "metadata": {}, "source": [ "### The Continuation Ramsey Problem\n", @@ -1145,7 +1145,7 @@ }, { "cell_type": "markdown", - "id": "e0817c0f", + "id": "d6f0465c", "metadata": {}, "source": [ "### The Ramsey Problem\n", @@ -1198,7 +1198,7 @@ }, { "cell_type": "markdown", - "id": "c5496827", + "id": "bee1d0df", "metadata": {}, "source": [ "### First-Order Conditions\n", @@ -1282,7 +1282,7 @@ }, { "cell_type": "markdown", - "id": "1396564d", + "id": "7d9326d5", "metadata": {}, "source": [ "### State Variable Degeneracy\n", @@ -1310,7 +1310,7 @@ }, { "cell_type": "markdown", - "id": "da185230", + "id": "c152e1e7", "metadata": {}, "source": [ "### Manifestations of Time Inconsistency\n", @@ -1360,7 +1360,7 @@ }, { "cell_type": "markdown", - "id": "3e91ad0f", + "id": "9150b76c", "metadata": {}, "source": [ "### Recursive Implementation\n", @@ -1371,7 +1371,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8dd1e1a5", + "id": "95164f4e", "metadata": { "hide-output": false }, @@ -1625,7 +1625,7 @@ }, { "cell_type": "markdown", - "id": "c564abae", + "id": "a1907c08", "metadata": {}, "source": [ "## Examples\n", @@ -1635,7 +1635,7 @@ }, { "cell_type": "markdown", - "id": "a37fdb18", + "id": "728b5534", "metadata": {}, "source": [ "### Anticipated One-Period War\n", @@ -1691,7 +1691,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7dbc5fdb", + "id": "74bb54db", "metadata": { "hide-output": false }, @@ -1747,7 +1747,7 @@ }, { "cell_type": "markdown", - "id": "59a298eb", + "id": "fcd79b78", "metadata": {}, "source": [ "We set initial government debt $ b_0 = 1 $.\n", @@ -1761,7 +1761,7 @@ { "cell_type": "code", "execution_count": null, - "id": "54656fe5", + "id": "1a33a733", "metadata": { "hide-output": false }, @@ -1802,7 +1802,7 @@ }, { "cell_type": "markdown", - "id": "c4b8d4c4", + "id": "3b8a1d3a", "metadata": {}, "source": [ "**Tax smoothing**\n", @@ -1848,7 +1848,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bcd531b4", + "id": "8eb9be7c", "metadata": { "hide-output": false }, @@ -1863,7 +1863,7 @@ }, { "cell_type": "markdown", - "id": "09c4d8e2", + "id": "65250e87", "metadata": {}, "source": [ "### Government Saving\n", @@ -1899,7 +1899,7 @@ }, { "cell_type": "markdown", - "id": "7bf823c4", + "id": "1b81df9e", "metadata": {}, "source": [ "### Time 0 Manipulation of Interest Rate\n", @@ -1917,7 +1917,7 @@ }, { "cell_type": "markdown", - "id": "a8b22ef5", + "id": "071c6405", "metadata": {}, "source": [ "### Time 0 and Time-Inconsistency\n", @@ -1937,7 +1937,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e1d1a9bc", + "id": "a45e2442", "metadata": { "hide-output": false }, @@ -1971,7 +1971,7 @@ }, { "cell_type": "markdown", - "id": "7388e83b", + "id": "1f753f86", "metadata": {}, "source": [ "The figure indicates that if the government enters with positive debt, it sets\n", @@ -2021,7 +2021,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dcbce05d", + "id": "5d4bc0a3", "metadata": { "hide-output": false }, @@ -2051,7 +2051,7 @@ }, { "cell_type": "markdown", - "id": "c3a7161d", + "id": "53a14187", "metadata": {}, "source": [ "The tax rates in the figure are equal for only two values of initial government debt." @@ -2059,7 +2059,7 @@ }, { "cell_type": "markdown", - "id": "6a78faef", + "id": "e1b089a7", "metadata": {}, "source": [ "### Tax Smoothing and non-CRRA Preferences\n", @@ -2096,7 +2096,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d3596059", + "id": "1d9bcfea", "metadata": { "hide-output": false }, @@ -2142,7 +2142,7 @@ }, { "cell_type": "markdown", - "id": "485d8352", + "id": "6ca96c9b", "metadata": {}, "source": [ "Also, suppose that $ g_t $ follows a two-state IID process with equal\n", @@ -2156,7 +2156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc2a5e2c", + "id": "f32c20ad", "metadata": { "hide-output": false }, @@ -2198,7 +2198,7 @@ }, { "cell_type": "markdown", - "id": "809cbc4e", + "id": "5d43fd70", "metadata": {}, "source": [ "As should be expected, the recursive and sequential solutions produce almost\n", @@ -2211,13 +2211,13 @@ }, { "cell_type": "markdown", - "id": "ef0831f2", + "id": "1c33310e", "metadata": {}, "source": [ "### Further Comments\n", "\n", "A [related lecture](https://python-advanced.quantecon.org/amss.html) describes an extension of the Lucas-Stokey model\n", - "by Aiyagari, Marcet, Sargent, and Seppälä (2002) [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id130)].\n", + "by Aiyagari, Marcet, Sargent, and Seppälä (2002) [[Aiyagari *et al.*, 2002](https://python-advanced.quantecon.org/zreferences.html#id131)].\n", "\n", "In the AMSS economy, only a risk-free bond is traded.\n", "\n", @@ -2232,7 +2232,7 @@ } ], "metadata": { - "date": 1724218395.6566033, + "date": 1728369869.9224734, "filename": "opt_tax_recur.md", "kernelspec": { "display_name": "Python", diff --git a/orth_proj.ipynb b/orth_proj.ipynb index 560a020..ac6b353 100644 --- a/orth_proj.ipynb +++ b/orth_proj.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "300528c5", + "id": "7f7b4bac", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "d0bf9897", + "id": "04f219ef", "metadata": {}, "source": [ "# Orthogonal Projections and Their Applications\n", @@ -22,7 +22,7 @@ }, { "cell_type": "markdown", - "id": "28c5fce4", + "id": "e9b1904a", "metadata": {}, "source": [ "## Overview\n", @@ -51,7 +51,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2420910b", + "id": "91142aa7", "metadata": { "hide-output": false }, @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "425a7d5c", + "id": "2e1eb77e", "metadata": {}, "source": [ "### Further Reading\n", @@ -72,14 +72,14 @@ "\n", "For more proofs and greater theoretical detail, see [A Primer in Econometric Theory](http://www.johnstachurski.net/emet.html).\n", "\n", - "For a complete set of proofs in a general setting, see, for example, [[Roman, 2005](https://python-advanced.quantecon.org/zreferences.html#id111)].\n", + "For a complete set of proofs in a general setting, see, for example, [[Roman, 2005](https://python-advanced.quantecon.org/zreferences.html#id112)].\n", "\n", "For an advanced treatment of projection in the context of least squares prediction, see [this book chapter](http://www.tomsargent.com/books/TOMchpt.2.pdf)." ] }, { "cell_type": "markdown", - "id": "542d3e06", + "id": "cc194b10", "metadata": {}, "source": [ "## Key Definitions\n", @@ -143,7 +143,7 @@ }, { "cell_type": "markdown", - "id": "90a2b620", + "id": "6b30aa74", "metadata": {}, "source": [ "### Linear Independence vs Orthogonality\n", @@ -157,7 +157,7 @@ }, { "cell_type": "markdown", - "id": "b4505487", + "id": "c42c6665", "metadata": {}, "source": [ "## The Orthogonal Projection Theorem\n", @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "45dbc92c", + "id": "68e51cb9", "metadata": {}, "source": [ "### Proof of Sufficiency\n", @@ -214,7 +214,7 @@ }, { "cell_type": "markdown", - "id": "6231d719", + "id": "9fe6a2ba", "metadata": {}, "source": [ "### Orthogonal Projection as a Mapping\n", @@ -255,7 +255,7 @@ }, { "cell_type": "markdown", - "id": "28e77c00", + "id": "bb4b88e4", "metadata": {}, "source": [ "#### Orthogonal Complement\n", @@ -296,7 +296,7 @@ }, { "cell_type": "markdown", - "id": "bc26dad1", + "id": "67d898a8", "metadata": {}, "source": [ "## Orthonormal Basis\n", @@ -342,7 +342,7 @@ }, { "cell_type": "markdown", - "id": "164a0395", + "id": "8f1246a7", "metadata": {}, "source": [ "### Projection onto an Orthonormal Basis\n", @@ -380,7 +380,7 @@ }, { "cell_type": "markdown", - "id": "5c79bcd3", + "id": "f358d12a", "metadata": {}, "source": [ "## Projection Via Matrix Algebra\n", @@ -442,7 +442,7 @@ }, { "cell_type": "markdown", - "id": "5b1d076c", + "id": "7cb2e5c9", "metadata": {}, "source": [ "### Starting with the Basis\n", @@ -464,7 +464,7 @@ }, { "cell_type": "markdown", - "id": "d3132621", + "id": "e74eed5b", "metadata": {}, "source": [ "### The Orthonormal Case\n", @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "282daa25", + "id": "60972fd7", "metadata": {}, "source": [ "### Application: Overdetermined Systems of Equations\n", @@ -552,7 +552,7 @@ }, { "cell_type": "markdown", - "id": "eb4f953d", + "id": "8ecb9186", "metadata": {}, "source": [ "## Least Squares Regression\n", @@ -566,7 +566,7 @@ }, { "cell_type": "markdown", - "id": "c192ecae", + "id": "8fc0f3bc", "metadata": {}, "source": [ "### Squared Risk Measures\n", @@ -604,7 +604,7 @@ }, { "cell_type": "markdown", - "id": "3e4ee932", + "id": "1699f70a", "metadata": {}, "source": [ "### Solution\n", @@ -713,7 +713,7 @@ }, { "cell_type": "markdown", - "id": "836a3bff", + "id": "00773b25", "metadata": {}, "source": [ "## Orthogonalization and Decomposition\n", @@ -730,7 +730,7 @@ }, { "cell_type": "markdown", - "id": "f370f2da", + "id": "979ad13f", "metadata": {}, "source": [ "### Gram-Schmidt Orthogonalization\n", @@ -763,7 +763,7 @@ }, { "cell_type": "markdown", - "id": "b76df5f7", + "id": "c50f25d2", "metadata": {}, "source": [ "### QR Decomposition\n", @@ -795,7 +795,7 @@ }, { "cell_type": "markdown", - "id": "92324840", + "id": "8872ca5c", "metadata": {}, "source": [ "### Linear Regression via QR Decomposition\n", @@ -820,7 +820,7 @@ }, { "cell_type": "markdown", - "id": "9bf5c25c", + "id": "b91c0f6d", "metadata": {}, "source": [ "## Exercises" @@ -828,7 +828,7 @@ }, { "cell_type": "markdown", - "id": "b618ee29", + "id": "c9f1c835", "metadata": {}, "source": [ "## Exercise 1.1\n", @@ -838,7 +838,7 @@ }, { "cell_type": "markdown", - "id": "9604f33d", + "id": "6e451f3e", "metadata": {}, "source": [ "## Solution to[ Exercise 1.1](https://python-advanced.quantecon.org/#op_ex1)\n", @@ -849,7 +849,7 @@ }, { "cell_type": "markdown", - "id": "3f490ed1", + "id": "2d666e1d", "metadata": {}, "source": [ "## Exercise 1.2\n", @@ -861,7 +861,7 @@ }, { "cell_type": "markdown", - "id": "eca23152", + "id": "dd048ff4", "metadata": {}, "source": [ "## Solution to[ Exercise 1.2](https://python-advanced.quantecon.org/#op_ex2)\n", @@ -877,7 +877,7 @@ }, { "cell_type": "markdown", - "id": "3b560d78", + "id": "0efe75e0", "metadata": {}, "source": [ "## Exercise 1.3\n", @@ -912,7 +912,7 @@ }, { "cell_type": "markdown", - "id": "73c4ff76", + "id": "0ac10766", "metadata": {}, "source": [ "## Solution to[ Exercise 1.3](https://python-advanced.quantecon.org/#op_ex3)\n", @@ -924,7 +924,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fb2fb932", + "id": "ed0e0459", "metadata": { "hide-output": false }, @@ -970,7 +970,7 @@ }, { "cell_type": "markdown", - "id": "65c4c6a6", + "id": "8b51f9cb", "metadata": {}, "source": [ "Here are the arrays we’ll work with" @@ -979,7 +979,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a63c0c6c", + "id": "05062937", "metadata": { "hide-output": false }, @@ -996,7 +996,7 @@ }, { "cell_type": "markdown", - "id": "6a197be4", + "id": "d419532d", "metadata": {}, "source": [ "First, let’s try projection of $ y $ onto the column space of\n", @@ -1006,7 +1006,7 @@ { "cell_type": "code", "execution_count": null, - "id": "85661b08", + "id": "ed71cf01", "metadata": { "hide-output": false }, @@ -1018,7 +1018,7 @@ }, { "cell_type": "markdown", - "id": "6ecdd270", + "id": "76e14c62", "metadata": {}, "source": [ "Now let’s do the same using an orthonormal basis created from our\n", @@ -1028,7 +1028,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d9733038", + "id": "207ef4c7", "metadata": { "hide-output": false }, @@ -1041,7 +1041,7 @@ { "cell_type": "code", "execution_count": null, - "id": "320d32e8", + "id": "5a9d86e3", "metadata": { "hide-output": false }, @@ -1053,7 +1053,7 @@ }, { "cell_type": "markdown", - "id": "f1ac1733", + "id": "ea9de12c", "metadata": {}, "source": [ "This is the same answer. So far so good. Finally, let’s try the same\n", @@ -1063,7 +1063,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0999da92", + "id": "343736af", "metadata": { "hide-output": false }, @@ -1076,7 +1076,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ea34bba", + "id": "66a16704", "metadata": { "hide-output": false }, @@ -1088,7 +1088,7 @@ }, { "cell_type": "markdown", - "id": "0d061114", + "id": "1da8e070", "metadata": {}, "source": [ "Again, we obtain the same answer." @@ -1096,7 +1096,7 @@ } ], "metadata": { - "date": 1724218395.6952384, + "date": 1728369869.9642158, "filename": "orth_proj.md", "kernelspec": { "display_name": "Python", diff --git a/permanent_income_dles.ipynb b/permanent_income_dles.ipynb index 7812c03..b3686e3 100644 --- a/permanent_income_dles.ipynb +++ b/permanent_income_dles.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "376651a3", + "id": "73a722fb", "metadata": {}, "source": [ "\n", @@ -13,13 +13,13 @@ }, { "cell_type": "markdown", - "id": "f09c1e18", + "id": "bf57694e", "metadata": {}, "source": [ "# Permanent Income Model using the DLE Class\n", "\n", "This lecture is part of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s included in Anaconda, this lecture uses the quantecon library." ] @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ca672467", + "id": "c748b9e7", "metadata": { "hide-output": false }, @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "53ca27bd", + "id": "c4bbdd8b", "metadata": {}, "source": [ "This lecture adds a third solution method for the\n", @@ -51,7 +51,7 @@ "\n", "In this way, we map the permanent\n", "income model into the framework of Hansen & Sargent (2013) “Recursive\n", - "Models of Dynamic Linear Economies” [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)].\n", + "Models of Dynamic Linear Economies” [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)].\n", "\n", "We’ll also require the following imports" ] @@ -59,7 +59,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec9a4cf6", + "id": "da59ab17", "metadata": { "hide-output": false }, @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "f706c8d6", + "id": "0598d194", "metadata": {}, "source": [ "## The Permanent Income Model\n", @@ -174,13 +174,13 @@ }, { "cell_type": "markdown", - "id": "814c1b53", + "id": "59555c10", "metadata": {}, "source": [ "### Solution with the DLE Class\n", "\n", "One way of solving this model is to map the problem into the framework\n", - "outlined in Section 4.8 of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] by setting up our technology,\n", + "outlined in Section 4.8 of [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] by setting up our technology,\n", "information and preference matrices as follows:\n", "\n", "**Technology:**\n", @@ -233,7 +233,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90bbd4c8", + "id": "8aa90341", "metadata": { "hide-output": false }, @@ -273,7 +273,7 @@ }, { "cell_type": "markdown", - "id": "9ef03bf1", + "id": "2d7bfb55", "metadata": {}, "source": [ "To check the solution of this model with that from the **LQ** problem,\n", @@ -290,7 +290,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d712d289", + "id": "40c9c2e0", "metadata": { "hide-output": false }, @@ -301,7 +301,7 @@ }, { "cell_type": "markdown", - "id": "a999574e", + "id": "01542733", "metadata": {}, "source": [ "The state vector in the DLE class is:\n", @@ -331,7 +331,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9760acf5", + "id": "d1c27c2f", "metadata": { "hide-output": false }, @@ -357,7 +357,7 @@ } ], "metadata": { - "date": 1724218395.7098284, + "date": 1728369869.9795284, "filename": "permanent_income_dles.md", "kernelspec": { "display_name": "Python", diff --git a/rob_markov_perf.ipynb b/rob_markov_perf.ipynb index 53a1027..af24e89 100644 --- a/rob_markov_perf.ipynb +++ b/rob_markov_perf.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "c4a28944", + "id": "7a9aeb2e", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "65804e87", + "id": "9512a73e", "metadata": {}, "source": [ "# Robust Markov Perfect Equilibrium\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3eaeab40", + "id": "4a26a17c", "metadata": { "hide-output": false }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "24d5c67a", + "id": "4abe3155", "metadata": {}, "source": [ "## Overview\n", @@ -51,7 +51,7 @@ "\n", "These specifications simplify calculations and allow us to give a simple example that illustrates basic forces.\n", "\n", - "This lecture is based on ideas described in chapter 15 of [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)] and in [Markov perfect equilibrium](https://python-intro.quantecon.org/markov_perf.html)\n", + "This lecture is based on ideas described in chapter 15 of [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)] and in [Markov perfect equilibrium](https://python-intro.quantecon.org/markov_perf.html)\n", "and [Robustness](https://python-advanced.quantecon.org/robustness.html).\n", "\n", "Let’s start with some standard imports:" @@ -60,7 +60,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5594ac86", + "id": "d3d1a50a", "metadata": { "hide-output": false }, @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "042c8dd3", + "id": "43443a8d", "metadata": {}, "source": [ "### Basic Setup\n", @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "bff63138", + "id": "e5676223", "metadata": {}, "source": [ "## Linear Markov Perfect Equilibria with Robust Agents\n", @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "17ef35ee", + "id": "9fc9aa0c", "metadata": {}, "source": [ "### Modified Coupled Linear Regulator Problems\n", @@ -200,7 +200,7 @@ }, { "cell_type": "markdown", - "id": "5e529ec7", + "id": "cdb52b5d", "metadata": {}, "source": [ "### Computing Equilibrium\n", @@ -317,7 +317,7 @@ }, { "cell_type": "markdown", - "id": "4e6a19ee", + "id": "9c8b0e21", "metadata": {}, "source": [ "### Key Insight\n", @@ -337,7 +337,7 @@ }, { "cell_type": "markdown", - "id": "67b0f8bd", + "id": "ae83e94d", "metadata": {}, "source": [ "### Worst-case Shocks\n", @@ -357,7 +357,7 @@ }, { "cell_type": "markdown", - "id": "2142a9df", + "id": "bc73c6b7", "metadata": {}, "source": [ "### Infinite Horizon\n", @@ -371,7 +371,7 @@ }, { "cell_type": "markdown", - "id": "76e85654", + "id": "aa6f68bc", "metadata": {}, "source": [ "### Implementation\n", @@ -383,7 +383,7 @@ }, { "cell_type": "markdown", - "id": "001ff8e3", + "id": "e4a5477c", "metadata": {}, "source": [ "## Application\n", @@ -394,7 +394,7 @@ }, { "cell_type": "markdown", - "id": "0dacfa64", + "id": "6e19bae5", "metadata": {}, "source": [ "### A Duopoly Model\n", @@ -524,7 +524,7 @@ }, { "cell_type": "markdown", - "id": "281de6c7", + "id": "2ed36ada", "metadata": {}, "source": [ "### Parameters and Solution\n", @@ -543,7 +543,7 @@ { "cell_type": "code", "execution_count": null, - "id": "69bc24ef", + "id": "9f9c8fce", "metadata": { "hide-output": false }, @@ -589,7 +589,7 @@ }, { "cell_type": "markdown", - "id": "e3666397", + "id": "558b93b9", "metadata": {}, "source": [ "#### Markov Perfect Equilibrium with Robustness\n", @@ -608,7 +608,7 @@ { "cell_type": "code", "execution_count": null, - "id": "55b4f5eb", + "id": "ad057cf6", "metadata": { "hide-output": false }, @@ -780,7 +780,7 @@ }, { "cell_type": "markdown", - "id": "4b927f93", + "id": "07bb944f", "metadata": {}, "source": [ "### Some Details\n", @@ -854,7 +854,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ecbac52", + "id": "1e8e9aa3", "metadata": { "hide-output": false }, @@ -887,7 +887,7 @@ }, { "cell_type": "markdown", - "id": "b75c09ef", + "id": "4f52157e", "metadata": {}, "source": [ "#### Consistency Check\n", @@ -899,7 +899,7 @@ { "cell_type": "code", "execution_count": null, - "id": "500b0189", + "id": "b62c9722", "metadata": { "hide-output": false }, @@ -923,7 +923,7 @@ }, { "cell_type": "markdown", - "id": "ba3834d3", + "id": "cb41f99b", "metadata": {}, "source": [ "We can see that the results are consistent across the two functions." @@ -931,7 +931,7 @@ }, { "cell_type": "markdown", - "id": "2ce00e55", + "id": "0fa4bf60", "metadata": {}, "source": [ "#### Comparative Dynamics under Baseline Transition Dynamics\n", @@ -975,7 +975,7 @@ { "cell_type": "code", "execution_count": null, - "id": "778ce739", + "id": "9de8fe08", "metadata": { "hide-output": false }, @@ -1046,7 +1046,7 @@ }, { "cell_type": "markdown", - "id": "632f37af", + "id": "ecbc2c44", "metadata": {}, "source": [ "The following code prepares graphs that compare market-wide output $ q_{1t} + q_{2t} $ and the price of the good\n", @@ -1060,7 +1060,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8a25b576", + "id": "a1eb9c68", "metadata": { "hide-output": false }, @@ -1084,7 +1084,7 @@ }, { "cell_type": "markdown", - "id": "817a5a97", + "id": "94245684", "metadata": {}, "source": [ "Under the dynamics associated with the baseline model, the price path is higher with the Markov perfect equilibrium robust decision rules\n", @@ -1100,7 +1100,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8781021", + "id": "391172af", "metadata": { "hide-output": false }, @@ -1124,7 +1124,7 @@ }, { "cell_type": "markdown", - "id": "a09e9562", + "id": "d3fb5206", "metadata": {}, "source": [ "Evidently, firm 1’s output path is substantially lower when firms are robust firms while\n", @@ -1147,7 +1147,7 @@ }, { "cell_type": "markdown", - "id": "03bba4ef", + "id": "d15d5390", "metadata": {}, "source": [ "#### Heterogeneous Beliefs\n", @@ -1178,7 +1178,7 @@ { "cell_type": "code", "execution_count": null, - "id": "137a6049", + "id": "614248cc", "metadata": { "hide-output": false }, @@ -1194,7 +1194,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f76374d5", + "id": "64e58f22", "metadata": { "hide-output": false }, @@ -1225,7 +1225,7 @@ }, { "cell_type": "markdown", - "id": "c7435ca8", + "id": "e1c8e6d0", "metadata": {}, "source": [ "We see from the above graph that under robustness concerns, player 1 and\n", @@ -1240,12 +1240,12 @@ "\n", "This means that the robust rules are the unique **optimal** rules (or best responses) to the indicated worst-case transition dynamics.\n", "\n", - "([[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)] discuss how this property of robust decision rules is connected to the concept of *admissibility* in Bayesian statistical decision theory)" + "([[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)] discuss how this property of robust decision rules is connected to the concept of *admissibility* in Bayesian statistical decision theory)" ] } ], "metadata": { - "date": 1724218395.7415674, + "date": 1728369870.0135012, "filename": "rob_markov_perf.md", "kernelspec": { "display_name": "Python", diff --git a/robustness.ipynb b/robustness.ipynb index 8ffa69b..ab53627 100644 --- a/robustness.ipynb +++ b/robustness.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "836dd1dd", + "id": "a8bb6052", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "afc9ed3a", + "id": "d5e6bbfb", "metadata": {}, "source": [ "# Robustness\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf7d5798", + "id": "1c7405e9", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "8d3a6582", + "id": "a9ddacf3", "metadata": {}, "source": [ "## Overview\n", @@ -84,7 +84,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8502d329", + "id": "87dcbada", "metadata": { "hide-output": false }, @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "388138ac", + "id": "536e83cf", "metadata": {}, "source": [ "\n", @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "47b1254c", + "id": "fd7b37a5", "metadata": {}, "source": [ "### Sets of Models Imply Sets Of Values\n", @@ -175,7 +175,7 @@ }, { "cell_type": "markdown", - "id": "424e1849", + "id": "68ff46a4", "metadata": {}, "source": [ "### Inspiring Video\n", @@ -185,20 +185,20 @@ }, { "cell_type": "markdown", - "id": "db04b151", + "id": "373dcedf", "metadata": {}, "source": [ "### Other References\n", "\n", "Our discussion in this lecture is based on\n", "\n", - "- [[Hansen and Sargent, 2000](https://python-advanced.quantecon.org/zreferences.html#id158)] \n", - "- [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)] " + "- [[Hansen and Sargent, 2000](https://python-advanced.quantecon.org/zreferences.html#id159)] \n", + "- [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)] " ] }, { "cell_type": "markdown", - "id": "c403430d", + "id": "67ef6062", "metadata": {}, "source": [ "## The Model\n", @@ -252,7 +252,7 @@ }, { "cell_type": "markdown", - "id": "edd62650", + "id": "22ff632a", "metadata": {}, "source": [ "## Constructing More Robust Policies\n", @@ -301,7 +301,7 @@ }, { "cell_type": "markdown", - "id": "e7f0fa25", + "id": "87755cac", "metadata": {}, "source": [ "### Analyzing the Bellman Equation\n", @@ -369,7 +369,7 @@ "The operator $ \\mathcal B $ is the standard (i.e., non-robust) LQ Bellman operator, and $ P = \\mathcal B(P) $ is the standard matrix Riccati equation coming from the\n", "Bellman equation — see [this discussion](https://python.quantecon.org/lqcontrol.html#infinite-horizon).\n", "\n", - "Under some regularity conditions (see [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id157)]), the operator $ \\mathcal B \\circ \\mathcal D $\n", + "Under some regularity conditions (see [[Hansen and Sargent, 2008](https://python-advanced.quantecon.org/zreferences.html#id158)]), the operator $ \\mathcal B \\circ \\mathcal D $\n", "has a unique positive definite fixed point, which we denote below by $ \\hat P $.\n", "\n", "A robust policy, indexed by $ \\theta $, is $ u = - \\hat F x $ where\n", @@ -407,7 +407,7 @@ }, { "cell_type": "markdown", - "id": "70206b37", + "id": "90e9f8f2", "metadata": {}, "source": [ "## Robustness as Outcome of a Two-Person Zero-Sum Game\n", @@ -428,7 +428,7 @@ }, { "cell_type": "markdown", - "id": "d1ce4d53", + "id": "5535245f", "metadata": {}, "source": [ "### Agent 2’s Problem\n", @@ -535,7 +535,7 @@ }, { "cell_type": "markdown", - "id": "6e1362b8", + "id": "49a1e443", "metadata": {}, "source": [ "### Using Agent 2’s Problem to Construct Bounds on the Value Sets" @@ -543,7 +543,7 @@ }, { "cell_type": "markdown", - "id": "429b6d76", + "id": "78f26a2c", "metadata": {}, "source": [ "#### The Lower Bound\n", @@ -602,7 +602,7 @@ }, { "cell_type": "markdown", - "id": "2a4fa20c", + "id": "c200bee7", "metadata": {}, "source": [ "#### The Upper Bound\n", @@ -665,7 +665,7 @@ }, { "cell_type": "markdown", - "id": "2947e276", + "id": "f0fe64c9", "metadata": {}, "source": [ "#### Reshaping the Set of Values\n", @@ -675,7 +675,7 @@ }, { "cell_type": "markdown", - "id": "20d289fe", + "id": "952f76e1", "metadata": {}, "source": [ "### Agent 1’s Problem\n", @@ -722,7 +722,7 @@ }, { "cell_type": "markdown", - "id": "1ad490bd", + "id": "c8a1ed56", "metadata": {}, "source": [ "### Nash Equilibrium\n", @@ -756,7 +756,7 @@ }, { "cell_type": "markdown", - "id": "c195cac0", + "id": "c623d2b4", "metadata": {}, "source": [ "## The Stochastic Case\n", @@ -805,7 +805,7 @@ }, { "cell_type": "markdown", - "id": "4c830a6c", + "id": "30f8de0d", "metadata": {}, "source": [ "### Solving the Model\n", @@ -903,7 +903,7 @@ }, { "cell_type": "markdown", - "id": "be098667", + "id": "7c34edb5", "metadata": {}, "source": [ "### Computing Other Quantities\n", @@ -913,7 +913,7 @@ }, { "cell_type": "markdown", - "id": "0534074f", + "id": "2a8eece2", "metadata": {}, "source": [ "#### Worst-Case Value of a Policy\n", @@ -971,7 +971,7 @@ }, { "cell_type": "markdown", - "id": "754dbe6e", + "id": "1064ba99", "metadata": {}, "source": [ "## Implementation\n", @@ -997,7 +997,7 @@ }, { "cell_type": "markdown", - "id": "feaa54c4", + "id": "715d2049", "metadata": {}, "source": [ "## Application\n", @@ -1097,7 +1097,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4f2a03b2", + "id": "b480e461", "metadata": { "hide-output": false }, @@ -1274,7 +1274,7 @@ }, { "cell_type": "markdown", - "id": "4c095845", + "id": "2f54bf21", "metadata": {}, "source": [ "Here’s another such figure, with $ \\theta = 0.002 $ instead of $ 0.02 $\n", @@ -1290,7 +1290,7 @@ }, { "cell_type": "markdown", - "id": "b2542b1d", + "id": "3ea6ac58", "metadata": {}, "source": [ "## Appendix\n", @@ -1364,7 +1364,7 @@ } ], "metadata": { - "date": 1724218395.9745975, + "date": 1728369870.0583084, "filename": "robustness.md", "kernelspec": { "display_name": "Python", diff --git a/rosen_schooling_model.ipynb b/rosen_schooling_model.ipynb index 7e26e18..22dd87c 100644 --- a/rosen_schooling_model.ipynb +++ b/rosen_schooling_model.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8a1eb251", + "id": "fbde4bde", "metadata": {}, "source": [ "\n", @@ -13,13 +13,13 @@ }, { "cell_type": "markdown", - "id": "fc247639", + "id": "74f60ae2", "metadata": {}, "source": [ "# Rosen Schooling Model\n", "\n", "This lecture is yet another part of a suite of lectures that use the quantecon DLE class to instantiate models within the\n", - "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", + "[[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] class of models described in detail in [Recursive Models of Dynamic Linear Economies](https://python-advanced.quantecon.org/hs_recursive_models.html).\n", "\n", "In addition to what’s included in Anaconda, this lecture uses the quantecon library" ] @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16124180", + "id": "2c2914df", "metadata": { "hide-output": false }, @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "7374d4a1", + "id": "fc7063ab", "metadata": {}, "source": [ "We’ll also need the following imports:" @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c3883de1", + "id": "37743b46", "metadata": { "hide-output": false }, @@ -61,12 +61,12 @@ }, { "cell_type": "markdown", - "id": "90e7992e", + "id": "d58e89e6", "metadata": {}, "source": [ "## A One-Occupation Model\n", "\n", - "Ryoo and Rosen’s (2004) [[Ryoo and Rosen, 2004](https://python-advanced.quantecon.org/zreferences.html#id69)] partial equilibrium model determines\n", + "Ryoo and Rosen’s (2004) [[Ryoo and Rosen, 2004](https://python-advanced.quantecon.org/zreferences.html#id70)] partial equilibrium model determines\n", "\n", "- a stock of “Engineers” $ N_t $ \n", "- a number of new entrants in engineering school, $ n_t $ \n", @@ -109,12 +109,12 @@ }, { "cell_type": "markdown", - "id": "6b0a5239", + "id": "c71b81e9", "metadata": {}, "source": [ "## Mapping into HS2013 Framework\n", "\n", - "We represent this model in the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id71)] framework by\n", + "We represent this model in the [[Hansen and Sargent, 2013](https://python-advanced.quantecon.org/zreferences.html#id72)] framework by\n", "\n", "- sweeping the time-to-build structure and the demand for engineers\n", " into the household technology, and \n", @@ -124,7 +124,7 @@ }, { "cell_type": "markdown", - "id": "486e5ea6", + "id": "365c68ff", "metadata": {}, "source": [ "### Preferences\n", @@ -156,12 +156,12 @@ }, { "cell_type": "markdown", - "id": "67f044c4", + "id": "72a603ef", "metadata": {}, "source": [ "### Technology\n", "\n", - "To capture Ryoo and Rosen’s [[Ryoo and Rosen, 2004](https://python-advanced.quantecon.org/zreferences.html#id69)] supply curve, we use the physical\n", + "To capture Ryoo and Rosen’s [[Ryoo and Rosen, 2004](https://python-advanced.quantecon.org/zreferences.html#id70)] supply curve, we use the physical\n", "technology:\n", "\n", "$$\n", @@ -177,7 +177,7 @@ }, { "cell_type": "markdown", - "id": "ed94e12a", + "id": "1d8f6fd0", "metadata": {}, "source": [ "### Information\n", @@ -210,7 +210,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1203f58", + "id": "baee8a85", "metadata": { "hide-output": false }, @@ -223,7 +223,7 @@ }, { "cell_type": "markdown", - "id": "371775a6", + "id": "ce2347ab", "metadata": {}, "source": [ "### Effects of Changes in Education Technology and Demand\n", @@ -242,7 +242,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ae0188a2", + "id": "c9e64725", "metadata": { "hide-output": false }, @@ -297,7 +297,7 @@ }, { "cell_type": "markdown", - "id": "1571e8be", + "id": "7a8c9270", "metadata": {}, "source": [ "We create three other instances by:\n", @@ -310,7 +310,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41e87389", + "id": "8152924b", "metadata": { "hide-output": false }, @@ -357,7 +357,7 @@ }, { "cell_type": "markdown", - "id": "a9e13fc8", + "id": "af250d46", "metadata": {}, "source": [ "The first figure plots the impulse response of $ n_t $ (on the left)\n", @@ -385,7 +385,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b2f176b6", + "id": "1622c739", "metadata": { "hide-output": false }, @@ -406,7 +406,7 @@ }, { "cell_type": "markdown", - "id": "9bb84096", + "id": "fbcfb1e0", "metadata": {}, "source": [ "The next figure plots the impulse response of $ n_t $ (on the left)\n", @@ -417,7 +417,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1cda5079", + "id": "fa3daa01", "metadata": { "hide-output": false }, @@ -440,7 +440,7 @@ }, { "cell_type": "markdown", - "id": "11c0bbbc", + "id": "b723b2f2", "metadata": {}, "source": [ "Both panels in the above figure show that raising $ k $ lowers the effect of\n", @@ -454,7 +454,7 @@ } ], "metadata": { - "date": 1724218395.9908123, + "date": 1728369870.0741003, "filename": "rosen_schooling_model.md", "kernelspec": { "display_name": "Python", diff --git a/smoothing.ipynb b/smoothing.ipynb index 62a4bb0..10b7103 100644 --- a/smoothing.ipynb +++ b/smoothing.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "992e22a0", + "id": "423fc53b", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "8eba1934", + "id": "c6e1a950", "metadata": {}, "source": [ "# Consumption Smoothing with Complete and Incomplete Markets\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "81f71d7d", + "id": "0ce11ba0", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "d708db1f", + "id": "a7b4549a", "metadata": {}, "source": [ "## Overview\n", @@ -43,14 +43,14 @@ "This lecture describes two types of consumption-smoothing models.\n", "\n", "- one is in the **complete markets** tradition of [Kenneth Arrow](https://en.wikipedia.org/wiki/Kenneth_Arrow) \n", - "- the other is in the **incomplete markets** tradition of Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)] \n", + "- the other is in the **incomplete markets** tradition of Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)] \n", "\n", "\n", "*Complete markets* allow a consumer to buy and sell claims contingent on all possible states of the world.\n", "\n", "*Incomplete markets* allow a consumer to buy and sell a limited set of securities, often only a single risk-free security.\n", "\n", - "Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)] worked in an incomplete markets tradition by assuming\n", + "Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)] worked in an incomplete markets tradition by assuming\n", "that the only asset that can be traded is a risk-free one-period bond.\n", "\n", "Hall assumed an exogenous stochastic process of nonfinancial income and\n", @@ -87,7 +87,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2a7461e", + "id": "a6bc2d28", "metadata": { "hide-output": false }, @@ -101,7 +101,7 @@ }, { "cell_type": "markdown", - "id": "e530579d", + "id": "7e32cbb2", "metadata": {}, "source": [ "### Relationship to Other Lectures\n", @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "f8b19550", + "id": "c20700ec", "metadata": {}, "source": [ "## Background\n", @@ -148,7 +148,7 @@ }, { "cell_type": "markdown", - "id": "970a7810", + "id": "d6793911", "metadata": {}, "source": [ "## Linear State Space Version of Complete Markets Model\n", @@ -309,7 +309,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9e45997d", + "id": "0bcd031e", "metadata": { "hide-output": false }, @@ -392,7 +392,7 @@ }, { "cell_type": "markdown", - "id": "0219f5ea", + "id": "b74b8996", "metadata": {}, "source": [ "### Interpretation of Graph\n", @@ -410,7 +410,7 @@ }, { "cell_type": "markdown", - "id": "a85a3161", + "id": "3b3e3a98", "metadata": {}, "source": [ "### Incomplete Markets Version\n", @@ -423,7 +423,7 @@ }, { "cell_type": "markdown", - "id": "7fdff93c", + "id": "d0e5590a", "metadata": {}, "source": [ "### Finite State Markov Income Process\n", @@ -474,7 +474,7 @@ }, { "cell_type": "markdown", - "id": "06d0177b", + "id": "a1e7af03", "metadata": {}, "source": [ "### Market Structure\n", @@ -493,7 +493,7 @@ }, { "cell_type": "markdown", - "id": "86f9593d", + "id": "fbc8da58", "metadata": {}, "source": [ "## Model 1 (Complete Markets)\n", @@ -672,7 +672,7 @@ }, { "cell_type": "markdown", - "id": "b8d57896", + "id": "1a63d37f", "metadata": {}, "source": [ "### Key Outcomes\n", @@ -700,7 +700,7 @@ }, { "cell_type": "markdown", - "id": "44970ed4", + "id": "fa1ffb21", "metadata": {}, "source": [ "### Code\n", @@ -714,7 +714,7 @@ { "cell_type": "code", "execution_count": null, - "id": "004b9311", + "id": "be566426", "metadata": { "hide-output": false }, @@ -844,7 +844,7 @@ }, { "cell_type": "markdown", - "id": "ea36fa98", + "id": "441a2580", "metadata": {}, "source": [ "Let’s test by checking that $ \\bar c $ and $ b_2 $ satisfy the budget constraint" @@ -853,7 +853,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eb97bb08", + "id": "a29dd995", "metadata": { "hide-output": false }, @@ -866,17 +866,17 @@ }, { "cell_type": "markdown", - "id": "7e64b927", + "id": "713c1300", "metadata": {}, "source": [ "Below, we’ll take the outcomes produced by this code – in particular the implied\n", "consumption and debt paths – and compare them with outcomes\n", - "from an incomplete markets model in the spirit of Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)]" + "from an incomplete markets model in the spirit of Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)]" ] }, { "cell_type": "markdown", - "id": "a4c4c09e", + "id": "0bf3edc5", "metadata": {}, "source": [ "## Model 2 (One-Period Risk-Free Debt Only)\n", @@ -1005,7 +1005,7 @@ }, { "cell_type": "markdown", - "id": "993788b4", + "id": "aba5b912", "metadata": {}, "source": [ "### Summary of Outcomes\n", @@ -1027,7 +1027,7 @@ }, { "cell_type": "markdown", - "id": "cadad4fd", + "id": "06825787", "metadata": {}, "source": [ "### The Incomplete Markets Model\n", @@ -1044,7 +1044,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e4377f78", + "id": "22cb0fff", "metadata": { "hide-output": false }, @@ -1082,7 +1082,7 @@ }, { "cell_type": "markdown", - "id": "d2de4e83", + "id": "0d996015", "metadata": {}, "source": [ "In the graph on the left, for the same sample path of nonfinancial\n", @@ -1097,18 +1097,18 @@ }, { "cell_type": "markdown", - "id": "3e37122b", + "id": "0e5dd8fa", "metadata": {}, "source": [ "### A sequel\n", "\n", "In [tax smoothing with complete and incomplete markets](https://python-advanced.quantecon.org/smoothing_tax.html), we reinterpret the mathematics and Python code presented in this lecture in order\n", - "to construct tax-smoothing models in the incomplete markets tradition of Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] as well as in the complete markets tradition of Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)]." + "to construct tax-smoothing models in the incomplete markets tradition of Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] as well as in the complete markets tradition of Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)]." ] } ], "metadata": { - "date": 1724218396.026414, + "date": 1728369870.107944, "filename": "smoothing.md", "kernelspec": { "display_name": "Python", diff --git a/smoothing_tax.ipynb b/smoothing_tax.ipynb index 0dcbf2a..31cba68 100644 --- a/smoothing_tax.ipynb +++ b/smoothing_tax.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7bc412d9", + "id": "76f4e540", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "89acee3e", + "id": "d2a1bcfd", "metadata": {}, "source": [ "# Tax Smoothing with Complete and Incomplete Markets\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1883245", + "id": "1eb6a042", "metadata": { "hide-output": false }, @@ -35,30 +35,30 @@ }, { "cell_type": "markdown", - "id": "47a346ff", + "id": "00c6a4dc", "metadata": {}, "source": [ "## Overview\n", "\n", "This lecture describes tax-smoothing models that are counterparts to consumption-smoothing models in [Consumption Smoothing with Complete and Incomplete Markets](https://python-advanced.quantecon.org/smoothing.html).\n", "\n", - "- one is in the **complete markets** tradition of Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)]. \n", - "- the other is in the **incomplete markets** tradition of Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)]. \n", + "- one is in the **complete markets** tradition of Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)]. \n", + "- the other is in the **incomplete markets** tradition of Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)]. \n", "\n", "\n", "*Complete markets* allow a government to buy or sell claims contingent on all possible Markov states.\n", "\n", "*Incomplete markets* allow a government to buy or sell only a limited set of securities, often only a single risk-free security.\n", "\n", - "Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] worked in an incomplete markets tradition by assuming\n", + "Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] worked in an incomplete markets tradition by assuming\n", "that the only asset that can be traded is a risk-free one period bond.\n", "\n", - "In his consumption-smoothing model, Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id152)] had assumed an exogenous stochastic process of nonfinancial income and\n", + "In his consumption-smoothing model, Hall [[Hall, 1978](https://python-advanced.quantecon.org/zreferences.html#id153)] had assumed an exogenous stochastic process of nonfinancial income and\n", "an exogenous gross interest rate on one period risk-free debt that equals\n", "$ \\beta^{-1} $, where $ \\beta \\in (0,1) $ is also a consumer’s\n", "intertemporal discount factor.\n", "\n", - "Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] made an analogous assumption about the risk-free interest\n", + "Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] made an analogous assumption about the risk-free interest\n", "rate in a tax-smoothing model that turns out to have the same mathematical structure as Hall’s\n", "consumption-smoothing model.\n", "\n", @@ -68,12 +68,12 @@ "incomplete markets version of our model.\n", "\n", "In addition, we extend their assumption about the interest rate to an appropriate counterpart to create a “complete markets” model in the style of\n", - "Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)]." + "Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)]." ] }, { "cell_type": "markdown", - "id": "e69e9350", + "id": "bf8667ed", "metadata": {}, "source": [ "### Isomorphism between Consumption and Tax Smoothing\n", @@ -99,13 +99,13 @@ }, { "cell_type": "markdown", - "id": "48a55026", + "id": "65fc5c6c", "metadata": {}, "source": [ "#### Link to History\n", "\n", - "For those who love history, President Thomas Jefferson’s Secretary of Treasury Albert Gallatin (1807) [[Gallatin, 1837](https://python-advanced.quantecon.org/zreferences.html#id134)] seems to have prescribed policies that\n", - "come from Barro’s model [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)]\n", + "For those who love history, President Thomas Jefferson’s Secretary of Treasury Albert Gallatin (1807) [[Gallatin, 1837](https://python-advanced.quantecon.org/zreferences.html#id135)] seems to have prescribed policies that\n", + "come from Barro’s model [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)]\n", "\n", "Let’s start with some standard imports:" ] @@ -113,7 +113,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2b556744", + "id": "84784e5b", "metadata": { "hide-output": false }, @@ -126,7 +126,7 @@ }, { "cell_type": "markdown", - "id": "0fa2df4b", + "id": "59557caa", "metadata": {}, "source": [ "To exploit the isomorphism between consumption-smoothing and tax-smoothing models, we simply use code from [Consumption Smoothing with Complete and Incomplete Markets](https://python-advanced.quantecon.org/smoothing.html)" @@ -134,7 +134,7 @@ }, { "cell_type": "markdown", - "id": "e5cdc866", + "id": "10fe4e67", "metadata": {}, "source": [ "### Code\n", @@ -148,7 +148,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e1ed30f", + "id": "1b506f70", "metadata": { "hide-output": false }, @@ -278,7 +278,7 @@ }, { "cell_type": "markdown", - "id": "4dabc248", + "id": "d0058535", "metadata": {}, "source": [ "### Revisiting the consumption-smoothing model\n", @@ -295,7 +295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c15b9e0d", + "id": "2a468925", "metadata": { "hide-output": false }, @@ -331,7 +331,7 @@ }, { "cell_type": "markdown", - "id": "f35403a0", + "id": "a3dd236a", "metadata": {}, "source": [ "In the graph on the left, for the same sample path of nonfinancial\n", @@ -346,7 +346,7 @@ }, { "cell_type": "markdown", - "id": "10f4a48d", + "id": "00bc20c3", "metadata": {}, "source": [ "#### Relabeling variables to create tax-smoothing models\n", @@ -357,7 +357,7 @@ { "cell_type": "code", "execution_count": null, - "id": "50549dca", + "id": "a7f476dc", "metadata": { "hide-output": false }, @@ -386,14 +386,14 @@ }, { "cell_type": "markdown", - "id": "254dce47", + "id": "87a1000c", "metadata": {}, "source": [ "## Tax Smoothing with Complete Markets\n", "\n", "It is instructive to focus on a simple tax-smoothing example with complete markets.\n", "\n", - "This example illustrates how, in a complete markets model like that of Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id176)], the government purchases\n", + "This example illustrates how, in a complete markets model like that of Lucas and Stokey [[Lucas and Stokey, 1983](https://python-advanced.quantecon.org/zreferences.html#id177)], the government purchases\n", "insurance from the private sector.\n", "\n", "Payouts from the insurance it had purchased allows the government to avoid raising taxes when emergencies make government expenditures surge.\n", @@ -437,7 +437,7 @@ }, { "cell_type": "markdown", - "id": "533953b3", + "id": "1b5bfd57", "metadata": {}, "source": [ "## Returns on State-Contingent Debt\n", @@ -469,7 +469,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fbfc4bfd", + "id": "0f57a2c7", "metadata": { "hide-output": false }, @@ -509,7 +509,7 @@ }, { "cell_type": "markdown", - "id": "5ba35058", + "id": "719ddc23", "metadata": {}, "source": [ "### An Example of Tax Smoothing\n", @@ -538,7 +538,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0768a6e0", + "id": "013c791f", "metadata": { "hide-output": false }, @@ -617,7 +617,7 @@ }, { "cell_type": "markdown", - "id": "55834704", + "id": "5de48053", "metadata": {}, "source": [ "### Explanation\n", @@ -643,7 +643,7 @@ }, { "cell_type": "markdown", - "id": "9b6b8ada", + "id": "7f7d9788", "metadata": {}, "source": [ "### Exercise 7.1\n", @@ -664,7 +664,7 @@ }, { "cell_type": "markdown", - "id": "f8dbf93e", + "id": "5821fc5b", "metadata": {}, "source": [ "## More Finite Markov Chain Tax-Smoothing Examples\n", @@ -682,7 +682,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2c4044c4", + "id": "b6801339", "metadata": { "hide-output": false }, @@ -801,7 +801,7 @@ }, { "cell_type": "markdown", - "id": "f49748c3", + "id": "f49cca0c", "metadata": {}, "source": [ "### Parameters" @@ -810,7 +810,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b9281bce", + "id": "7d04d3a8", "metadata": { "hide-output": false }, @@ -829,7 +829,7 @@ }, { "cell_type": "markdown", - "id": "f3058ccd", + "id": "6c0722f6", "metadata": {}, "source": [ "### Example 1\n", @@ -861,7 +861,7 @@ { "cell_type": "code", "execution_count": null, - "id": "03da0bd3", + "id": "11866cfc", "metadata": { "hide-output": false }, @@ -878,7 +878,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e6fd3eba", + "id": "80f5826a", "metadata": { "hide-output": false }, @@ -891,7 +891,7 @@ { "cell_type": "code", "execution_count": null, - "id": "16d52de2", + "id": "0cb38f7f", "metadata": { "hide-output": false }, @@ -905,7 +905,7 @@ }, { "cell_type": "markdown", - "id": "2881681c", + "id": "245dd740", "metadata": {}, "source": [ "### Example 2\n", @@ -931,7 +931,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbe8b4e8", + "id": "884ebd5b", "metadata": { "hide-output": false }, @@ -948,7 +948,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3db07be7", + "id": "662d3f92", "metadata": { "hide-output": false }, @@ -960,7 +960,7 @@ }, { "cell_type": "markdown", - "id": "e609b150", + "id": "bc4ad4a6", "metadata": {}, "source": [ "### Example 3\n", @@ -989,7 +989,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6fe04938", + "id": "86df0dde", "metadata": { "hide-output": false }, @@ -1007,7 +1007,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ea9b1be", + "id": "33735ea3", "metadata": { "hide-output": false }, @@ -1019,7 +1019,7 @@ }, { "cell_type": "markdown", - "id": "240b543a", + "id": "43672801", "metadata": {}, "source": [ "### Example 4\n", @@ -1046,7 +1046,7 @@ { "cell_type": "code", "execution_count": null, - "id": "590cc2ea", + "id": "dc347f5b", "metadata": { "hide-output": false }, @@ -1065,7 +1065,7 @@ { "cell_type": "code", "execution_count": null, - "id": "80374d16", + "id": "12d4648f", "metadata": { "hide-output": false }, @@ -1077,7 +1077,7 @@ }, { "cell_type": "markdown", - "id": "e222941e", + "id": "bbde233a", "metadata": {}, "source": [ "### Example 5\n", @@ -1109,7 +1109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "36451dfc", + "id": "e057b902", "metadata": { "hide-output": false }, @@ -1130,7 +1130,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb776944", + "id": "d96205ac", "metadata": { "hide-output": false }, @@ -1142,7 +1142,7 @@ }, { "cell_type": "markdown", - "id": "ce07ea5e", + "id": "3322a1b4", "metadata": {}, "source": [ "### Continuous-State Gaussian Model\n", @@ -1192,13 +1192,13 @@ }, { "cell_type": "markdown", - "id": "50be82fb", + "id": "3e3b1871", "metadata": {}, "source": [ "#### Related Lectures\n", "\n", "Throughout this lecture, we have taken one-period interest rates and Arrow security prices as exogenous objects determined outside the model\n", - "and specified them in ways designed to align our models closely with the consumption smoothing model of Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)].\n", + "and specified them in ways designed to align our models closely with the consumption smoothing model of Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)].\n", "\n", "Other lectures make these objects endogenous and describe how a government optimally manipulates prices of government debt, albeit indirectly via effects distorting\n", "taxes have on equilibrium prices and allocations.\n", @@ -1218,7 +1218,7 @@ } ], "metadata": { - "date": 1724218396.0643406, + "date": 1728369870.316574, "filename": "smoothing_tax.md", "kernelspec": { "display_name": "Python", diff --git a/stationary_densities.ipynb b/stationary_densities.ipynb index ca1a5c7..92bd7d6 100644 --- a/stationary_densities.ipynb +++ b/stationary_densities.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2a223e5d", + "id": "d7b8d4d3", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "2b35bca4", + "id": "2c9ab46a", "metadata": {}, "source": [ "# Continuous State Markov Chains\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e7f0e6ee", + "id": "cbb4c14f", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "e64f4935", + "id": "163fba31", "metadata": {}, "source": [ "## Overview\n", @@ -74,7 +74,7 @@ ">\n", ">For some people, the term “Markov chain” always refers to a process with a\n", "finite or discrete state space. We follow the mainstream\n", - "mathematical literature (e.g., [[Meyn and Tweedie, 2009](https://python-advanced.quantecon.org/zreferences.html#id183)]) in using the term to refer to any discrete **time**\n", + "mathematical literature (e.g., [[Meyn and Tweedie, 2009](https://python-advanced.quantecon.org/zreferences.html#id184)]) in using the term to refer to any discrete **time**\n", "Markov process.\n", "\n", "Let’s begin with some imports:" @@ -83,7 +83,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0fa19b28", + "id": "c5a50e29", "metadata": { "hide-output": false }, @@ -98,7 +98,7 @@ }, { "cell_type": "markdown", - "id": "974c2c2c", + "id": "fe2bd122", "metadata": {}, "source": [ "\n", @@ -107,7 +107,7 @@ }, { "cell_type": "markdown", - "id": "b4c0d329", + "id": "21755dd3", "metadata": {}, "source": [ "## The Density Case\n", @@ -127,7 +127,7 @@ }, { "cell_type": "markdown", - "id": "1f99dbea", + "id": "86dee6cb", "metadata": {}, "source": [ "### Definitions and Basic Properties\n", @@ -205,7 +205,7 @@ }, { "cell_type": "markdown", - "id": "df600fbc", + "id": "858cf1db", "metadata": {}, "source": [ "### Connection to Stochastic Difference Equations\n", @@ -270,7 +270,7 @@ "- $ f \\colon \\mathbb R_+ \\to \\mathbb R_+ $ is a production function satisfying $ f(k) > 0 $ whenever $ k > 0 $ \n", "\n", "\n", - "(The fixed savings rate can be rationalized as the optimal policy for a particular set of technologies and preferences (see [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)], section\n", + "(The fixed savings rate can be rationalized as the optimal policy for a particular set of technologies and preferences (see [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)], section\n", "3.1.2), although we omit the details here).\n", "\n", "Equation [(2.5)](#equation-statd-ss) is a special case of [(2.3)](#equation-statd-srs) with $ \\mu(x) = (1 - \\delta)x $ and $ \\sigma(x) = s f(x) $.\n", @@ -327,7 +327,7 @@ }, { "cell_type": "markdown", - "id": "db4f4949", + "id": "4c986951", "metadata": {}, "source": [ "### Distribution Dynamics\n", @@ -414,7 +414,7 @@ }, { "cell_type": "markdown", - "id": "a074e9b4", + "id": "5f639506", "metadata": {}, "source": [ "### Computation\n", @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "54d37a4e", + "id": "0e72d96d", "metadata": {}, "source": [ "### Implementation\n", @@ -520,7 +520,7 @@ }, { "cell_type": "markdown", - "id": "25ecf349", + "id": "54329b87", "metadata": {}, "source": [ "### Example\n", @@ -534,7 +534,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9a6a992d", + "id": "5941a616", "metadata": { "hide-output": false }, @@ -584,7 +584,7 @@ }, { "cell_type": "markdown", - "id": "bbf0cdde", + "id": "8929a0e8", "metadata": {}, "source": [ "The figure shows part of the density sequence $ \\{\\psi_t\\} $, with each\n", @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "da525a8d", + "id": "056fb98a", "metadata": {}, "source": [ "## Beyond Densities\n", @@ -621,12 +621,12 @@ }, { "cell_type": "markdown", - "id": "4d015f5e", + "id": "8525ebbe", "metadata": {}, "source": [ "### Example and Definitions\n", "\n", - "To illustrate the issues, recall that Hopenhayn and Rogerson [[Hopenhayn and Rogerson, 1993](https://python-advanced.quantecon.org/zreferences.html#id162)] study a model of firm dynamics where individual firm productivity follows the exogenous process\n", + "To illustrate the issues, recall that Hopenhayn and Rogerson [[Hopenhayn and Rogerson, 1993](https://python-advanced.quantecon.org/zreferences.html#id163)] study a model of firm dynamics where individual firm productivity follows the exogenous process\n", "\n", "$$\n", "X_{t+1} = a + \\rho X_t + \\xi_{t+1},\n", @@ -678,7 +678,7 @@ }, { "cell_type": "markdown", - "id": "93851794", + "id": "6abfaed8", "metadata": {}, "source": [ "### Computation\n", @@ -693,7 +693,7 @@ }, { "cell_type": "markdown", - "id": "fd027ba0", + "id": "5f36918f", "metadata": {}, "source": [ "## Stability\n", @@ -709,7 +709,7 @@ }, { "cell_type": "markdown", - "id": "319e83c4", + "id": "ef884e58", "metadata": {}, "source": [ "### Theoretical Results\n", @@ -782,8 +782,8 @@ "\n", "In addition\n", "\n", - "- [[Stokey *et al.*, 1989](https://python-advanced.quantecon.org/zreferences.html#id209)] contains a classic (but slightly outdated) treatment of these topics. \n", - "- From the mathematical literature, [[Lasota and MacKey, 1994](https://python-advanced.quantecon.org/zreferences.html#id172)] and [[Meyn and Tweedie, 2009](https://python-advanced.quantecon.org/zreferences.html#id183)] give outstanding in-depth treatments. \n", + "- [[Stokey *et al.*, 1989](https://python-advanced.quantecon.org/zreferences.html#id210)] contains a classic (but slightly outdated) treatment of these topics. \n", + "- From the mathematical literature, [[Lasota and MacKey, 1994](https://python-advanced.quantecon.org/zreferences.html#id173)] and [[Meyn and Tweedie, 2009](https://python-advanced.quantecon.org/zreferences.html#id184)] give outstanding in-depth treatments. \n", "- Section 8.1.2 of [EDTC](http://johnstachurski.net/edtc.html) provides detailed intuition, and section 8.3 gives additional references. \n", "- [EDTC](http://johnstachurski.net/edtc.html), section 11.3.4\n", " provides a specific treatment for the growth model we considered in this\n", @@ -792,7 +792,7 @@ }, { "cell_type": "markdown", - "id": "f4111162", + "id": "5f9b9eba", "metadata": {}, "source": [ "### An Example of Stability\n", @@ -819,7 +819,7 @@ }, { "cell_type": "markdown", - "id": "ec17ab27", + "id": "28aa13e4", "metadata": {}, "source": [ "### Computing Stationary Densities\n", @@ -871,7 +871,7 @@ }, { "cell_type": "markdown", - "id": "f2f5b574", + "id": "3a52d18e", "metadata": {}, "source": [ "## Exercises\n", @@ -882,7 +882,7 @@ }, { "cell_type": "markdown", - "id": "251f92b4", + "id": "999aaeb2", "metadata": {}, "source": [ "## Exercise 2.1\n", @@ -937,7 +937,7 @@ }, { "cell_type": "markdown", - "id": "2277310b", + "id": "5e44f9bb", "metadata": {}, "source": [ "## Solution to[ Exercise 2.1](https://python-advanced.quantecon.org/#sd_ex1)\n", @@ -957,7 +957,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b4ad0eee", + "id": "d969dd93", "metadata": { "hide-output": false }, @@ -996,7 +996,7 @@ }, { "cell_type": "markdown", - "id": "ed819da9", + "id": "b9543e0f", "metadata": {}, "source": [ "\n", @@ -1005,7 +1005,7 @@ }, { "cell_type": "markdown", - "id": "5e1a4dc7", + "id": "56326154", "metadata": {}, "source": [ "## Exercise 2.2\n", @@ -1024,7 +1024,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b93ff1de", + "id": "1fd96f29", "metadata": { "hide-output": false }, @@ -1035,7 +1035,7 @@ }, { "cell_type": "markdown", - "id": "4ac0410d", + "id": "0f9f0b3b", "metadata": {}, "source": [ "## Solution to[ Exercise 2.2](https://python-advanced.quantecon.org/#sd_ex2)\n", @@ -1046,7 +1046,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb39e828", + "id": "4e2a020f", "metadata": { "hide-output": false }, @@ -1098,7 +1098,7 @@ }, { "cell_type": "markdown", - "id": "379e5919", + "id": "7996bdcf", "metadata": {}, "source": [ "\n", @@ -1107,7 +1107,7 @@ }, { "cell_type": "markdown", - "id": "4b76039d", + "id": "c67de4bf", "metadata": {}, "source": [ "## Exercise 2.3\n", @@ -1131,7 +1131,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06b7ffc9", + "id": "8c24096a", "metadata": { "hide-output": false }, @@ -1153,7 +1153,7 @@ }, { "cell_type": "markdown", - "id": "39cf6288", + "id": "324b7359", "metadata": {}, "source": [ "Each data set is represented by a box, where the top and bottom of the box are the third and first quartiles of the data, and the red line in the center is the median.\n", @@ -1179,7 +1179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2880e2cc", + "id": "6a3bb6ed", "metadata": { "hide-output": false }, @@ -1190,7 +1190,7 @@ }, { "cell_type": "markdown", - "id": "fbff9eb9", + "id": "ccf22b61", "metadata": {}, "source": [ "For each $ X_0 $ in this set,\n", @@ -1204,7 +1204,7 @@ }, { "cell_type": "markdown", - "id": "0ca80e3c", + "id": "7d6331d5", "metadata": {}, "source": [ "## Solution to[ Exercise 2.3](https://python-advanced.quantecon.org/#sd_ex3)\n", @@ -1218,7 +1218,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eea09a18", + "id": "b3161106", "metadata": { "hide-output": false }, @@ -1252,7 +1252,7 @@ }, { "cell_type": "markdown", - "id": "92ae94c8", + "id": "b784e6d1", "metadata": {}, "source": [ "## Appendix\n", @@ -1272,7 +1272,7 @@ } ], "metadata": { - "date": 1724218396.115784, + "date": 1728369870.3667035, "filename": "stationary_densities.md", "kernelspec": { "display_name": "Python", diff --git a/status.ipynb b/status.ipynb index 3a686a8..1d7bef6 100644 --- a/status.ipynb +++ b/status.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "925a99e1", + "id": "a4ee346e", "metadata": {}, "source": [ "# Execution Statistics\n", @@ -11,65 +11,65 @@ "\n", "[](https://python-advanced.quantecon.org/BCG_complete_mkts.html)[](https://python-advanced.quantecon.org/BCG_incomplete_mkts.html)[](https://python-advanced.quantecon.org/additive_functionals.html)[](https://python-advanced.quantecon.org/amss.html)[](https://python-advanced.quantecon.org/amss2.html)[](https://python-advanced.quantecon.org/amss3.html)[](https://python-advanced.quantecon.org/arellano.html)[](https://python-advanced.quantecon.org/arma.html)[](https://python-advanced.quantecon.org/asset_pricing_lph.html)[](https://python-advanced.quantecon.org/black_litterman.html)[](https://python-advanced.quantecon.org/calvo.html)[](https://python-advanced.quantecon.org/calvo_machine_learn.html)[](https://python-advanced.quantecon.org/cattle_cycles.html)[](https://python-advanced.quantecon.org/chang_credible.html)[](https://python-advanced.quantecon.org/chang_ramsey.html)[](https://python-advanced.quantecon.org/classical_filtering.html)[](https://python-advanced.quantecon.org/coase.html)[](https://python-advanced.quantecon.org/cons_news.html)[](https://python-advanced.quantecon.org/discrete_dp.html)[](https://python-advanced.quantecon.org/dyn_stack.html)[](https://python-advanced.quantecon.org/entropy.html)[](https://python-advanced.quantecon.org/estspec.html)[](https://python-advanced.quantecon.org/five_preferences.html)[](https://python-advanced.quantecon.org/growth_in_dles.html)[](https://python-advanced.quantecon.org/hs_invertibility_example.html)[](https://python-advanced.quantecon.org/hs_recursive_models.html)[](https://python-advanced.quantecon.org/intro.html)[](https://python-advanced.quantecon.org/irfs_in_hall_model.html)[](https://python-advanced.quantecon.org/knowing_forecasts_of_others.html)[](https://python-advanced.quantecon.org/lqramsey.html)[](https://python-advanced.quantecon.org/lu_tricks.html)[](https://python-advanced.quantecon.org/lucas_asset_pricing_dles.html)[](https://python-advanced.quantecon.org/lucas_model.html)[](https://python-advanced.quantecon.org/markov_jump_lq.html)[](https://python-advanced.quantecon.org/matsuyama.html)[](https://python-advanced.quantecon.org/muth_kalman.html)[](https://python-advanced.quantecon.org/opt_tax_recur.html)[](https://python-advanced.quantecon.org/orth_proj.html)[](https://python-advanced.quantecon.org/permanent_income_dles.html)[](https://python-advanced.quantecon.org/rob_markov_perf.html)[](https://python-advanced.quantecon.org/robustness.html)[](https://python-advanced.quantecon.org/rosen_schooling_model.html)[](https://python-advanced.quantecon.org/smoothing.html)[](https://python-advanced.quantecon.org/smoothing_tax.html)[](https://python-advanced.quantecon.org/stationary_densities.html)[](https://python-advanced.quantecon.org/.html)[](https://python-advanced.quantecon.org/tax_smoothing_1.html)[](https://python-advanced.quantecon.org/tax_smoothing_2.html)[](https://python-advanced.quantecon.org/tax_smoothing_3.html)[](https://python-advanced.quantecon.org/troubleshooting.html)[](https://python-advanced.quantecon.org/un_insure.html)[](https://python-advanced.quantecon.org/zreferences.html)|Document|Modified|Method|Run Time (s)|Status|\n", "|:------------------:|:------------------:|:------------------:|:------------------:|:------------------:|\n", - "|BCG_complete_mkts|2024-08-20 22:57|cache|53.89|✅|\n", - "|BCG_incomplete_mkts|2024-08-20 22:59|cache|85.85|✅|\n", - "|additive_functionals|2024-08-20 22:59|cache|14.2|✅|\n", - "|amss|2024-08-20 23:04|cache|282.88|✅|\n", - "|amss2|2024-08-20 23:04|cache|54.76|✅|\n", - "|amss3|2024-08-20 23:09|cache|245.05|✅|\n", - "|arellano|2024-08-20 23:10|cache|85.65|✅|\n", - "|arma|2024-08-20 23:10|cache|8.43|✅|\n", - "|asset_pricing_lph|2024-08-20 23:10|cache|2.28|✅|\n", - "|black_litterman|2024-08-21 01:11|cache|7231.32|✅|\n", - "|calvo|2024-08-21 01:11|cache|12.51|✅|\n", - "|calvo_machine_learn|2024-08-21 01:11|cache|23.03|✅|\n", - "|cattle_cycles|2024-08-21 01:11|cache|5.77|✅|\n", - "|chang_credible|2024-08-21 01:14|cache|170.86|✅|\n", - "|chang_ramsey|2024-08-21 01:20|cache|333.92|✅|\n", - "|classical_filtering|2024-08-21 01:20|cache|1.25|✅|\n", - "|coase|2024-08-21 01:20|cache|3.88|✅|\n", - "|cons_news|2024-08-21 01:20|cache|5.96|✅|\n", - "|discrete_dp|2024-08-21 01:21|cache|31.1|✅|\n", - "|dyn_stack|2024-08-21 01:21|cache|7.17|✅|\n", - "|entropy|2024-08-21 01:21|cache|0.98|✅|\n", - "|estspec|2024-08-21 01:21|cache|6.32|✅|\n", - "|five_preferences|2024-08-21 01:21|cache|38.4|✅|\n", - "|growth_in_dles|2024-08-21 01:22|cache|5.57|✅|\n", - "|hs_invertibility_example|2024-08-21 01:22|cache|5.98|✅|\n", - "|hs_recursive_models|2024-08-21 01:22|cache|1.02|✅|\n", - "|intro|2024-08-21 01:22|cache|1.02|✅|\n", - "|irfs_in_hall_model|2024-08-21 01:22|cache|5.78|✅|\n", - "|knowing_forecasts_of_others|2024-08-21 01:22|cache|26.77|✅|\n", - "|lqramsey|2024-08-21 01:22|cache|7.18|✅|\n", - "|lu_tricks|2024-08-21 01:22|cache|2.1|✅|\n", - "|lucas_asset_pricing_dles|2024-08-21 01:22|cache|5.46|✅|\n", - "|lucas_model|2024-08-21 01:23|cache|16.83|✅|\n", - "|markov_jump_lq|2024-08-21 01:24|cache|74.54|✅|\n", - "|matsuyama|2024-08-21 03:24|cache|7206.89|✅|\n", - "|muth_kalman|2024-08-21 03:24|cache|5.67|✅|\n", - "|opt_tax_recur|2024-08-21 03:26|cache|108.62|✅|\n", - "|orth_proj|2024-08-21 03:26|cache|0.95|✅|\n", - "|permanent_income_dles|2024-08-21 03:26|cache|5.45|✅|\n", - "|rob_markov_perf|2024-08-21 03:26|cache|5.58|✅|\n", - "|robustness|2024-08-21 03:26|cache|6.84|✅|\n", - "|rosen_schooling_model|2024-08-21 03:26|cache|5.39|✅|\n", - "|smoothing|2024-08-21 03:27|cache|5.81|✅|\n", - "|smoothing_tax|2024-08-21 03:27|cache|8.21|✅|\n", - "|stationary_densities|2024-08-21 03:27|cache|10.38|✅|\n", - "|status|2024-08-21 01:22|cache|1.02|✅|\n", - "|tax_smoothing_1|2024-08-21 03:27|cache|12.02|✅|\n", - "|tax_smoothing_2|2024-08-21 03:27|cache|6.03|✅|\n", - "|tax_smoothing_3|2024-08-21 03:27|cache|6.18|✅|\n", - "|troubleshooting|2024-08-21 01:22|cache|1.02|✅|\n", - "|un_insure|2024-08-21 03:27|cache|11.38|✅|\n", - "|zreferences|2024-08-21 01:22|cache|1.02|✅|\n", + "|BCG_complete_mkts|2024-10-08 02:11|cache|51.31|✅|\n", + "|BCG_incomplete_mkts|2024-10-08 02:12|cache|88.18|✅|\n", + "|additive_functionals|2024-10-08 02:13|cache|14.46|✅|\n", + "|amss|2024-10-08 02:17|cache|283.87|✅|\n", + "|amss2|2024-10-08 02:18|cache|56.84|✅|\n", + "|amss3|2024-10-08 02:22|cache|246.22|✅|\n", + "|arellano|2024-10-08 02:24|cache|86.68|✅|\n", + "|arma|2024-10-08 02:24|cache|8.67|✅|\n", + "|asset_pricing_lph|2024-10-08 02:24|cache|2.44|✅|\n", + "|black_litterman|2024-10-08 04:25|cache|7230.84|✅|\n", + "|calvo|2024-10-08 04:25|cache|12.88|✅|\n", + "|calvo_machine_learn|2024-10-08 04:25|cache|24.03|✅|\n", + "|cattle_cycles|2024-10-08 04:25|cache|5.93|✅|\n", + "|chang_credible|2024-10-08 04:28|cache|174.02|✅|\n", + "|chang_ramsey|2024-10-08 04:34|cache|339.52|✅|\n", + "|classical_filtering|2024-10-08 04:34|cache|1.4|✅|\n", + "|coase|2024-10-08 04:34|cache|3.68|✅|\n", + "|cons_news|2024-10-08 04:34|cache|6.3|✅|\n", + "|discrete_dp|2024-10-08 04:35|cache|31.86|✅|\n", + "|dyn_stack|2024-10-08 04:35|cache|7.49|✅|\n", + "|entropy|2024-10-08 04:35|cache|0.8|✅|\n", + "|estspec|2024-10-08 04:35|cache|6.5|✅|\n", + "|five_preferences|2024-10-08 04:36|cache|38.24|✅|\n", + "|growth_in_dles|2024-10-08 04:36|cache|5.69|✅|\n", + "|hs_invertibility_example|2024-10-08 04:36|cache|5.95|✅|\n", + "|hs_recursive_models|2024-10-08 04:36|cache|0.78|✅|\n", + "|intro|2024-10-08 04:36|cache|0.78|✅|\n", + "|irfs_in_hall_model|2024-10-08 04:36|cache|5.84|✅|\n", + "|knowing_forecasts_of_others|2024-10-08 04:36|cache|22.33|✅|\n", + "|lqramsey|2024-10-08 04:36|cache|7.21|✅|\n", + "|lu_tricks|2024-10-08 04:36|cache|1.98|✅|\n", + "|lucas_asset_pricing_dles|2024-10-08 04:36|cache|5.46|✅|\n", + "|lucas_model|2024-10-08 04:37|cache|16.63|✅|\n", + "|markov_jump_lq|2024-10-08 04:38|cache|75.95|✅|\n", + "|matsuyama|2024-10-08 06:38|cache|7206.95|✅|\n", + "|muth_kalman|2024-10-08 06:38|cache|6.08|✅|\n", + "|opt_tax_recur|2024-10-08 06:40|cache|109.65|✅|\n", + "|orth_proj|2024-10-08 06:40|cache|0.91|✅|\n", + "|permanent_income_dles|2024-10-08 06:40|cache|5.59|✅|\n", + "|rob_markov_perf|2024-10-08 06:40|cache|5.7|✅|\n", + "|robustness|2024-10-08 06:40|cache|7.07|✅|\n", + "|rosen_schooling_model|2024-10-08 06:40|cache|5.68|✅|\n", + "|smoothing|2024-10-08 06:41|cache|6.13|✅|\n", + "|smoothing_tax|2024-10-08 06:41|cache|8.45|✅|\n", + "|stationary_densities|2024-10-08 06:41|cache|10.43|✅|\n", + "|status|2024-10-08 04:36|cache|0.78|✅|\n", + "|tax_smoothing_1|2024-10-08 06:41|cache|12.33|✅|\n", + "|tax_smoothing_2|2024-10-08 06:41|cache|6.54|✅|\n", + "|tax_smoothing_3|2024-10-08 06:41|cache|6.15|✅|\n", + "|troubleshooting|2024-10-08 04:36|cache|0.78|✅|\n", + "|un_insure|2024-10-08 06:42|cache|11.41|✅|\n", + "|zreferences|2024-10-08 04:36|cache|0.78|✅|\n", "These lectures are built on `linux` instances through `github actions` so are\n", "executed using the following [hardware specifications](https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources)" ] } ], "metadata": { - "date": 1724218396.1379046, + "date": 1728369870.3890717, "filename": "status.md", "kernelspec": { "display_name": "Python", diff --git a/tax_smoothing_1.ipynb b/tax_smoothing_1.ipynb index 0c339a7..4c74753 100644 --- a/tax_smoothing_1.ipynb +++ b/tax_smoothing_1.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "9aa0fb1d", + "id": "b3eb1610", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "6c69185c", + "id": "955cfa37", "metadata": {}, "source": [ "# How to Pay for a War: Part 1\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8cb70e42", + "id": "083f7874", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "c0ec1c11", + "id": "920abf12", "metadata": {}, "source": [ "## Reader’s Guide\n", @@ -46,7 +46,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dcea766c", + "id": "ce69b133", "metadata": { "hide-output": false }, @@ -59,12 +59,12 @@ }, { "cell_type": "markdown", - "id": "e8459035", + "id": "5311037d", "metadata": {}, "source": [ "This lecture uses the method of **Markov jump linear quadratic dynamic programming** that is described in lecture\n", "[Markov Jump LQ dynamic programming](https://python-advanced.quantecon.org/markov_jump_lq.html)\n", - "to extend the [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model of optimal tax-smoothing and government debt in a\n", + "to extend the [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model of optimal tax-smoothing and government debt in a\n", "particular direction.\n", "\n", "This lecture has two sequels that offer further extensions of the Barro model\n", @@ -74,13 +74,13 @@ "\n", "\n", "The extensions are modified versions of\n", - "his 1979 model later suggested by Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id236)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id237)]).\n", + "his 1979 model later suggested by Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id237)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id238)]).\n", "\n", - "Barro’s original 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model is about a government that borrows and lends\n", + "Barro’s original 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model is about a government that borrows and lends\n", "in order to minimize an intertemporal measure of distortions\n", "caused by taxes.\n", "\n", - "Technical tractability induced Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] to assume that\n", + "Technical tractability induced Barro [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] to assume that\n", "\n", "- the government trades only one-period risk-free debt, and \n", "- the one-period risk-free interest rate is constant \n", @@ -94,10 +94,10 @@ "state, we can add a maturity composition decision to the government’s\n", "problem.\n", "\n", - "It is by doing these two things that we extend Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)]\n", - "model along lines he suggested in Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id236)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id237)]).\n", + "It is by doing these two things that we extend Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)]\n", + "model along lines he suggested in Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id237)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id238)]).\n", "\n", - "Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] assumed\n", + "Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] assumed\n", "\n", "- that a government faces an **exogenous sequence** of expenditures\n", " that it must finance by a tax collection sequence whose expected\n", @@ -118,8 +118,8 @@ "programming problem.\n", "\n", "Partly inspired by Barro\n", - "(1999) [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id236)] and Barro (2003) [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id237)],\n", - "our generalizations of Barro’s (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model assume\n", + "(1999) [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id237)] and Barro (2003) [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id238)],\n", + "our generalizations of Barro’s (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model assume\n", "\n", "- that the government borrows or saves in the form of risk-free bonds\n", " of maturities $ 1, 2, \\ldots , H $. \n", @@ -163,12 +163,12 @@ }, { "cell_type": "markdown", - "id": "0dbcd868", + "id": "cae7284b", "metadata": {}, "source": [ "## Public Finance Questions\n", "\n", - "Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model is designed to answer questions such as\n", + "Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model is designed to answer questions such as\n", "\n", "- Should a government finance an exogenous surge in government\n", " expenditures by raising taxes or borrowing? \n", @@ -178,7 +178,7 @@ " temporary or permanent? \n", "\n", "\n", - "Barro’s 1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id236)] and 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id237)]\n", + "Barro’s 1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id237)] and 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id238)]\n", "models are designed to answer more fine-grained\n", "questions such as\n", "\n", @@ -208,12 +208,12 @@ }, { "cell_type": "markdown", - "id": "9dbc3899", + "id": "8010a3b5", "metadata": {}, "source": [ "## Barro (1979) Model\n", "\n", - "We begin by solving a version of the Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model by mapping it\n", + "We begin by solving a version of the Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model by mapping it\n", "into the original LQ framework.\n", "\n", "As mentioned [in this lecture](https://python-intro.quantecon.org/perm_income_cons.html), the\n", @@ -229,7 +229,7 @@ "Evidently, $ p_{t, t+1} $ is inversely related to\n", "appropriate corresponding gross interest rates on government debt.\n", "\n", - "In the spirit of Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)], the stochastic process of government\n", + "In the spirit of Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)], the stochastic process of government\n", "expenditures is exogenous.\n", "\n", "The government’s problem is to choose a plan\n", @@ -325,7 +325,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7be7991", + "id": "e80da875", "metadata": { "hide-output": false }, @@ -370,7 +370,7 @@ }, { "cell_type": "markdown", - "id": "9aad1a9d", + "id": "0ac45401", "metadata": {}, "source": [ "We can now create an instance of `LQ`:" @@ -379,7 +379,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b09212f4", + "id": "7e293ef3", "metadata": { "hide-output": false }, @@ -392,7 +392,7 @@ }, { "cell_type": "markdown", - "id": "d7860354", + "id": "896b417d", "metadata": {}, "source": [ "We can see the isomorphism by noting that consumption is a martingale in\n", @@ -432,7 +432,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f2dbebd9", + "id": "defa831a", "metadata": { "hide-output": false }, @@ -443,7 +443,7 @@ }, { "cell_type": "markdown", - "id": "758e1048", + "id": "916d72fb", "metadata": {}, "source": [ "This explains the fanning out of the conditional empirical distribution of taxation across time, computing\n", @@ -454,7 +454,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4ff2dcfb", + "id": "83405d74", "metadata": { "hide-output": false }, @@ -471,7 +471,7 @@ }, { "cell_type": "markdown", - "id": "5fb35d6a", + "id": "8e9f8843", "metadata": {}, "source": [ "We can see a similar, but a smoother pattern, if we plot government debt\n", @@ -481,7 +481,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5fbcfaa2", + "id": "6a90a0c2", "metadata": { "hide-output": false }, @@ -498,7 +498,7 @@ }, { "cell_type": "markdown", - "id": "ae9a469a", + "id": "92be84d6", "metadata": {}, "source": [ "## Python Class to Solve Markov Jump Linear Quadratic Control Problems\n", @@ -527,7 +527,7 @@ }, { "cell_type": "markdown", - "id": "845883ea", + "id": "fc795afa", "metadata": {}, "source": [ "## Barro Model with a Time-varying Interest Rate\n", @@ -569,7 +569,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2b184e0d", + "id": "fa0f2a21", "metadata": { "hide-output": false }, @@ -601,7 +601,7 @@ }, { "cell_type": "markdown", - "id": "c012c61f", + "id": "ee43a466", "metadata": {}, "source": [ "The decision rules are now dependent on the Markov state:" @@ -610,7 +610,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e48a7587", + "id": "2f6117ca", "metadata": { "hide-output": false }, @@ -622,7 +622,7 @@ { "cell_type": "code", "execution_count": null, - "id": "090134fc", + "id": "1f68ff5c", "metadata": { "hide-output": false }, @@ -633,7 +633,7 @@ }, { "cell_type": "markdown", - "id": "c0b1a9ee", + "id": "e0301afb", "metadata": {}, "source": [ "Simulating a large number of such economies over time reveals\n", @@ -646,7 +646,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1465d977", + "id": "e30675b6", "metadata": { "hide-output": false }, @@ -664,7 +664,7 @@ } ], "metadata": { - "date": 1724218396.1672735, + "date": 1728369870.4189575, "filename": "tax_smoothing_1.md", "kernelspec": { "display_name": "Python", diff --git a/tax_smoothing_2.ipynb b/tax_smoothing_2.ipynb index 9844e71..0cacad4 100644 --- a/tax_smoothing_2.ipynb +++ b/tax_smoothing_2.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "211a98db", + "id": "bca05a37", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "3f7ae5c5", + "id": "15c17d3f", "metadata": {}, "source": [ "# How to Pay for a War: Part 2\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19b0d033", + "id": "e8f711d5", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "7a63b7db", + "id": "bf57eced", "metadata": {}, "source": [ "## An Application of Markov Jump Linear Quadratic Dynamic Programming\n", @@ -43,19 +43,19 @@ "This is a [sequel to an earlier lecture](https://python-advanced.quantecon.org/tax_smoothing_1.html).\n", "\n", "We use a method introduced in lecture [Markov Jump LQ dynamic programming](https://python-advanced.quantecon.org/markov_jump_lq.html) to\n", - "implement suggestions by Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id236)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id237)]) for extending his\n", + "implement suggestions by Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id237)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id238)]) for extending his\n", "classic 1979 model of tax smoothing.\n", "\n", - "Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model is about a government that borrows and lends in order\n", + "Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model is about a government that borrows and lends in order\n", "to help it minimize an intertemporal measure of distortions caused by\n", "taxes.\n", "\n", - "Technically, Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model looks a lot like a consumption-smoothing model.\n", + "Technically, Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model looks a lot like a consumption-smoothing model.\n", "\n", - "Our generalizations of his 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model will also look\n", + "Our generalizations of his 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model will also look\n", "like souped-up consumption-smoothing models.\n", "\n", - "Wanting tractability induced Barro in 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] to assume that\n", + "Wanting tractability induced Barro in 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] to assume that\n", "\n", "- the government trades only one-period risk-free debt, and \n", "- the one-period risk-free interest rate is constant \n", @@ -83,7 +83,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1366d16f", + "id": "f751a3fe", "metadata": { "hide-output": false }, @@ -96,7 +96,7 @@ }, { "cell_type": "markdown", - "id": "c6739c6c", + "id": "b36cc67b", "metadata": {}, "source": [ "## Two example specifications\n", @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "96ac4608", + "id": "8584f1cd", "metadata": {}, "source": [ "## One- and Two-period Bonds but No Restructuring\n", @@ -129,7 +129,7 @@ "Evidently, $ p_{t, t+1}, p_{t,t+2} $ are inversely related to\n", "appropriate corresponding gross interest rates on government debt.\n", "\n", - "In the spirit of Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)], government\n", + "In the spirit of Barro (1979) [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)], government\n", "expenditures are governed by an exogenous stochastic process.\n", "\n", "Given initial conditions $ b_{-2,0}, b_{-1,0}, z_0, i_0 $, where\n", @@ -186,7 +186,7 @@ }, { "cell_type": "markdown", - "id": "6f2463dc", + "id": "367b6b18", "metadata": {}, "source": [ "## Mapping into an LQ Markov Jump Problem\n", @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e7dcd35c", + "id": "9b7503db", "metadata": { "hide-output": false }, @@ -412,7 +412,7 @@ }, { "cell_type": "markdown", - "id": "ea22d866", + "id": "821640cb", "metadata": {}, "source": [ "With the above function, we can proceed to solve the model in two steps:\n", @@ -426,7 +426,7 @@ }, { "cell_type": "markdown", - "id": "2d825fd3", + "id": "2d844649", "metadata": {}, "source": [ "## Penalty on Different Issuance Across Maturities\n", @@ -479,7 +479,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ee5e2a0b", + "id": "05f76e78", "metadata": { "hide-output": false }, @@ -533,7 +533,7 @@ }, { "cell_type": "markdown", - "id": "eac2cbfb", + "id": "96575345", "metadata": {}, "source": [ "The above simulations show that when no penalty is imposed on different\n", @@ -550,7 +550,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0d24ab5", + "id": "29d03fe1", "metadata": { "hide-output": false }, @@ -594,7 +594,7 @@ }, { "cell_type": "markdown", - "id": "cb6b47a8", + "id": "ebc57e69", "metadata": {}, "source": [ "## A Model with Restructuring\n", @@ -771,7 +771,7 @@ }, { "cell_type": "markdown", - "id": "33bc7b32", + "id": "0cb56bcb", "metadata": {}, "source": [ "## Restructuring as a Markov Jump Linear Quadratic Control Problem\n", @@ -784,7 +784,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f16020b3", + "id": "8f15303d", "metadata": { "hide-output": false }, @@ -839,7 +839,7 @@ }, { "cell_type": "markdown", - "id": "66000999", + "id": "c738b1a3", "metadata": {}, "source": [ "### Example with Restructuring\n", @@ -870,7 +870,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ba10c6a9", + "id": "ffaacba5", "metadata": { "hide-output": false }, @@ -915,7 +915,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0d0ef561", + "id": "f4c240cb", "metadata": { "hide-output": false }, @@ -943,7 +943,7 @@ { "cell_type": "code", "execution_count": null, - "id": "31dfeb8f", + "id": "4b6a68d1", "metadata": { "hide-output": false }, @@ -960,7 +960,7 @@ } ], "metadata": { - "date": 1724218396.1924174, + "date": 1728369870.4447432, "filename": "tax_smoothing_2.md", "kernelspec": { "display_name": "Python", diff --git a/tax_smoothing_3.ipynb b/tax_smoothing_3.ipynb index c189e81..febea49 100644 --- a/tax_smoothing_3.ipynb +++ b/tax_smoothing_3.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8b857723", + "id": "573c3f93", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "992ff128", + "id": "0db18e84", "metadata": {}, "source": [ "# How to Pay for a War: Part 3\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23d85600", + "id": "674151b4", "metadata": { "hide-output": false }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "547eb057", + "id": "db8e2ff1", "metadata": {}, "source": [ "## Another Application of Markov Jump Linear Quadratic Dynamic Programming\n", @@ -43,14 +43,14 @@ "This is another [sequel to an earlier lecture](https://python-advanced.quantecon.org/tax_smoothing_1.html).\n", "\n", "We again use a method introduced in lecture [Markov Jump LQ dynamic programming](https://python-advanced.quantecon.org/markov_jump_lq.html)\n", - "to implement some ideas Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id236)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id237)]) that\n", - "extend his classic 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model of tax smoothing.\n", + "to implement some ideas Barro (1999 [[Barro, 1999](https://python-advanced.quantecon.org/zreferences.html#id237)], 2003 [[Barro and McCleary, 2003](https://python-advanced.quantecon.org/zreferences.html#id238)]) that\n", + "extend his classic 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model of tax smoothing.\n", "\n", - "Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model is about a government that borrows and lends in order\n", + "Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model is about a government that borrows and lends in order\n", "to help it minimize an intertemporal measure of distortions caused by\n", "taxes.\n", "\n", - "Technically, Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id136)] model looks a lot like a consumption-smoothing model.\n", + "Technically, Barro’s 1979 [[Barro, 1979](https://python-advanced.quantecon.org/zreferences.html#id137)] model looks a lot like a consumption-smoothing model.\n", "\n", "Our generalizations of his 1979 model will also look\n", "like souped-up consumption-smoothing models.\n", @@ -64,7 +64,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc8ba0f9", + "id": "33d068ac", "metadata": { "hide-output": false }, @@ -77,7 +77,7 @@ }, { "cell_type": "markdown", - "id": "4bd799bb", + "id": "0fdb7b5d", "metadata": {}, "source": [ "## Roll-Over Risk\n", @@ -129,7 +129,7 @@ }, { "cell_type": "markdown", - "id": "f966e2b3", + "id": "a520d18c", "metadata": {}, "source": [ "## A Dead End\n", @@ -167,7 +167,7 @@ }, { "cell_type": "markdown", - "id": "03f857b6", + "id": "97562cc3", "metadata": {}, "source": [ "## Better Representation of Roll-Over Risk\n", @@ -221,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71da0e0c", + "id": "7db38e49", "metadata": { "hide-output": false }, @@ -281,7 +281,7 @@ }, { "cell_type": "markdown", - "id": "0f732747", + "id": "cbef6074", "metadata": {}, "source": [ "This model is simulated below, using the same process for $ G_t $ as\n", @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "56a86528", + "id": "d4f3a7f9", "metadata": { "hide-output": false }, @@ -332,7 +332,7 @@ }, { "cell_type": "markdown", - "id": "f0527a98", + "id": "88c43293", "metadata": {}, "source": [ "We can adjust the model so that, rather than having debt fluctuate\n", @@ -346,7 +346,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb4f0925", + "id": "e13f6303", "metadata": { "hide-output": false }, @@ -387,7 +387,7 @@ }, { "cell_type": "markdown", - "id": "02ff4f58", + "id": "37f66de7", "metadata": {}, "source": [ "With a lower interest rate, the government has an incentive to\n", @@ -403,7 +403,7 @@ } ], "metadata": { - "date": 1724218396.207536, + "date": 1728369870.4603348, "filename": "tax_smoothing_3.md", "kernelspec": { "display_name": "Python", diff --git a/troubleshooting.ipynb b/troubleshooting.ipynb index 9ed2eca..879b0de 100644 --- a/troubleshooting.ipynb +++ b/troubleshooting.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2d8d6df8", + "id": "65f7e960", "metadata": {}, "source": [ "\n", @@ -11,7 +11,7 @@ }, { "cell_type": "markdown", - "id": "2ecaae8a", + "id": "d38dd687", "metadata": {}, "source": [ "# Troubleshooting\n", @@ -21,7 +21,7 @@ }, { "cell_type": "markdown", - "id": "3393500f", + "id": "d13a1fd4", "metadata": {}, "source": [ "## Fixing Your Local Environment\n", @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "ef06dd65", + "id": "56396bbe", "metadata": {}, "source": [ "## Reporting an Issue\n", @@ -80,7 +80,7 @@ } ], "metadata": { - "date": 1724218396.2116735, + "date": 1728369870.4645507, "filename": "troubleshooting.md", "kernelspec": { "display_name": "Python", diff --git a/un_insure.ipynb b/un_insure.ipynb index 78debff..7c480bb 100644 --- a/un_insure.ipynb +++ b/un_insure.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "30c2552c", + "id": "791e0fc7", "metadata": {}, "source": [ "# Optimal Unemployment Insurance" @@ -10,16 +10,16 @@ }, { "cell_type": "markdown", - "id": "6501a49d", + "id": "b6488c6a", "metadata": {}, "source": [ "## Overview\n", "\n", "This lecture describes a model of optimal unemployment\n", - "insurance created by Shavell and Weiss (1979) [[Shavell and Weiss, 1979](https://python-advanced.quantecon.org/zreferences.html#id6)].\n", + "insurance created by Shavell and Weiss (1979) [[Shavell and Weiss, 1979](https://python-advanced.quantecon.org/zreferences.html#id7)].\n", "\n", "We use recursive techniques of\n", - "Hopenhayn and Nicolini (1997) [[Hopenhayn and Nicolini, 1997](https://python-advanced.quantecon.org/zreferences.html#id5)] to\n", + "Hopenhayn and Nicolini (1997) [[Hopenhayn and Nicolini, 1997](https://python-advanced.quantecon.org/zreferences.html#id6)] to\n", "compute optimal insurance plans for Shavell and\n", "Weiss’s model.\n", "\n", @@ -28,7 +28,7 @@ }, { "cell_type": "markdown", - "id": "56f88821", + "id": "9c278b61", "metadata": {}, "source": [ "## Shavell and Weiss’s Model\n", @@ -88,7 +88,7 @@ }, { "cell_type": "markdown", - "id": "fe3e40dc", + "id": "4021b61f", "metadata": {}, "source": [ "### Autarky\n", @@ -160,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "f47957f6", + "id": "9ec59b40", "metadata": {}, "source": [ "### Full Information\n", @@ -274,7 +274,7 @@ }, { "cell_type": "markdown", - "id": "74a20485", + "id": "230c0f26", "metadata": {}, "source": [ "### Incentive Problem\n", @@ -340,13 +340,13 @@ }, { "cell_type": "markdown", - "id": "3d3f2d98", + "id": "86239a1e", "metadata": {}, "source": [ "## Private Information\n", "\n", - "Following Shavell and Weiss (1979) [[Shavell and Weiss, 1979](https://python-advanced.quantecon.org/zreferences.html#id6)] and\n", - "Hopenhayn and Nicolini (1997) [[Hopenhayn and Nicolini, 1997](https://python-advanced.quantecon.org/zreferences.html#id5)], now assume that the unemployment insurance agency cannot\n", + "Following Shavell and Weiss (1979) [[Shavell and Weiss, 1979](https://python-advanced.quantecon.org/zreferences.html#id7)] and\n", + "Hopenhayn and Nicolini (1997) [[Hopenhayn and Nicolini, 1997](https://python-advanced.quantecon.org/zreferences.html#id6)], now assume that the unemployment insurance agency cannot\n", "observe or enforce $ a $, though it can observe and control $ c $.\n", "\n", "The worker is free to choose $ a $, which puts expression [(39.4)](#equation-eq-hugo4), the worker’s first-order condition under autarky,\n", @@ -377,7 +377,7 @@ "- A common finding is that optimal plans do not involve\n", " lotteries, because convexity of the constraint set is a sufficient\n", " but not necessary condition for convexity of the cost function. \n", - "- Following Hopenhayn and Nicolini (1997) [[Hopenhayn and Nicolini, 1997](https://python-advanced.quantecon.org/zreferences.html#id5)], we therefore proceed under the assumption that $ C(V) $ is strictly convex in order to characterize the optimal solution. \n", + "- Following Hopenhayn and Nicolini (1997) [[Hopenhayn and Nicolini, 1997](https://python-advanced.quantecon.org/zreferences.html#id6)], we therefore proceed under the assumption that $ C(V) $ is strictly convex in order to characterize the optimal solution. \n", "\n", "\n", "Let $ \\eta $ be the multiplier on constraint [(39.4)](#equation-eq-hugo4), while\n", @@ -445,7 +445,7 @@ }, { "cell_type": "markdown", - "id": "ace26ba4", + "id": "91f51e01", "metadata": {}, "source": [ "### Computational Details\n", @@ -534,7 +534,7 @@ }, { "cell_type": "markdown", - "id": "09d6e54e", + "id": "c8b53ae5", "metadata": {}, "source": [ "### Python Computations\n", @@ -547,7 +547,7 @@ { "cell_type": "code", "execution_count": null, - "id": "873924b3", + "id": "33eb7e87", "metadata": { "hide-output": false }, @@ -560,7 +560,7 @@ }, { "cell_type": "markdown", - "id": "ac23b58c", + "id": "15ddf833", "metadata": {}, "source": [ "We first create a class to set up a particular parametrization." @@ -569,7 +569,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f0aeb257", + "id": "173cfb45", "metadata": { "hide-output": false }, @@ -592,7 +592,7 @@ }, { "cell_type": "markdown", - "id": "a2e70779", + "id": "f8cc7bb4", "metadata": {}, "source": [ "### Parameter Values\n", @@ -607,7 +607,7 @@ { "cell_type": "code", "execution_count": null, - "id": "26c85dbd", + "id": "f80cd8ee", "metadata": { "hide-output": false }, @@ -633,7 +633,7 @@ }, { "cell_type": "markdown", - "id": "8787ca41", + "id": "65171b5b", "metadata": {}, "source": [ "Recall that under autarky the value for an unemployed worker\n", @@ -672,7 +672,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9ef9d11a", + "id": "76da6d44", "metadata": { "hide-output": false }, @@ -691,7 +691,7 @@ }, { "cell_type": "markdown", - "id": "26cd67ab", + "id": "f1526497", "metadata": {}, "source": [ "Since the calibration exercise is to match the hazard rate under autarky to the data, we must find an interest rate $ r $ to match `p(a,r) = 0.1`.\n", @@ -704,7 +704,7 @@ { "cell_type": "code", "execution_count": null, - "id": "582e75a4", + "id": "b824ce28", "metadata": { "hide-output": false }, @@ -722,7 +722,7 @@ }, { "cell_type": "markdown", - "id": "3155993b", + "id": "bac94695", "metadata": {}, "source": [ "Now, let us create an instance of the model with our parametrization" @@ -731,7 +731,7 @@ { "cell_type": "code", "execution_count": null, - "id": "47bfdb21", + "id": "cbe12214", "metadata": { "hide-output": false }, @@ -745,7 +745,7 @@ }, { "cell_type": "markdown", - "id": "34280611", + "id": "fe2cb7af", "metadata": {}, "source": [ "We want to compute an $ r $ that is consistent with the hazard rate 0.1 in autarky.\n", @@ -756,7 +756,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a2f8370", + "id": "45be8d3a", "metadata": { "hide-output": false }, @@ -773,7 +773,7 @@ }, { "cell_type": "markdown", - "id": "55f8e5cd", + "id": "c8660693", "metadata": {}, "source": [ "Now that we have calibrated our interest rate $ r $, we can continue with solving the model with private information." @@ -781,14 +781,14 @@ }, { "cell_type": "markdown", - "id": "c764d973", + "id": "09a01011", "metadata": {}, "source": [ "### Computation under Private Information\n", "\n", - "Our approach to solving the full model is a variant on Judd (1998) [[Judd, 1998](https://python-advanced.quantecon.org/zreferences.html#id166)], who uses a polynomial to approximate the value function and a numerical optimizer to perform the optimization at each iteration.\n", + "Our approach to solving the full model is a variant on Judd (1998) [[Judd, 1998](https://python-advanced.quantecon.org/zreferences.html#id167)], who uses a polynomial to approximate the value function and a numerical optimizer to perform the optimization at each iteration.\n", "\n", - "In contrast, we will use cubic splines to interpolate across a pre-set grid of points to approximate the value function. For further details of the Judd (1998) [[Judd, 1998](https://python-advanced.quantecon.org/zreferences.html#id166)] method, see [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id173)], Section 5.7.\n", + "In contrast, we will use cubic splines to interpolate across a pre-set grid of points to approximate the value function. For further details of the Judd (1998) [[Judd, 1998](https://python-advanced.quantecon.org/zreferences.html#id167)] method, see [[Ljungqvist and Sargent, 2018](https://python-advanced.quantecon.org/zreferences.html#id174)], Section 5.7.\n", "\n", "Our strategy involves finding a function $ C(V) $ – the expected cost of giving the worker value $ V $ – that satisfies the Bellman equation:\n", "\n", @@ -806,7 +806,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bd0e8b3b", + "id": "96ea01bd", "metadata": { "hide-output": false }, @@ -836,7 +836,7 @@ }, { "cell_type": "markdown", - "id": "3fed78cf", + "id": "e2e6724f", "metadata": {}, "source": [ "With these analytical solutions for optimal $ c $ and $ a $ in hand, we can reduce the minimization to [(39.12)](#equation-eq-hugo23) in the single variable\n", @@ -847,7 +847,7 @@ }, { "cell_type": "markdown", - "id": "216e0e05", + "id": "f89fd3bf", "metadata": {}, "source": [ "### Algorithm\n", @@ -866,7 +866,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7f78ce0d", + "id": "b55c3687", "metadata": { "hide-output": false }, @@ -919,7 +919,7 @@ }, { "cell_type": "markdown", - "id": "02481559", + "id": "4b15320f", "metadata": {}, "source": [ "The below code executes steps 4 and 5 in the Algorithm until convergence to a function $ C^*(V) $." @@ -928,7 +928,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f01b2e1", + "id": "9220f9eb", "metadata": { "hide-output": false }, @@ -956,7 +956,7 @@ }, { "cell_type": "markdown", - "id": "0831a256", + "id": "e435acc6", "metadata": {}, "source": [ "## Outcomes\n", @@ -967,7 +967,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad149680", + "id": "bbc4809a", "metadata": { "hide-output": false }, @@ -993,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "90dbd8d4", + "id": "9656a8e1", "metadata": {}, "source": [ "### Replacement Ratios and Continuation Values\n", @@ -1008,7 +1008,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0bb17c8d", + "id": "e91715d3", "metadata": { "hide-output": false }, @@ -1028,7 +1028,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1854a8eb", + "id": "6fa0d23e", "metadata": { "hide-output": false }, @@ -1045,7 +1045,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e59b3728", + "id": "5e38f378", "metadata": { "hide-output": false }, @@ -1081,7 +1081,7 @@ }, { "cell_type": "markdown", - "id": "bb68e460", + "id": "d1272e16", "metadata": {}, "source": [ "For an initial promised value $ V^u = V_{\\rm aut} $, the planner chooses the autarky level of $ 0 $ for the replacement ratio and instructs the worker to search at the autarky search intensity, regardless of the duration of unemployment\n", @@ -1091,7 +1091,7 @@ }, { "cell_type": "markdown", - "id": "73a2ab2f", + "id": "75bd2dec", "metadata": {}, "source": [ "### Interpretations\n", @@ -1145,7 +1145,7 @@ } ], "metadata": { - "date": 1724218396.4506128, + "date": 1728369870.5080612, "filename": "un_insure.md", "kernelspec": { "display_name": "Python", diff --git a/zreferences.ipynb b/zreferences.ipynb index b43e865..018cd7b 100644 --- a/zreferences.ipynb +++ b/zreferences.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8a3c5a44", + "id": "f068c11d", "metadata": {}, "source": [ "\n", @@ -11,321 +11,324 @@ }, { "cell_type": "markdown", - "id": "65664bc5", + "id": "3f64bbad", "metadata": {}, "source": [ "# References\n", "\n", - "\n", + "\n", "\\[Abr88\\] Dilip Abreu. On the theory of infinitely repeated games with discounting. *Econometrica*, 56:383–396, 1988.\n", "\n", - "\n", + "\n", "\\[APS90\\] Dilip Abreu, David Pearce, and Ennio Stacchetti. Toward a theory of discounted repeated games with imperfect monitoring. *Econometrica*, 58(5):1041–1063, September 1990.\n", "\n", - "\n", + "\n", "\\[AMSSeppala02\\] S Rao Aiyagari, Albert Marcet, Thomas J Sargent, and Juha Seppälä. Optimal taxation without state-contingent debt. *Journal of Political Economy*, 110(6):1220–1254, 2002.\n", "\n", - "\n", + "\n", "\\[AMS02\\] Franklin Allen, Stephen Morris, and Hyun Song Shin. Beauty contests, bubbles, and iterated expectations in asset markets. *mimeo*, 2002.\n", "\n", - "\n", + "\n", "\\[AHMS96\\] Evan Anderson, Lars Peter Hansen, Ellen R. McGrattan, and Thomas J. Sargent. Mechanics of forming and estimating dynamic linear economies. In Hans M. Amman, David A. Kendrick, and John Rust, editors, *Handbook of computational economics*, 171–252. Elsevier Science, North-Holland, 1996.\n", "\n", - "\n", + "\n", "\\[AHS03\\] Evan W. Anderson, Lars Peter Hansen, and Thomas J. Sargent. A Quartet of Semigroups for Model Specification, Robustness, Prices of Risk, and Model Detection. *Journal of the European Economic Association*, 1(1):68–123, March 2003. URL: [https://ideas.repec.org/a/tpr/jeurec/v1y2003i1p68-123.html](https://ideas.repec.org/a/tpr/jeurec/v1y2003i1p68-123.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[Are08\\] Cristina Arellano. Default risk and income fluctuations in emerging economies. *The American Economic Review*, pages 690–712, 2008.\n", "\n", - "\n", + "\n", "\\[AP91\\] Papoulis Athanasios and S Unnikrishna Pillai. *Probability, random variables, and stochastic processes*. Mc-Graw Hill, 1991.\n", "\n", - "\n", + "\n", "\\[AP11\\] Orazio P Attanasio and Nicola Pavoni. Risk sharing in private information models with asset accumulation: explaining the excess smoothness of consumption. *Econometrica*, 79(4):1027–1068, 2011.\n", "\n", - "\n", + "\n", "\\[BCZ14\\] David Backus, Mikhail Chernov, and Stanley Zin. Sources of Entropy in Representative Agent Models. *Journal of Finance*, 69(1):51–99, February 2014. URL: [https://ideas.repec.org/a/bla/jfinan/v69y2014i1p51-99.html](https://ideas.repec.org/a/bla/jfinan/v69y2014i1p51-99.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[BHS09\\] Francisco Barillas, Lars Peter Hansen, and Thomas J. Sargent. Doubts or variability? *Journal of Economic Theory*, 144(6):2388–2418, November 2009. URL: [https://ideas.repec.org/a/eee/jetheo/v144y2009i6p2388-2418.html](https://ideas.repec.org/a/eee/jetheo/v144y2009i6p2388-2418.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[Bar79\\] Robert J Barro. On the Determination of the Public Debt. *Journal of Political Economy*, 87(5):940–971, 1979.\n", "\n", - "\n", + "\n", "\\[Bar99\\] Robert J Barro. Determinants of democracy. *Journal of Political economy*, 107(S6):S158–S183, 1999.\n", "\n", - "\n", + "\n", "\\[BM03\\] Robert J Barro and Rachel McCleary. Religion and economic growth. Technical Report, National Bureau of Economic Research, 2003.\n", "\n", - "\n", + "\n", "\\[BEGS17\\] Anmol Bhandari, David Evans, Mikhail Golosov, and Thomas J. Sargent. Fiscal Policy and Debt Management with Incomplete Markets. *The Quarterly Journal of Economics*, 132(2):617–663, 2017.\n", "\n", - "\n", + "\n", "\\[BCG18\\] Alberto Bisin, Gian Luca Clementi, and Piero Gottardi. Capital and hedging demand with incomplete markets. Technical Report, NYU and EUI, 2018.\n", "\n", - "\n", + "\n", "\\[BL92\\] Fischer Black and Robert Litterman. Global portfolio optimization. *Financial analysts journal*, 48(5):28–43, 1992.\n", "\n", - "\n", + "\n", "\\[Buc04\\] James A. Bucklew. *An Introduction to Rare Event Simulation*. Springer Verlag, New York, 2004.\n", "\n", - "\n", + "\n", "\\[Cag56\\] Philip Cagan. The monetary dynamics of hyperinflation. In Milton Friedman, editor, *Studies in the Quantity Theory of Money*, pages 25–117. University of Chicago Press, Chicago, 1956.\n", "\n", - "\n", + "\n", "\\[Cal78\\] Guillermo A. Calvo. On the time consistency of optimal policy in a monetary economy. *Econometrica*, 46(6):1411–1428, 1978.\n", "\n", - "\n", + "\n", "\\[CR83\\] Gary Chamberlain and Michael Rothschild. Arbitrage, Factor Structure, and Mean-Variance Analysis on Large Asset Markets. *Econometrica*, 51(5):1281–1304, September 1983. URL: [https://ideas.repec.org/a/ecm/emetrp/v51y1983i5p1281-304.html](https://ideas.repec.org/a/ecm/emetrp/v51y1983i5p1281-304.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[Cha98\\] Roberto Chang. Credible monetary policy in an infinite horizon model: recursive approaches. *Journal of Economic Theory*, 81(2):431–461, 1998.\n", "\n", - "\n", + "\n", "\\[CK90\\] Varadarajan V Chari and Patrick J Kehoe. Sustainable plans. *Journal of Political Economy*, pages 783–802, 1990.\n", "\n", - "\n", + "\n", "\\[Coa37\\] Ronald Harry Coase. The nature of the firm. *economica*, 4(16):386–405, 1937.\n", "\n", - "\n", + "\n", "\\[Coc05\\] John H. Cochrane. *Asset Pricing: revised edition*. Princeton University Press, Princeton, New Jersey, 2005.\n", "\n", - "\n", + "\n", "\\[CC08\\] J. D. Cryer and K-S. Chan. *Time Series Analysis*. Springer, 2nd edition edition, 2008.\n", "\n", - "\n", + "\n", "\\[DJ92\\] Raymond J Deneckere and Kenneth L Judd. Cyclical and chaotic behavior in a dynamic equilibrium model, with implications for fiscal policy. *Cycles and chaos in economic equilibrium*, pages 308–329, 1992.\n", "\n", - "\n", + "\n", "\\[Dic75\\] J Dickey. Bayesian alternatives to the f-test and least-squares estimate in the normal linear model. In S.E. Fienberg and A. Zellner, editors, *Studies in Bayesian econometrics and statistics*, pages 515–554. North-Holland, Amsterdam, 1975.\n", "\n", - "\n", + "\n", "\\[DVGC99\\] JBR Do Val, JC Geromel, and OLV Costa. Solutions for the linear-quadratic control problem of markov jump linear systems. *Journal of Optimization Theory and Applications*, 103(2):283–311, 1999.\n", "\n", - "\n", + "\n", "\\[Fri56\\] M. Friedman. *A Theory of the Consumption Function*. Princeton University Press, 1956.\n", "\n", - "\n", + "\n", "\\[Gal37\\] Albert Gallatin. Report on the finances**, november, 1807. In *Reports of the Secretary of the Treasury of the United States, Vol 1*. Government printing office, Washington, DC, 1837.\n", "\n", - "\n", + "\n", "\\[GS89\\] Itzhak Gilboa and David Schmeidler. Maxmin Expected Utility with Non-Unique Prior. *Journal of Mathematical Economics*, 18(2):141–153, apr 1989.\n", "\n", - "\n", + "\n", "\\[Hal78\\] Robert E Hall. Stochastic Implications of the Life Cycle-Permanent Income Hypothesis: Theory and Evidence. *Journal of Political Economy*, 86(6):971–987, 1978.\n", "\n", - "\n", + "\n", "\\[HS08a\\] L P Hansen and T J Sargent. *Robustness*. Princeton University Press, 2008.\n", "\n", - "\n", + "\n", "\\[Han12\\] Lars Peter Hansen. Dynamic Valuation Decomposition Within Stochastic Economies. *Econometrica*, 80(3):911–967, May 2012. URL: [https://ideas.repec.org/a/ecm/emetrp/v80y2012i3p911-967.html](https://ideas.repec.org/a/ecm/emetrp/v80y2012i3p911-967.html), [doi:10.3982/ECTA8070](https://doi.org/10.3982/ECTA8070).\n", "\n", - "\n", + "\n", "\\[HJ91\\] Lars Peter Hansen and Ravi Jagannathan. Implications of Security Market Data for Models of Dynamic Economies. *Journal of Political Economy*, 99(2):225–262, April 1991. URL: [https://ideas.repec.org/a/ucp/jpolec/v99y1991i2p225-62.html](https://ideas.repec.org/a/ucp/jpolec/v99y1991i2p225-62.html), [doi:10.1086/261749](https://doi.org/10.1086/261749).\n", "\n", - "\n", + "\n", "\\[HR87\\] Lars Peter Hansen and Scott F Richard. The Role of Conditioning Information in Deducing Testable. *Econometrica*, 55(3):587–613, May 1987.\n", "\n", - "\n", + "\n", "\\[HS80\\] Lars Peter Hansen and Thomas J Sargent. Formulating and estimating dynamic linear rational expectations models. *Journal of Economic Dynamics and control*, 2:7–46, 1980.\n", "\n", - "\n", + "\n", "\\[HS00\\] Lars Peter Hansen and Thomas J Sargent. Wanting robustness in macroeconomics. *Manuscript, Department of Economics, Stanford University.*, 2000.\n", "\n", - "\n", + "\n", "\\[HS08b\\] Lars Peter Hansen and Thomas J Sargent. *Robustness*. Princeton University Press, 2008.\n", "\n", - "\n", + "\n", "\\[HS01\\] Lars Peter Hansen and Thomas J. Sargent. Robust control and model uncertainty. *American Economic Review*, 91(2):60–66, 2001.\n", "\n", - "\n", + "\n", "\\[HS13\\] Lars Peter Hansen and Thomas J. Sargent. *Recursive Linear Models of Dynamic Economics*. Princeton University Press, Princeton, New Jersey, 2013.\n", "\n", - "\n", + "\n", "\\[HS24\\] Lars Peter Hansen and Thomas J. Sargent. Risk, uncertainty, and value. University of Chicago and NYU manuscript, 2024.\n", "\n", - "\n", + "\n", "\\[HST99\\] Lars Peter Hansen, Thomas J. Sargent, and Thomas D. Tallarini. Robust Permanent Income and Pricing. *Review of Economic Studies*, 66(4):873–907, 1999. URL: [https://ideas.repec.org/a/oup/restud/v66y1999i4p873-907..html](https://ideas.repec.org/a/oup/restud/v66y1999i4p873-907..html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[HK79\\] J. Michael Harrison and David M. Kreps. Martingales and arbitrage in multiperiod securities markets. *Journal of Economic Theory*, 20(3):381–408, June 1979. URL: [https://ideas.repec.org/a/eee/jetheo/v20y1979i3p381-408.html](https://ideas.repec.org/a/eee/jetheo/v20y1979i3p381-408.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[HK85\\] Elhanan Helpman and Paul Krugman. *Market structure and international trade*. MIT Press Cambridge, 1985.\n", "\n", - "\n", + "\n", "\\[HLL96\\] O Hernandez-Lerma and J B Lasserre. *Discrete-Time Markov Control Processes: Basic Optimality Criteria*. Number Vol 1 in Applications of Mathematics Stochastic Modelling and Applied Probability. Springer, 1996.\n", "\n", - "\n", + "\n", "\\[HN97\\] Hugo A Hopenhayn and Juan Pablo Nicolini. Optimal Unemployment Insurance. *Journal of Political Economy*, 105(2):412–438, April 1997. URL: [https://ideas.repec.org/a/ucp/jpolec/v105y1997i2p412-38.html](https://ideas.repec.org/a/ucp/jpolec/v105y1997i2p412-38.html), [doi:10.1086/262078](https://doi.org/10.1086/262078).\n", "\n", - "\n", + "\n", "\\[HR93\\] Hugo A Hopenhayn and Richard Rogerson. Job Turnover and Policy Evaluation: A General Equilibrium Analysis. *Journal of Political Economy*, 101(5):915–938, 1993.\n", "\n", - "\n", + "\n", "\\[Jac73\\] D. H. Jacobson. Optimal stochastic linear systems with exponential performance criteria and their relation to differential games. *IEEE Transactions on Automatic Control*, 18(2):124–131, 1973.\n", "\n", - "\n", + "\n", "\\[Jud98\\] K L Judd. *Numerical Methods in Economics*. Scientific and Engineering. MIT Press, 1998.\n", "\n", - "\n", + "\n", "\\[Jud85\\] Kenneth L Judd. On the performance of patents. *Econometrica*, pages 567–585, 1985.\n", "\n", - "\n", + "\n", "\\[JYC03\\] Kenneth L. Judd, Sevin Yeltekin, and James Conklin. Computing Supergame Equilibria. *Econometrica*, 71(4):1239–1254, 07 2003. URL: [https://ideas.repec.org/a/ecm/emetrp/v71y2003i4p1239-1254.html](https://ideas.repec.org/a/ecm/emetrp/v71y2003i4p1239-1254.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[Kas00\\] Kenneth Kasa. Forecasting the forecasts of others in the frequency domain. *Review of Economic Dynamics*, 3:726–756, 2000.\n", "\n", - "\n", + "\n", "\\[KNS18\\] Tomoo Kikuchi, Kazuo Nishimura, and John Stachurski. Span of control, transaction costs, and the structure of production chains. *Theoretical Economics*, 13(2):729–760, 2018.\n", "\n", - "\n", + "\n", "\\[Kni21\\] Frank H. Knight. *Risk, Uncertainty, and Profit*. Houghton Mifflin, 1921.\n", "\n", - "\n", + "\n", "\\[Kre81\\] David M. Kreps. Arbitrage and equilibrium in economies with infinitely many commodities. *Journal of Mathematical Economics*, 8(1):15–35, March 1981. URL: [https://ideas.repec.org/a/eee/mateco/v8y1981i1p15-35.html](https://ideas.repec.org/a/eee/mateco/v8y1981i1p15-35.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[KP80\\] Finn E Kydland and Edward C Prescott. Dynamic optimal taxation, rational expectations and optimal control. *Journal of Economic Dynamics and Control*, 2:79–91, 1980.\n", "\n", - "\n", + "\n", "\\[LM94\\] A Lasota and M C MacKey. *Chaos, Fractals, and Noise: Stochastic Aspects of Dynamics*. Applied Mathematical Sciences. Springer-Verlag, 1994.\n", "\n", - "\n", + "\n", "\\[Lea78\\] Edward E Leamer. *Specification searches: Ad hoc inference with nonexperimental data*. Volume 53. John Wiley & Sons Incorporated, 1978.\n", "\n", - "\n", + "\n", "\\[LWY13\\] Eric M. Leeper, Todd B. Walker, and Shu‐Chun Susan Yang. Fiscal foresight and information flows. *Econometrica*, 81(3):1115–1145, May 2013.\n", "\n", - "\n", + "\n", "\\[LS18\\] L Ljungqvist and T J Sargent. *Recursive Macroeconomic Theory*. MIT Press, 4 edition, 2018.\n", "\n", - "\n", + "\n", "\\[Luc87\\] Robert E Lucas. *Models of business cycles*. Volume 26. Oxford Blackwell, 1987.\n", "\n", - "\n", + "\n", "\\[Luc78\\] Robert E Lucas, Jr. Asset prices in an exchange economy. *Econometrica: Journal of the Econometric Society*, 46(6):1429–1445, 1978.\n", "\n", - "\n", + "\n", "\\[LS83\\] Robert E Lucas, Jr. and Nancy L Stokey. Optimal Fiscal and Monetary Policy in an Economy without Capital. *Journal of monetary Economics*, 12(3):55–93, 1983.\n", "\n", - "\n", + "\n", "\\[MMR06\\] Fabio Maccheroni, Massimo Marinacci, and Aldo Rustichini. Ambiguity Aversion, Robustness, and the Variational Representation of Preferences. *Econometrica*, 74(6):1147–1498, 2006.\n", "\n", - "\n", + "\n", "\\[MT09\\] S P Meyn and R L Tweedie. *Markov Chains and Stochastic Stability*. Cambridge University Press, 2009.\n", "\n", - "\n", + "\n", "\\[MF02\\] Mario J Miranda and P L Fackler. *Applied Computational Economics and Finance*. Cambridge: MIT Press, 2002.\n", "\n", - "\n", + "\n", "\\[MM58\\] Franco Modigliani and Merton H. Miller. Corporation finance and the theory of investment. *American Economic Review*, XLVIII(3):261–297, 1958.\n", "\n", - "\n", + "\n", "\\[Mut60\\] John F Muth. Optimal properties of exponentially weighted forecasts. *Journal of the american statistical association*, 55(290):299–306, 1960.\n", "\n", - "\n", + "\n", "\\[Orf88\\] Sophocles J Orfanidis. *Optimum Signal Processing: An Introduction*. McGraw Hill Publishing, New York, New York, 1988.\n", "\n", - "\n", + "\n", "\\[PCL86\\] Joseph Pearlman, David Currie, and Paul Levine. Rational Expectations Models with Private Information. *Economic Modelling*, 3(2):90–105, 1986.\n", "\n", - "\n", + "\n", "\\[PS05\\] Joseph G. Pearlman and Thomas J. Sargent. Knowing the Forecasts of Others. *Review of Economic Dynamics*, 8(2):480–497, April 2005. URL: [https://ideas.repec.org/a/red/issued/v8y2005i2p480-497.html](https://ideas.repec.org/a/red/issued/v8y2005i2p480-497.html), [doi:10.1016/j.red.2004.10.011](https://doi.org/10.1016/j.red.2004.10.011).\n", "\n", - "\n", + "\n", "\\[Put05\\] Martin L Puterman. *Markov decision processes: discrete stochastic dynamic programming*. John Wiley & Sons, 2005.\n", "\n", - "\n", + "\n", "\\[Ram27\\] F. P. Ramsey. A Contribution to the theory of taxation. *Economic Journal*, 37(145):47–61, 1927.\n", "\n", - "\n", + "\n", "\\[REL75\\] Jr. Robert E. Lucas. An equilibrium model of the business cycle. *Journal of Political Economy*, 83:1113–1144, 1975.\n", "\n", - "\n", + "\n", "\\[Rom05\\] Steven Roman. *Advanced linear algebra*. Volume 3. Springer, 2005.\n", "\n", - "\n", + "\n", "\\[RMS94\\] Sherwin Rosen, Kevin M Murphy, and Jose A Scheinkman. Cattle cycles. *Journal of Political Economy*, 102(3):468–492, 1994.\n", "\n", - "\n", + "\n", "\\[Ros78\\] Stephen A Ross. A Simple Approach to the Valuation of Risky Streams. *The Journal of Business*, 51(3):453–475, July 1978. URL: [https://ideas.repec.org/a/ucp/jnlbus/v51y1978i3p453-75.html](https://ideas.repec.org/a/ucp/jnlbus/v51y1978i3p453-75.html).\n", "\n", - "\n", + "\n", "\\[Ros76\\] Stephen A. Ross. The arbitrage theory of capital asset pricing. *Journal of Economic Theory*, 13(3):341–360, December 1976. URL: [https://ideas.repec.org/a/eee/jetheo/v13y1976i3p341-360.html](https://ideas.repec.org/a/eee/jetheo/v13y1976i3p341-360.html), [doi:](https://doi.org/).\n", "\n", - "\n", + "\n", "\\[Roz67\\] Y. A. Rozanov. *Stationary Random Processes*. Holden-Day, San Francisco, 1967.\n", "\n", - "\n", + "\n", "\\[Rus96\\] John Rust. Numerical dynamic programming in economics. *Handbook of computational economics*, 1:619–729, 1996.\n", "\n", - "\n", + "\n", "\\[RR04\\] Jaewoo Ryoo and Sherwin Rosen. The engineering labor market. *Journal of political economy*, 112(S1):S110–S140, 2004.\n", "\n", - "\n", + "\n", "\\[SHR91\\] Thomas Sargent, Lars Peter Hansen, and Will Roberts. Observable implications of present value budget balance. In *Rational Expectations Econometrics*. Westview Press, 1991.\n", "\n", - "\n", + "\n", "\\[Sar77\\] Thomas J Sargent. The Demand for Money During Hyperinflations under Rational Expectations: I. *International Economic Review*, 18(1):59–82, February 1977.\n", "\n", - "\n", + "\n", "\\[Sar87\\] Thomas J Sargent. *Macroeconomic Theory*. Academic Press, New York, 2nd edition, 1987.\n", "\n", - "\n", + "\n", + "\\[SW73\\] Thomas J Sargent and Neil Wallace. The stability of models of money and growth with perfect foresight. *Econometrica: Journal of the Econometric Society*, pages 1043–1048, 1973.\n", + "\n", + "\n", "\\[Sar91\\] Thomas J. Sargent. Equilibrium with signal extraction from endogenous variables. *Journal of Economic Dynamics and Control*, 15:245–273, 1991.\n", "\n", - "\n", + "\n", "\\[SW49\\] Claude E. Shannon and Warren Weaver. *The Mathematical Theory of Communication*. University of Illinois Press, Urbana, 1949.\n", "\n", - "\n", + "\n", "\\[SW79\\] Steven Shavell and Laurence Weiss. The optimal payment of unemployment insurance benefits over time. *Journal of political Economy*, 87(6):1347–1362, 1979.\n", "\n", - "\n", + "\n", "\\[Shi95\\] A N Shiriaev. *Probability*. Graduate texts in mathematics. Springer. Springer, 2nd edition, 1995.\n", "\n", - "\n", + "\n", "\\[Sin87\\] Kenneth J. Singleton. Asset prices in a time-series model with disparately informed competitive traders. In William A. Barnett and Kenneth J. Singleton, editors, *New Apprroaches to Monetary Economics*. Cambridge University Press, 1987.\n", "\n", - "\n", + "\n", "\\[SLP89\\] N L Stokey, R E Lucas, and E C Prescott. *Recursive Methods in Economic Dynamics*. Harvard University Press, 1989.\n", "\n", - "\n", + "\n", "\\[Sto89\\] Nancy L Stokey. Reputation and time consistency. *The American Economic Review*, pages 134–139, 1989.\n", "\n", - "\n", + "\n", "\\[Sto91\\] Nancy L. Stokey. Credible public policy. *Journal of Economic Dynamics and Control*, 15(4):627–656, October 1991.\n", "\n", - "\n", + "\n", "\\[SW09\\] Lars E.O. Svensson and Noah Williams. Optimal Monetary Policy under Uncertainty in DSGE Models: A Markov Jump-Linear-Quadratic Approach. In Klaus Schmidt-Hebbel, Carl E. Walsh, Norman Loayza (Series Editor), and Klaus Schmidt-Hebbel (Series, editors, *Monetary Policy under Uncertainty and Learning*, volume 13 of Central Banking, Analysis, and Economic Policies Book Series, chapter 3, pages 077–114. Central Bank of Chile, edition, March 2009.\n", "\n", - "\n", + "\n", "\\[SW+08\\] Lars EO Svensson, Noah Williams, and others. Optimal monetary policy under uncertainty: a markov jump-linear-quadratic approach. *Federal Reserve Bank of St. Louis Review*, 90(4):275–293, 2008.\n", "\n", - "\n", + "\n", "\\[Tal00\\] Thomas D Tallarini. Risk-sensitive real business cycles. *Journal of Monetary Economics*, 45(3):507–532, June 2000.\n", "\n", - "\n", + "\n", "\\[Tow83\\] Robert M. Townsend. Forecasting the forecasts of others. *Journal of Political Economy*, 91:546–588, 1983.\n", "\n", - "\n", + "\n", "\\[Whi63\\] Peter Whittle. *Prediction and regulation by linear least-square methods*. English Univ. Press, 1963.\n", "\n", - "\n", + "\n", "\\[Whi81\\] Peter Whittle. Risk-sensitive linear/quadratic/gaussian control. *Advances in Applied Probability*, 13(4):764–777, 1981.\n", "\n", - "\n", + "\n", "\\[Whi83\\] Peter Whittle. *Prediction and Regulation by Linear Least Squares Methods*. University of Minnesota Press, Minneapolis, Minnesota, 2nd edition, 1983.\n", "\n", - "\n", + "\n", "\\[Whi90\\] Peter Whittle. *Risk-Sensitive Optimal Control*. Wiley, New York, 1990." ] } ], "metadata": { - "date": 1724218396.479934, + "date": 1728369870.5365632, "filename": "zreferences.md", "kernelspec": { "display_name": "Python",