sf_quant.data.load_composite_alphas_by_date#

sf_quant.data.load_composite_alphas_by_date(date_: date) DataFrame#

Load a Polars DataFrame of alphas data for a single date.

Parameters#

date_datetime.date

Date of the data frame.

Returns#

polars.DataFrame

A DataFrame containing alphas data on the specified date.

Examples#

>>> import sf_quant as sf
>>> import datetime as dt
>>> date_ = dt.date(2024, 1, 3)
>>> df = sf.data.load_composite_alphas_by_date(
...     date_=date_,
... )
>>> df.head()
shape: (5, 3)
┌────────────┬─────────┬─────────────┐
│ date       ┆ barrid  ┆ alpha       │
│ ---        ┆ ---     ┆ ---         │
│ date       ┆ str     ┆ f64         │
╞════════════╪═════════╪═════════════╡
│ 2023-01-03 ┆ USA06Z1 ┆ -17.611814  │
│ 2023-01-03 ┆ USA06Z2 ┆ 1.55668     │
│ 2023-01-03 ┆ USA06Z3 ┆ -18.676612  │
│ 2023-01-03 ┆ USA06Z4 ┆ 3.775271    │
│ 2023-01-03 ┆ USA06Z5 ┆ -17.06099   │
└────────────┴─────────┴─────────────┘