From c8a8827fd280d800845d98dc298afeaa83ccb5a9 Mon Sep 17 00:00:00 2001 From: Humphrey Yang Date: Thu, 19 Feb 2026 21:01:14 +1100 Subject: [PATCH 1/2] embed data into the lecture --- lectures/two_computation.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/lectures/two_computation.md b/lectures/two_computation.md index e9e2c6140..606b3daef 100644 --- a/lectures/two_computation.md +++ b/lectures/two_computation.md @@ -557,7 +557,36 @@ UNIT_GRID = jnp.linspace(0.0, 1.0, N_GRID_SS) AGE_INDICES = jnp.arange(T0 + 2) ``` -We load the age-efficiency profile $\{\varepsilon_t\}$ and the survival probabilities $\{\alpha_t\}$ from data files based on {cite:t}`faber1982life` and {cite:t}`hansen1993cyclical`. +The hidden code cell below defines the age-efficiency profile $\{\varepsilon_t\}$ and the survival probabilities $\{\alpha_t\}$ based on {cite:t}`faber1982life` and {cite:t}`hansen1993cyclical`. + +```{code-cell} ipython3 +:tags: [hide-cell] + +ε_arr = jnp.array([ + 0.59031284, 0.62902188, 0.66773093, 0.70643996, 0.745149, + 0.78385804, 0.82256708, 0.86127611, 0.89998515, 0.92861368, + 0.94716179, 0.9657099, 0.98425792, 1.002806, 1.0211928, + 1.0399022, 1.0584503, 1.0769984, 1.0955465, 1.1056269, + 1.1072398, 1.1088527, 1.1104656, 1.1120784, 1.1136913, + 1.1153042, 1.116917, 1.1185299, 1.1201428, 1.1185299, + 1.1136913, 1.1088527, 1.1040141, 1.0991755, 1.0943368, + 1.0894981, 1.0846595, 1.0798209, 1.0749823, 1.0611115, + 1.0382087, 1.0153058, 0.99240301, 0.96958081 +]) + +α_arr = jnp.array([ + 1.0, 0.99851, 0.99844, 0.99838, 0.99832, 0.99826, 0.9982, + 0.99816, 0.99815, 0.99819, 0.99826, 0.99834, 0.9984, 0.99843, + 0.99841, 0.99835, 0.99828, 0.99818, 0.99807, 0.99794, 0.99778, + 0.99759, 0.99737, 0.99712, 0.99684, 0.99653, 0.99619, 0.9958, + 0.99535, 0.99481, 0.99419, 0.9935, 0.99278, 0.99209, 0.99148, + 0.99088, 0.99021, 0.98942, 0.98851, 0.98746, 0.98625, 0.98495, + 0.9835, 0.98178, 0.97974, 0.97743, 0.97489, 0.97226, 0.96965, + 0.96715, 0.96466, 0.962, 0.95907, 0.9559, 0.95246, 0.94872, + 0.9446, 0.94017, 0.93555, 0.93077, 0.9257, 0.9203, 0.91431, + 0.90742, 0.89948 +]) +``` ```{code-cell} ipython3 --- @@ -566,7 +595,6 @@ mystnb: caption: Age-efficiency profile and survival probabilities name: two_comp_profiles --- -ε_arr, α_arr = jnp.load("eff.npy"), jnp.load("psurv.npy") fig, axs = plt.subplots(1, 2, figsize=(10, 6)) @@ -1239,7 +1267,7 @@ ss1 = ss_target_debt2gdp_exo( ss0.debt2gdp, (τ_a_0, τ_0_0, 0, G_0), (RR_exo, w_exo), hh, tech ) -print(f"\nTerminal Steady State (s ≥ s₃):") +print(f"\nTerminal Steady State (s >= s3):") print(f" Labor tax τ_l = {ss1.τ_l:.4f}") print(f" Benefits θ = 0") print(f" Capital/GDP = {ss1.k2gdp:.4f}") From 5afd03741b0f64942dc00eb86a80722417952a79 Mon Sep 17 00:00:00 2001 From: Humphrey Yang Date: Thu, 19 Feb 2026 21:02:46 +1100 Subject: [PATCH 2/2] updates --- lectures/eff.npy | Bin 480 -> 0 bytes lectures/psurv.npy | Bin 648 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 lectures/eff.npy delete mode 100644 lectures/psurv.npy diff --git a/lectures/eff.npy b/lectures/eff.npy deleted file mode 100644 index e2631234e3c1429cb7a5edaa89b81a89aa79b0e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlV+i=qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= zXCxM+0{I#yCOVor3bhL411`1o#|~V7{K$ThK~mi(g(vn`MPnR!DrJdjNrf)-eD8 diff --git a/lectures/psurv.npy b/lectures/psurv.npy deleted file mode 100644 index bf8ad6c845ab8e7601b30c0998a85c12f664e863..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 648 zcmbV}>r2yd6vkIU%k+hGQ&e!~i=Wz%$V`*zgXSFz)0U-?TH6vcmz#(=tWZM|FQr(9 zMi?bol%XlLu)L&OX&_~klA0~XP=CL(@|J1V*T8?E^X9|zaL&WwoT>xz{jo>ah;l?a zPNCGE)Nlb3PNwqbq!Lc0)?{l^Gn3UCg>uCYPtDLOnXgStJ*#BeV~?-YQ!2@q{C{l} z{VOZ(#3uyxO%pPzQ?mRS9aCIy>VFWry+(~PM)hpn%!}^?r;a2^Fk@NWr9j?FXxuyy z`iarcuYr>?f3>ef7Nu9QxzVhW@^6fn?H=U1v)ry`_r;0Y6MP9wongyiEF^Rp)iUZP%~Gz%eGJo(4POz70o zc%_N$750AU^%sIAeaGDO5rU8y5@Z=7%;n7+bRP(&cv0!80YXjYroxUlgxkWpE5ok{ z2{zk`eO?l{(}VkV>j}g1$c3m@!r_9R@%|=)M`(xJp+-Vnt^c#JdV*a}cU#yELPgiC z$FT~+7W95@Eh2=sP5&OuCFt50P3`G~(0g$$;zWYIdr^dQ1R?XFsxW33;cb&y)agQ) zc73N#7O&n(z{8lIch8RsIAMQe?-Qc{XGP`Jmd64Lz8Y$tUlYJvKPt-d1T@do+fF12 zXl*!W@C*>(-6L0yZ53e9KP_8t<>9$~<#RlY;=o$@EglY$u}h9x9!ra*w&D;TR55?Q P+J;B%@>E2LaSDF{z&AYh