numeraire_dataset.zones.view.to_cross_section_view#

numeraire_dataset.zones.view.to_cross_section_view(clean: pd.DataFrame, *, chars: list[str], date_col: str = 'date', asset_col: str = 'permno', ret: str = 'ret', horizon: int = 1, return_type: str = 'simple') CrossSectionView[source]#

Build a numeraire CrossSectionView from a tidy clean panel (lazy numeraire import).

Pass the DataLock.data_vintage(name) string to the engine (backtest_weights(..., data_vintage=...)) so a downstream result carries that provenance stamp. The view also exposes a provenance mapping of its own, but this bridge adds no persisted state to it.

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