numeraire_dataset.to_timeseries_view#
- numeraire_dataset.to_timeseries_view(df: pd.DataFrame, *, ret_col: str, feature_cols: list[str] | None = None, date_col: str = 'date', asset: str = 'mkt', horizon: int = 1, return_type: str = 'simple') TimeSeriesView[source]#
A tidy
(date, ret, features…)frame → single-asset numeraireTimeSeriesView.feature_cols=Noneuses every column exceptdate_colandret_col. Rows with any NaN in the selected columns are dropped and the index is sorted. Requires thenumeraireextra (imported lazily so the frame loaders above do not depend on numeraire).return_typedeclares the algebra ofret_colto numeraire ("simple"by default, or"log"when the frame carries asource_log_return-style column). It is forwarded only when it differs from"simple"and requiresnumeraire >= 0.3; on an older numeraire a non-simple value raises rather than silently mixing log and simple algebra.