From c99add5a1b27788192879132a876d2a1c9b576a1 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 Aug 2025 01:16:06 +0000 Subject: [PATCH 1/2] Initial plan From 4f7ca0dc095190636f58a966352d4a9a4a0e5c76 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 Aug 2025 01:27:43 +0000 Subject: [PATCH 2/2] Upgrade all HTTP links to HTTPS across 12 lecture files Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/back_prop.md | 2 +- lectures/finite_markov.md | 22 +++++++++++----------- lectures/kalman.md | 6 +++--- lectures/lake_model.md | 2 +- lectures/linear_models.md | 2 +- lectures/lqcontrol.md | 2 +- lectures/markov_perf.md | 6 +++--- lectures/optgrowth.md | 12 ++++++------ lectures/perm_income_cons.md | 4 ++-- lectures/rational_expectations.md | 2 +- lectures/samuelson.md | 4 ++-- lectures/two_auctions.md | 2 +- 12 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lectures/back_prop.md b/lectures/back_prop.md index 6ce9a6dab..9780ef8c3 100644 --- a/lectures/back_prop.md +++ b/lectures/back_prop.md @@ -535,7 +535,7 @@ Image(fig.to_image(format="png")) It is fun to think about how deepening the neural net for the above example affects the quality of approximation -* If the network is too deep, you'll run into the [vanishing gradient problem](http://neuralnetworksanddeeplearning.com/chap5.html) +* If the network is too deep, you'll run into the [vanishing gradient problem](https://neuralnetworksanddeeplearning.com/chap5.html) * Other parameters such as the step size and the number of epochs can be as important or more important than the number of layers in the situation considered in this lecture. * Indeed, since $f$ is a linear function of $x$, a one-layer network with the identity map as an activation would probably work best. diff --git a/lectures/finite_markov.md b/lectures/finite_markov.md index 924358069..0ed914162 100644 --- a/lectures/finite_markov.md +++ b/lectures/finite_markov.md @@ -213,11 +213,11 @@ One natural way to answer questions about Markov chains is to simulate them. (To approximate the probability of event $E$, we can simulate many times and count the fraction of times that $E$ occurs). -Nice functionality for simulating Markov chains exists in [QuantEcon.py](http://quantecon.org/quantecon-py). +Nice functionality for simulating Markov chains exists in [QuantEcon.py](https://quantecon.org/quantecon-py). * Efficient, bundled with lots of other useful routines for handling Markov chains. -However, it's also a good exercise to roll our own routines --- let's do that first and then come back to the methods in [QuantEcon.py](http://quantecon.org/quantecon-py). +However, it's also a good exercise to roll our own routines --- let's do that first and then come back to the methods in [QuantEcon.py](https://quantecon.org/quantecon-py). In these exercises, we'll take the state space to be $S = 0,\ldots, n-1$. @@ -232,7 +232,7 @@ The Markov chain is then constructed as discussed above. To repeat: To implement this simulation procedure, we need a method for generating draws from a discrete distribution. -For this task, we'll use `random.draw` from [QuantEcon](http://quantecon.org/quantecon-py), which works as follows: +For this task, we'll use `random.draw` from [QuantEcon](https://quantecon.org/quantecon-py), which works as follows: ```{code-cell} python3 ψ = (0.3, 0.7) # probabilities over {0, 1} @@ -295,7 +295,7 @@ always close to 0.25, at least for the `P` matrix above. ### Using QuantEcon's Routines -As discussed above, [QuantEcon.py](http://quantecon.org/quantecon-py) has routines for handling Markov chains, including simulation. +As discussed above, [QuantEcon.py](https://quantecon.org/quantecon-py) has routines for handling Markov chains, including simulation. Here's an illustration using the same P as the preceding example @@ -307,7 +307,7 @@ X = mc.simulate(ts_length=1_000_000) np.mean(X == 0) ``` -The [QuantEcon.py](http://quantecon.org/quantecon-py) routine is [JIT compiled](https://python-programming.quantecon.org/numba.html#numba-link) and much faster. +The [QuantEcon.py](https://quantecon.org/quantecon-py) routine is [JIT compiled](https://python-programming.quantecon.org/numba.html#numba-link) and much faster. ```{code-cell} ipython %time mc_sample_path(P, sample_size=1_000_000) # Our homemade code version @@ -557,7 +557,7 @@ $$ It's clear from the graph that this stochastic matrix is irreducible: we can eventually reach any state from any other state. -We can also test this using [QuantEcon.py](http://quantecon.org/quantecon-py)'s MarkovChain class +We can also test this using [QuantEcon.py](https://quantecon.org/quantecon-py)'s MarkovChain class ```{code-cell} python3 P = [[0.9, 0.1, 0.0], @@ -776,7 +776,7 @@ One option is to regard solving system {eq}`eq:eqpsifixed` as an eigenvector pr $\psi$ such that $\psi = \psi P$ is a left eigenvector associated with the unit eigenvalue $\lambda = 1$. -A stable and sophisticated algorithm specialized for stochastic matrices is implemented in [QuantEcon.py](http://quantecon.org/quantecon-py). +A stable and sophisticated algorithm specialized for stochastic matrices is implemented in [QuantEcon.py](https://quantecon.org/quantecon-py). This is the one we recommend: @@ -867,7 +867,7 @@ The result tells us that the fraction of time the chain spends at state $x$ conv (new_interp_sd)= This gives us another way to interpret the stationary distribution --- provided that the convergence result in {eq}`llnfmc0` is valid. -The convergence asserted in {eq}`llnfmc0` is a special case of a law of large numbers result for Markov chains --- see [EDTC](http://johnstachurski.net/edtc.html), section 4.3.4 for some additional information. +The convergence asserted in {eq}`llnfmc0` is a special case of a law of large numbers result for Markov chains --- see [EDTC](https://johnstachurski.net/edtc.html), section 4.3.4 for some additional information. (mc_eg1-2)= ### Example @@ -1322,7 +1322,7 @@ $$ Tauchen's method {cite}`Tauchen1986` is the most common method for approximating this continuous state process with a finite state Markov chain. -A routine for this already exists in [QuantEcon.py](http://quantecon.org/quantecon-py) but let's write our own version as an exercise. +A routine for this already exists in [QuantEcon.py](https://quantecon.org/quantecon-py) but let's write our own version as an exercise. As a first step, we choose @@ -1363,13 +1363,13 @@ The exercise is to write a function `approx_markov(rho, sigma_u, m=3, n=7)` that $\{x_0, \ldots, x_{n-1}\} \subset \mathbb R$ and $n \times n$ matrix $P$ as described above. -* Even better, write a function that returns an instance of [QuantEcon.py's](http://quantecon.org/quantecon-py) MarkovChain class. +* Even better, write a function that returns an instance of [QuantEcon.py's](https://quantecon.org/quantecon-py) MarkovChain class. ``` ```{solution} fm_ex3 :class: dropdown -A solution from the [QuantEcon.py](http://quantecon.org/quantecon-py) library +A solution from the [QuantEcon.py](https://quantecon.org/quantecon-py) library can be found [here](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/markov/approximation.py). ``` diff --git a/lectures/kalman.md b/lectures/kalman.md index cc468acc0..fd24abbff 100644 --- a/lectures/kalman.md +++ b/lectures/kalman.md @@ -506,11 +506,11 @@ In this case, for any initial choice of $\Sigma_0$ that is both non-negative and ```{index} single: Kalman Filter; Programming Implementation ``` -The class `Kalman` from the [QuantEcon.py](http://quantecon.org/quantecon-py) package implements the Kalman filter +The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package implements the Kalman filter * Instance data consists of: * the moments $(\hat x_t, \Sigma_t)$ of the current prior. - * An instance of the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class from [QuantEcon.py](http://quantecon.org/quantecon-py). + * An instance of the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class from [QuantEcon.py](https://quantecon.org/quantecon-py). The latter represents a linear state space model of the form @@ -530,7 +530,7 @@ $$ Q := CC' \quad \text{and} \quad R := HH' $$ -* The class `Kalman` from the [QuantEcon.py](http://quantecon.org/quantecon-py) package has a number of methods, some that we will wait to use until we study more advanced applications in subsequent lectures. +* The class `Kalman` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package has a number of methods, some that we will wait to use until we study more advanced applications in subsequent lectures. * Methods pertinent for this lecture are: * `prior_to_filtered`, which updates $(\hat x_t, \Sigma_t)$ to $(\hat x_t^F, \Sigma_t^F)$ * `filtered_to_forecast`, which updates the filtering distribution to the predictive distribution -- which becomes the new prior $(\hat x_{t+1}, \Sigma_{t+1})$ diff --git a/lectures/lake_model.md b/lectures/lake_model.md index c9b3c5715..0f71dd614 100644 --- a/lectures/lake_model.md +++ b/lectures/lake_model.md @@ -496,7 +496,7 @@ Thus, the percentages of time that an infinitely lived worker spends employed How long does it take for time series sample averages to converge to cross-sectional averages? -We can use [QuantEcon.py's](http://quantecon.org/quantecon-py) +We can use [QuantEcon.py's](https://quantecon.org/quantecon-py) MarkovChain class to investigate this. Let's plot the path of the sample averages over 5,000 periods diff --git a/lectures/linear_models.md b/lectures/linear_models.md index c887aa5db..43ae68038 100644 --- a/lectures/linear_models.md +++ b/lectures/linear_models.md @@ -1334,7 +1334,7 @@ Weaker sufficient conditions for convergence associate eigenvalues equaling or ## Code Our preceding simulations and calculations are based on code in -the file [lss.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from the [QuantEcon.py](http://quantecon.org/quantecon-py) package. +the file [lss.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from the [QuantEcon.py](https://quantecon.org/quantecon-py) package. The code implements a class for handling linear state space models (simulations, calculating moments, etc.). diff --git a/lectures/lqcontrol.md b/lectures/lqcontrol.md index 041c91584..03c0c9a48 100644 --- a/lectures/lqcontrol.md +++ b/lectures/lqcontrol.md @@ -556,7 +556,7 @@ for $t = 0, \ldots, T-1$ attains the minimum of {eq}`lq_object` subject to our c ## Implementation We will use code from [lqcontrol.py](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqcontrol.py) -in [QuantEcon.py](http://quantecon.org/quantecon-py) +in [QuantEcon.py](https://quantecon.org/quantecon-py) to solve finite and infinite horizon linear quadratic control problems. In the module, the various updating, simulation and fixed point methods diff --git a/lectures/markov_perf.md b/lectures/markov_perf.md index f4e0a4f24..a50f5048b 100644 --- a/lectures/markov_perf.md +++ b/lectures/markov_perf.md @@ -335,7 +335,7 @@ This is the approach we adopt in the next section. ### Implementation -We use the function [nnash](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqnash.py) from [QuantEcon.py](http://quantecon.org/quantecon-py) that computes a Markov perfect equilibrium of the infinite horizon linear-quadratic dynamic game in the manner described above. +We use the function [nnash](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lqnash.py) from [QuantEcon.py](https://quantecon.org/quantecon-py) that computes a Markov perfect equilibrium of the infinite horizon linear-quadratic dynamic game in the manner described above. ## Application @@ -439,7 +439,7 @@ From these, we compute the infinite horizon MPE using the preceding code Running the code produces the following output. -One way to see that $F_i$ is indeed optimal for firm $i$ taking $F_2$ as given is to use [QuantEcon.py](http://quantecon.org/quantecon-py)'s LQ class. +One way to see that $F_i$ is indeed optimal for firm $i$ taking $F_2$ as given is to use [QuantEcon.py](https://quantecon.org/quantecon-py)'s LQ class. In particular, let's take F2 as computed above, plug it into {eq}`eq_mpe_p1p` and {eq}`eq_mpe_p1d` to get firm 1's problem and solve it using LQ. @@ -520,7 +520,7 @@ Replicate the {ref}`pair of figures ` showing the comparison Parameters are as in duopoly_mpe.py and you can use that code to compute MPE policies under duopoly. -The optimal policy in the monopolist case can be computed using [QuantEcon.py](http://quantecon.org/quantecon-py)'s LQ class. +The optimal policy in the monopolist case can be computed using [QuantEcon.py](https://quantecon.org/quantecon-py)'s LQ class. ``` ```{solution-start} mp_ex1 diff --git a/lectures/optgrowth.md b/lectures/optgrowth.md index 6f4a4dd00..36871dca1 100644 --- a/lectures/optgrowth.md +++ b/lectures/optgrowth.md @@ -34,7 +34,7 @@ model studied in * {cite}`StokeyLucas1989`, chapter 2 * {cite}`Ljungqvist2012`, section 3.1 -* [EDTC](http://johnstachurski.net/edtc.html), chapter 1 +* [EDTC](https://johnstachurski.net/edtc.html), chapter 1 * {cite}`Sundaram1996`, chapter 12 It is an extension of the simple {doc}`cake eating problem ` we looked at earlier. @@ -282,7 +282,7 @@ The term $\int v(f(y - c) z) \phi(dz)$ can be understood as the expected next pe * the state is $y$ * consumption is set to $c$ -As shown in [EDTC](http://johnstachurski.net/edtc.html), theorem 10.1.11 and a range of other texts +As shown in [EDTC](https://johnstachurski.net/edtc.html), theorem 10.1.11 and a range of other texts > *The value function* $v^*$ *satisfies the Bellman equation* @@ -328,7 +328,7 @@ In our setting, we have the following key result The intuition is similar to the intuition for the Bellman equation, which was provided after {eq}`fpb30`. -See, for example, theorem 10.1.11 of [EDTC](http://johnstachurski.net/edtc.html). +See, for example, theorem 10.1.11 of [EDTC](https://johnstachurski.net/edtc.html). Hence, once we have a good approximation to $v^*$, we can compute the (approximately) optimal policy by computing the corresponding greedy policy. @@ -389,7 +389,7 @@ $$ \rho(g, h) = \sup_{y \geq 0} |g(y) - h(y)| $$ -See [EDTC](http://johnstachurski.net/edtc.html), lemma 10.1.18. +See [EDTC](https://johnstachurski.net/edtc.html), lemma 10.1.18. Hence, it has exactly one fixed point in this set, which we know is equal to the value function. @@ -404,7 +404,7 @@ This iterative method is called **value function iteration**. We also know that a feasible policy is optimal if and only if it is $v^*$-greedy. It's not too hard to show that a $v^*$-greedy policy exists -(see [EDTC](http://johnstachurski.net/edtc.html), theorem 10.1.11 if you get stuck). +(see [EDTC](https://johnstachurski.net/edtc.html), theorem 10.1.11 if you get stuck). Hence, at least one optimal policy exists. @@ -426,7 +426,7 @@ Unfortunately, they tend to be case-specific, as opposed to valid for a large ra Nevertheless, their main conclusions are usually in line with those stated for the bounded case just above (as long as we drop the word "bounded"). -Consult, for example, section 12.2 of [EDTC](http://johnstachurski.net/edtc.html), {cite}`Kamihigashi2012` or {cite}`MV2010`. +Consult, for example, section 12.2 of [EDTC](https://johnstachurski.net/edtc.html), {cite}`Kamihigashi2012` or {cite}`MV2010`. ## Computation diff --git a/lectures/perm_income_cons.md b/lectures/perm_income_cons.md index 1732f6ba0..53d371f44 100644 --- a/lectures/perm_income_cons.md +++ b/lectures/perm_income_cons.md @@ -60,7 +60,7 @@ In this lecture, we'll * show how the solution to the LQ permanent income model can be obtained using LQ control methods. * represent the model as a linear state space system as in {doc}`this lecture `. -* apply [QuantEcon](http://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to characterize statistical features of the consumer's optimal consumption and borrowing plans. +* apply [QuantEcon](https://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to characterize statistical features of the consumer's optimal consumption and borrowing plans. We'll then use these characterizations to construct a simple model of cross-section wealth and consumption dynamics in the spirit of Truman Bewley {cite}`Bewley86`. @@ -204,7 +204,7 @@ $$ Here we solve the same model using {doc}`LQ methods ` based on dynamic programming. -After confirming that answers produced by the two methods agree, we apply [QuantEcon](http://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) +After confirming that answers produced by the two methods agree, we apply [QuantEcon](https://quantecon.org/quantecon-py)'s [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to illustrate features of the model. Why solve a model in two distinct ways? diff --git a/lectures/rational_expectations.md b/lectures/rational_expectations.md index 5c57bb6e2..17b1e7758 100644 --- a/lectures/rational_expectations.md +++ b/lectures/rational_expectations.md @@ -576,7 +576,7 @@ Let the firm's belief function $H$ be as given in {eq}`ree_hlom2`. Formulate the firm's problem as a discounted optimal linear regulator problem, being careful to describe all of the objects needed. -Use the class `LQ` from the [QuantEcon.py](http://quantecon.org/quantecon-py) package to solve the firm's problem for the following parameter values: +Use the class `LQ` from the [QuantEcon.py](https://quantecon.org/quantecon-py) package to solve the firm's problem for the following parameter values: $$ a_0= 100, a_1= 0.05, \beta = 0.95, \gamma=10, \kappa_0 = 95.5, \kappa_1 = 0.95 diff --git a/lectures/samuelson.md b/lectures/samuelson.md index a8b056724..9517b4113 100644 --- a/lectures/samuelson.md +++ b/lectures/samuelson.md @@ -1186,7 +1186,7 @@ plt.show() ## Using the LinearStateSpace Class -It turns out that we can use the [QuantEcon.py](http://quantecon.org/quantecon-py) +It turns out that we can use the [QuantEcon.py](https://quantecon.org/quantecon-py) [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to do much of the work that we have done from scratch above. @@ -1431,5 +1431,5 @@ in {cite}`Samuelson1939`. We saw that different parameter values led to different output paths, which could either be stationary, explosive, or oscillating. -We also were able to represent the model using the [QuantEcon.py](http://quantecon.org/quantecon-py) +We also were able to represent the model using the [QuantEcon.py](https://quantecon.org/quantecon-py) [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class. diff --git a/lectures/two_auctions.md b/lectures/two_auctions.md index e06c7bb5c..0f2ed02c8 100644 --- a/lectures/two_auctions.md +++ b/lectures/two_auctions.md @@ -649,7 +649,7 @@ chi_squ_case.plot_winner_payment_distribution() 1. Wikipedia for FPSB: https://en.wikipedia.org/wiki/First-price_sealed-bid_auction 2. Wikipedia for SPSB: https://en.wikipedia.org/wiki/Vickrey_auction -3. Chandra Chekuri's lecture note for algorithmic game theory: http://chekuri.cs.illinois.edu/teaching/spring2008/Lectures/scribed/Notes20.pdf +3. Chandra Chekuri's lecture note for algorithmic game theory: https://chekuri.cs.illinois.edu/teaching/spring2008/Lectures/scribed/Notes20.pdf 4. Tim Salmon. ECO 4400 Supplemental Handout: All About Auctions: https://s2.smu.edu/tsalmon/auctions.pdf 5. Auction Theory- Revenue Equivalence Theorem: https://michaellevet.wordpress.com/2015/07/06/auction-theory-revenue-equivalence-theorem/ 6. Order Statistics: https://online.stat.psu.edu/stat415/book/export/html/834