Skip to content

Commit 9b8ed22

Browse files
committed
update notebooks with new jupyter_download_nb_image option
1 parent 4025144 commit 9b8ed22

35 files changed

+297
-244
lines changed

about_py.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"\n",
109109
"The following chart, produced using Stack Overflow Trends, shows one measure of the relative popularity of Python\n",
110110
"\n",
111-
"<img src=\"_static/lecture_specific/about_py/python_vs_rest.png\" style=\"\">\n",
111+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/about_py/python_vs_rest.png\" style=\"\">\n",
112112
"\n",
113113
" \n",
114114
"The figure indicates not only that Python is widely used but also that adoption of Python has accelerated significantly since 2012.\n",
@@ -120,7 +120,7 @@
120120
"\n",
121121
"(The corresponding time path for MATLAB is shown for comparison)\n",
122122
"\n",
123-
"<img src=\"_static/lecture_specific/about_py/pandas_vs_matlab.png\" style=\"\">\n",
123+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/about_py/pandas_vs_matlab.png\" style=\"\">\n",
124124
"\n",
125125
" \n",
126126
"Note that pandas takes off in 2012, which is the same year that we seek\n",
@@ -308,17 +308,17 @@
308308
"\n",
309309
"Example 2D plot with embedded LaTeX annotations\n",
310310
"\n",
311-
"<img src=\"_static/lecture_specific/about_py/qs.png\" style=\"\">\n",
311+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/about_py/qs.png\" style=\"\">\n",
312312
"\n",
313313
" \n",
314314
"Example contour plot\n",
315315
"\n",
316-
"<img src=\"_static/lecture_specific/about_py/bn_density1.png\" style=\"\">\n",
316+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/about_py/bn_density1.png\" style=\"\">\n",
317317
"\n",
318318
" \n",
319319
"Example 3D plot\n",
320320
"\n",
321-
"<img src=\"_static/lecture_specific/about_py/career_vf.png\" style=\"\">\n",
321+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/about_py/career_vf.png\" style=\"\">\n",
322322
"\n",
323323
" \n",
324324
"More examples can be found in the [Matplotlib thumbnail gallery](http://matplotlib.org/gallery.html).\n",

amss3.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@
828828
"cell_type": "markdown",
829829
"metadata": {},
830830
"source": [
831-
"<img src=\"_static/lecture_specific/amss3/amss3_g1.png\" style=\"\">\n",
831+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/amss3/amss3_g1.png\" style=\"\">\n",
832832
"\n",
833833
" \n",
834834
"The long simulation apparently indicates eventual convergence to an ergodic distribution.\n",
@@ -841,7 +841,7 @@
841841
"\n",
842842
"We obtain the following graph for the histogram of the last 100,000 observations on the par value of government debt.\n",
843843
"\n",
844-
"<img src=\"_static/lecture_specific/amss3/amss3_g3.png\" style=\"\">\n",
844+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/amss3/amss3_g3.png\" style=\"\">\n",
845845
"\n",
846846
" \n",
847847
"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",
@@ -884,7 +884,7 @@
884884
"cell_type": "markdown",
885885
"metadata": {},
886886
"source": [
887-
"<img src=\"_static/lecture_specific/amss3/amss3_g2.png\" style=\"\">\n",
887+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/amss3/amss3_g2.png\" style=\"\">\n",
888888
"\n",
889889
" \n",
890890
"For the short samples early in our simulated sample of 102,000 observations, fluctuations in government debt and the tax rate\n",

arellano.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@
670670
"\n",
671671
"The first figure shows the bond price schedule and replicates Figure 3 of Arellano, where $ y_L $ and $ Y_H $ are particular below average and above average values of output $ y $.\n",
672672
"\n",
673-
"<img src=\"_static/lecture_specific/arellano/arellano_bond_prices.png\" style=\"\">\n",
673+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/arellano/arellano_bond_prices.png\" style=\"\">\n",
674674
"\n",
675675
" \n",
676676
"- $ y_L $ is 5% below the mean of the $ y $ grid values \n",
@@ -681,7 +681,7 @@
681681
"\n",
682682
"Here’s the same relationships computed on a finer grid (`ny, nB = 51, 551`)\n",
683683
"\n",
684-
"<img src=\"_static/lecture_specific/arellano/arellano_bond_prices_2.png\" style=\"\">\n",
684+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/arellano/arellano_bond_prices_2.png\" style=\"\">\n",
685685
"\n",
686686
" \n",
687687
"In either case, the figure shows that\n",
@@ -692,7 +692,7 @@
692692
"\n",
693693
"The next figure plots value functions and replicates the right hand panel of Figure 4 of [[Are08]](https://lectures.quantecon.org/zreferences.html#arellano2008default).\n",
694694
"\n",
695-
"<img src=\"_static/lecture_specific/arellano/arellano_value_funcs.png\" style=\"\">\n",
695+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/arellano/arellano_value_funcs.png\" style=\"\">\n",
696696
"\n",
697697
" \n",
698698
"We can use the results of the computation to study the default probability\n",
@@ -701,7 +701,7 @@
701701
"The next plot shows these default probabilities over $ (B', y) $ as a heat\n",
702702
"map.\n",
703703
"\n",
704-
"<img src=\"_static/lecture_specific/arellano/arellano_default_probs.png\" style=\"\">\n",
704+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/arellano/arellano_default_probs.png\" style=\"\">\n",
705705
"\n",
706706
" \n",
707707
"As anticipated, the probability that the government chooses to default in the\n",
@@ -711,7 +711,7 @@
711711
"\n",
712712
"The grey vertical bars correspond to periods when the economy is excluded from financial markets because of a past default.\n",
713713
"\n",
714-
"<img src=\"_static/lecture_specific/arellano/arellano_time_series.png\" style=\"\">\n",
714+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/arellano/arellano_time_series.png\" style=\"\">\n",
715715
"\n",
716716
" \n",
717717
"One notable feature of the simulated data is the nonlinear response of interest rates.\n",

career.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@
508508
"\n",
509509
"In particular, modulo randomness, reproduce the following figure (where the horizontal axis represents time)\n",
510510
"\n",
511-
"<img src=\"_static/lecture_specific/career/career_solutions_ex1_py.png\" style=\"\">\n",
511+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/career/career_solutions_ex1_py.png\" style=\"\">\n",
512512
"\n",
513513
" \n",
514514
"Hint: To generate the draws from the distributions $ F $ and $ G $, use `quantecon.random.draw()`.\n",

coase.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
"\n",
200200
"The subcontracting scheme by which tasks are allocated across firms is illustrated in the figure below\n",
201201
"\n",
202-
"<img src=\"_static/lecture_specific/coase/subcontracting.png\" style=\"\">\n",
202+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/coase/subcontracting.png\" style=\"\">\n",
203203
"\n",
204204
" \n",
205205
"In this example,\n",
@@ -220,7 +220,7 @@
220220
"\n",
221221
"The length of the interval of stages (range of tasks) carried out by firm $ i $ is denoted by $ \\ell_i $.\n",
222222
"\n",
223-
"<img src=\"_static/lecture_specific/coase/allocation.png\" style=\"\">\n",
223+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/coase/allocation.png\" style=\"\">\n",
224224
"\n",
225225
" \n",
226226
"Each firm chooses only its *upstream* boundary, treating its downstream boundary as given.\n",

coleman_policy_iter.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
"\n",
337337
"Here’s the picture\n",
338338
"\n",
339-
"<img src=\"_static/lecture_specific/coleman_policy_iter/col_pol_composition.png\" style=\"\">\n",
339+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/coleman_policy_iter/col_pol_composition.png\" style=\"\">\n",
340340
"\n",
341341
" \n",
342342
"Now let another function $ h \\colon Y \\to Y $ where $ Y $ is another set.\n",
@@ -364,13 +364,13 @@
364364
"\n",
365365
"Here’s a commutative diagram that illustrates\n",
366366
"\n",
367-
"<img src=\"_static/lecture_specific/coleman_policy_iter/col_pol_bij1.png\" style=\"\">\n",
367+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/coleman_policy_iter/col_pol_bij1.png\" style=\"\">\n",
368368
"\n",
369369
" \n",
370370
"Here’s a similar figure that traces out the action of the maps on a point\n",
371371
"$ x \\in X $\n",
372372
"\n",
373-
"<img src=\"_static/lecture_specific/coleman_policy_iter/col_pol_bij2.png\" style=\"\">\n",
373+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/coleman_policy_iter/col_pol_bij2.png\" style=\"\">\n",
374374
"\n",
375375
" \n",
376376
"Now, it’s easy to check from [(8)](#equation-cpi-ghcom) that $ g^2 = \\tau^{-1} \\circ h^2 \\circ \\tau $ holds.\n",

discrete_dp.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@
814814
"source": [
815815
"Here’s the same information in a bar graph\n",
816816
"\n",
817-
"<img src=\"_static/lecture_specific/discrete_dp/finite_dp_simple_og.png\" style=\"\">\n",
817+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/discrete_dp/finite_dp_simple_og.png\" style=\"\">\n",
818818
"\n",
819819
" \n",
820820
"What happens if the agent is more patient?"
@@ -839,7 +839,7 @@
839839
"source": [
840840
"If we look at the bar graph we can see the rightward shift in probability mass\n",
841841
"\n",
842-
"<img src=\"_static/lecture_specific/discrete_dp/finite_dp_simple_og2.png\" style=\"\">"
842+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/discrete_dp/finite_dp_simple_og2.png\" style=\"\">"
843843
]
844844
},
845845
{

estspec.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
"\n",
288288
"However, if we try again with `n = 1200` the outcome is not much better\n",
289289
"\n",
290-
"<img src=\"_static/lecture_specific/estspec/periodogram1.png\" style=\"\">\n",
290+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/estspec/periodogram1.png\" style=\"\">\n",
291291
"\n",
292292
" \n",
293293
"The periodogram is far too irregular relative to the underlying spectral density.\n",
@@ -398,7 +398,7 @@
398398
"\n",
399399
"\n",
400400
"<a id='fig-window-smoothing'></a>\n",
401-
"<img src=\"_static/lecture_specific/estspec/window_smoothing.png\" style=\"\">\n",
401+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/estspec/window_smoothing.png\" style=\"\">\n",
402402
"\n",
403403
" \n",
404404
"In looking at the figure, we can see that for this model and data size, the\n",
@@ -530,7 +530,7 @@
530530
"\n",
531531
"\n",
532532
"<a id='fig-ar-smoothed-periodogram'></a>\n",
533-
"<img src=\"_static/lecture_specific/estspec/ar_smoothed_periodogram.png\" style=\"\">\n",
533+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/estspec/ar_smoothed_periodogram.png\" style=\"\">\n",
534534
"\n",
535535
" \n",
536536
"In all cases, periodograms are fit with the “hamming” window and window length of 65.\n",

finite_markov.ipynb

+8-8
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
"\n",
252252
"This Markov process can also be represented as a directed graph, with edges labeled by transition probabilities\n",
253253
"\n",
254-
"<img src=\"_static/lecture_specific/finite_markov/hamilton_graph.png\" style=\"\">\n",
254+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/hamilton_graph.png\" style=\"\">\n",
255255
"\n",
256256
" \n",
257257
"Here “ng” is normal growth, “mr” is mild recession, etc."
@@ -632,7 +632,7 @@
632632
"In particular\n",
633633
"\n",
634634
"$$\n",
635-
"\\mathbb P \\{X_{t+m} = y \\} = P^m(x, y) = (x, y) \\text{-th element of } P^m\n",
635+
"\\mathbb P \\{X_{t+m} = y \\,|\\, X_t = x \\} = P^m(x, y) = (x, y) \\text{-th element of } P^m\n",
636636
"$$"
637637
]
638638
},
@@ -737,7 +737,7 @@
737737
"For example, consider the following transition probabilities for wealth of a fictitious set of\n",
738738
"households\n",
739739
"\n",
740-
"<img src=\"_static/lecture_specific/finite_markov/mc_irreducibility1.png\" style=\"\">\n",
740+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/mc_irreducibility1.png\" style=\"\">\n",
741741
"\n",
742742
" \n",
743743
"We can translate this into a stochastic matrix, putting zeros where\n",
@@ -782,7 +782,7 @@
782782
"source": [
783783
"Here’s a more pessimistic scenario, where the poor are poor forever\n",
784784
"\n",
785-
"<img src=\"_static/lecture_specific/finite_markov/mc_irreducibility2.png\" style=\"\">\n",
785+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/mc_irreducibility2.png\" style=\"\">\n",
786786
"\n",
787787
" \n",
788788
"This stochastic matrix is not irreducible, since, for example, rich is not accessible from poor.\n",
@@ -845,7 +845,7 @@
845845
"\n",
846846
"Here’s a trivial example with three states\n",
847847
"\n",
848-
"<img src=\"_static/lecture_specific/finite_markov/mc_aperiodicity1.png\" style=\"\">\n",
848+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/mc_aperiodicity1.png\" style=\"\">\n",
849849
"\n",
850850
" \n",
851851
"The chain cycles with period 3:"
@@ -884,7 +884,7 @@
884884
"\n",
885885
"For example, the stochastic matrix associated with the transition probabilities below is periodic because, for example, state $ a $ has period 2\n",
886886
"\n",
887-
"<img src=\"_static/lecture_specific/finite_markov/mc_aperiodicity2.png\" style=\"\">\n",
887+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/mc_aperiodicity2.png\" style=\"\">\n",
888888
"\n",
889889
" \n",
890890
"We can confirm that the stochastic matrix is periodic as follows"
@@ -1373,7 +1373,7 @@
13731373
"The result should look something like the following — modulo randomness, of\n",
13741374
"course\n",
13751375
"\n",
1376-
"<img src=\"_static/lecture_specific/finite_markov/mc_ex1_plot.png\" style=\"\">\n",
1376+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/mc_ex1_plot.png\" style=\"\">\n",
13771377
"\n",
13781378
" \n",
13791379
"(You don’t need to add the fancy touches to the graph—see the solution if you’re interested)\n",
@@ -1410,7 +1410,7 @@
14101410
"\n",
14111411
"To illustrate the idea, consider the following diagram\n",
14121412
"\n",
1413-
"<img src=\"_static/lecture_specific/finite_markov/web_graph.png\" style=\"\">\n",
1413+
"<img src=\"https://s3-ap-southeast-2.amazonaws.com/lectures.quantecon.org/py/_static/lecture_specific/finite_markov/web_graph.png\" style=\"\">\n",
14141414
"\n",
14151415
" \n",
14161416
"Imagine that this is a miniature version of the WWW, with\n",

0 commit comments

Comments
 (0)