skfolio.datasets.load_sp500_index#

skfolio.datasets.load_sp500_index()[source]#

Load the prices of the S&P 500 Index.

This dataset contains daily adjusted closing prices of the S&P 500 Index, covering the period from 1990-01-02 to 2022-12-28.

Caution

This dataset is provided solely for testing and example purposes. It is a stale dataset and does not reflect current or accurate market prices. It is not intended for investment, trading, or commercial use and should not be relied upon as authoritative market data.

Observations

8313

Assets

1

Returns:
dfDataFrame of shape (n_observations, n_assets)

Prices DataFrame

Examples

>>> from skfolio.datasets import load_sp500_index
>>> prices = load_sp500_index()
>>> prices.head()
             SP500
Date
1990-01-02  359.69
1990-01-03  358.76
1990-01-04  355.67
1990-01-05  352.20
1990-01-08  353.79