<a id="skfolio-datasets-load-sp500-dataset"></a>

# skfolio.datasets.load_sp500_dataset

<a id="skfolio.datasets.load_sp500_dataset"></a>

### skfolio.datasets.load_sp500_dataset()

Load the prices of 20 assets from the S&P 500 Index.

This dataset contains daily adjusted closing prices for 20 selected constituents 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         |     20 |
* **Returns:**
  **df** *DataFrame of shape (n_observations, n_assets)*
  : Prices DataFrame

### Examples

```pycon
>>> from skfolio.datasets import load_sp500_dataset
>>> prices = load_sp500_dataset()
>>> prices.head()
             AAPL    AMD    BAC    BBY  ...    RRC    UNH    WMT    XOM
Date                                    ...
1990-01-02  0.264  4.125  4.599  0.144  ...  3.322  0.310  3.653  4.068
1990-01-03  0.266  4.000  4.636  0.161  ...  3.322  0.304  3.653  4.027
1990-01-04  0.267  3.938  4.537  0.159  ...  3.322  0.301  3.634  3.987
1990-01-05  0.268  3.812  4.438  0.159  ...  3.322  0.288  3.595  3.966
1990-01-08  0.269  3.812  4.463  0.147  ...  3.322  0.282  3.644  4.027

[5 rows x 20 columns]
```

