Data Sets¶
The package includes the data sets that are used in the examples and in the
documentation, so that they can be run without a network connection. Each data
set is in its own module, arch.data.<name>, and the function load returns
the data as a pandas.DataFrame. When the data have a date, it is used
as the index.
In [1]: import arch.data.sp500
In [2]: sp500 = arch.data.sp500.load()
In [3]: sp500.loc["2018-12-24":, ["Close", "Adj Close"]]
Out[3]:
Close Adj Close
Date
2018-12-24 2351.100098 2351.100098
2018-12-26 2467.699951 2467.699951
2018-12-27 2488.830078 2488.830078
2018-12-28 2485.739990 2485.739990
2018-12-31 2506.850098 2506.850098
The available data sets are
Module |
Contents |
Columns |
|---|---|---|
|
Daily S&P 500 index, January 1999 to December 2018. |
|
|
Daily NASDAQ Composite index, January 1999 to December 2018. |
|
|
Daily VIX index, January 2014 to January 2019. |
|
|
Daily price of West Texas Intermediate crude oil from FRED, January 1986 to January 2019. |
|
|
Monthly prices of Brent and West Texas Intermediate crude oil, May 1987 to January 2020. |
|
|
Monthly consumer price index for all urban consumers less food and energy from FRED, January 1957 to November 2018. |
|
|
Monthly yields on AAA and BAA rated corporate bonds, January 1919 to December 2018. |
|
|
Monthly excess return on the market, the size (SMB) and value (HML) factors and the risk-free rate from Ken French’s data library, July 1926 to November 2018. |
|
|
Graduate school admissions data (400 applicants) with the GRE score, GPA and class rank. |
|
Loading Data¶
Load the S&P 500 data used in the examples. |
|
Load the NASDAQ Composite data used in the examples. |
|
Load the VIX Index data used in the examples. |
|
Load the West Texas Intermediate crude oil price data used in the examples. |
|
Load the Brent and WTI crude oil price data used in the examples. |
|
Load the Core CPI data used in the examples. |
|
Load the AAA and BAA rates used in the examples. |
|
Load the Fama-French factor data used in the examples. |
|
Load the graduate school admissions data used in the examples. |
All of the loaders read a compressed csv file that is included with the package using the function below. It can also be used to read other files that are stored in a directory next to a module.
|
Load data from a csv.gz file. |