2.3.0 • Published 11 months ago

stock-market-data v2.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
11 months ago

stock-market-data

npm version

U.S. Stock Market data from Robert Shiller.

Data last updated: April 2021

Installation

Install using npm:

npm install stock-market-data

or yarn:

yarn add stock-market-data

You can also download the data directly at this link.

Documentation

Usage

The main export of this module is an array of stock market data. Each object in the array is an object that represents a single month of market data.

The earliest year represented is 1871.

import stockMarketData from 'stock-market-data';

console.log(stockMarketData[0]);
// {
//   year: 1871,
//   month: 1,
//   date: 1871.01,
//   dateFractionDecimal: 04,
//   dateFraction: 1871.04,
//   comp: 4.44,
//   dividend: 0.26,
//   earnings: 0.40,
//   cpi: 12.46,
//   lir: 5.32,
//   realPrice: 88.27,
//   realDividend: 5.17,
//   realEarnings: 7.95,
//   cape: null
// }

Data

The following table goes into more detail about the individual data points provided for each month.

KeyDescription
yearThe year
monthThe month. 1 is January, 12 is December.
dateAnother numeric representation of the date for this month of data in the format {year}.{month}
dateFractionDecimalAnother numeric representation of the date for this month of data in the format {year}.{completionPercentOfYear}
dateFractionAnother numeric representation of the date for this month of data. This value represents the completion of the year as a percent.
compThe cost of a single share of the S&P 500
dividendDividends paid, in USD
earningsEarnings per share
cpiThe value of the Consumer Price Index (CPI)
lirThe historical interest rates for the 10-Year Treasury Note
realPriceInflation adjusted comp (compared against the last month in the dataset)
realDividendInflated adjusted dividend (compared against the last month in the dataset)
realEarningsInflation adjusted earnings (compared against the last month in the dataset)
capeCyclically Adjusted Price Earnings Ratio

Source

The information in this package was compiled by Robert Shiller. To learn more about how this information is collected, refer to the link below.

Contributing

Looking to help out? Thank you! Refer to the Contributing Guide, which describes how to update the data.

2.3.0

11 months ago

2.2.0

2 years ago

2.1.0-beta.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.2.0-beta.3

4 years ago

1.2.0-beta.2

4 years ago

1.2.0-beta.1

4 years ago

1.2.0-beta.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago