GitHub

@@ -1424,18 +1424,14 @@ While Hansen-Singleton use CRSP value-weighted NYSE returns, we use the Ken Fren

1424142414251425

The consumption series is constructed from consumption of nondurables (`ND`) with the nondurables deflator.

142614261427-

The hidden cell below loads a vendored monthly dataset of returns and consumption series. The data are built from the [FRED](https://fred.stlouisfed.org/) and [Ken French](https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html) data libraries by the maintenance script at [`_static/lecture_specific/hansen_singleton_1983/make_data.py`](https://github.com/QuantEcon/lecture-python.myst/blob/main/lectures/_static/lecture_specific/hansen_singleton_1983/make_data.py) and read here directly from GitHub.

1427+

The hidden cell below loads a monthly dataset of returns and consumption series from [QuantEcon/data-lectures](https://github.com/QuantEcon/data-lectures). The data are built from the [FRED](https://fred.stlouisfed.org/) and [Ken French](https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html) data libraries by the maintenance script at [`builders/hansen_singleton_1983_data.py`](https://github.com/QuantEcon/data-lectures/blob/main/builders/hansen_singleton_1983_data.py) and read here directly from GitHub.

1428142814291429

```{code-cell} ipython3

14301430

:tags: [hide-cell]

143114311432-

DATA_URL = (

1433-

"https://github.com/QuantEcon/lecture-python.myst/raw/refs/heads/main/"

1434-

"lectures/_static/lecture_specific/hansen_singleton_1983/"

1435-

"hansen_singleton_1983_data.csv"

1436-

)

1432+

DATA_URL = "https://github.com/QuantEcon/data-lectures/raw/main/lectures/hansen_singleton_1983_data.csv"

143714331438-

# Read the vendored snapshot once; load_hs_monthly_data just slices it.

1434+

# Fetch the snapshot once; load_hs_monthly_data just slices it.

14391435

_data = pd.read_csv(DATA_URL, index_col=0, parse_dates=True)

1440143614411437

@@ -1445,9 +1441,9 @@ def load_hs_monthly_data(start="1959-02-01", end="1978-12-01"):

14451441

gross consumption growth, gross consumption inflation, per capita real

14461442

consumption, and gross real T-bill return.

144714431448-

The data are a vendored snapshot built by the maintenance script at

1449-

``_static/lecture_specific/hansen_singleton_1983/make_data.py``, which

1450-

constructs them from FRED and the Ken French data library.

1444+

The data are a snapshot built by the maintenance script at

1445+

``builders/hansen_singleton_1983_data.py`` in QuantEcon/data-lectures,

1446+

which constructs them from FRED and the Ken French data library.

14511447

"""

14521448

start = pd.Timestamp(start).to_period("M").to_timestamp("M")

14531449

end = pd.Timestamp(end).to_period("M").to_timestamp("M")

Read the original on github.com ↗