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 numeraire TimeSeriesView.

feature_cols=None uses every column except date_col and ret_col. Rows with any NaN in the selected columns are dropped and the index is sorted. Requires the numeraire extra (imported lazily so the frame loaders above do not depend on numeraire).

return_type declares the algebra of ret_col to numeraire ("simple" by default, or "log" when the frame carries a source_log_return-style column). It is forwarded only when it differs from "simple" and requires numeraire >= 0.3; on an older numeraire a non-simple value raises rather than silently mixing log and simple algebra.