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
CrossSectionViewfrom 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 aprovenancemapping of its own, but this bridge adds no persisted state to it.return_typedeclares the algebra of theretcolumn to numeraire ("simple"by default, or"log"when the panel carries asource_log_return-style column). It is forwarded only when non-simple and requiresnumeraire >= 0.3; on an older numeraire a non-simple value raises rather than silently mixing log and simple return algebra.