numeraire_dataset.load_hkm_paper_data#
- numeraire_dataset.load_hkm_paper_data(*, frequency: Literal['quarterly', 'monthly'] = 'quarterly', path: str | Path | None = None, timeout: float = 30.0) HKMPaperData[source]#
Load the fixed He–Kelly–Manela paper factors and 124 test assets.
With
path=None, the one official author ZIP is downloaded into memory. Passingpathinstead reads a caller-supplied local.zipthrough a POSIXdir_fd/O_NOFOLLOWtraversal that fails closed on unsupported platforms. Both routes require the frozen official archive SHA-256 before parsing. No ZIP, CSV, README, or bundled Julia bytes are extracted, copied, cached, executed, or persisted.Only the original-paper quarterly or monthly test-asset file is exposed. The archive’s updated daily/monthly/quarterly factor-only files are schema/calendar validated but deliberately have no public selection route, preventing their 2013–2018 extension from being mixed into the paper’s 1970Q1–2012Q4 cross-sectional sample.
factorsuses decimal units and canonicalmkt_excess/risk_freelabels.excess_returnscontains the 124 distinct official assets after subtracting same-period RF; its cross-class missingness is preserved. The redundant sourceAll_01–All_124block must exactly duplicate those assets cell-for-cell and is then omitted.asset_metadatamaps every asset to its class, within-class position, and duplicateAllsource column.HKMPaperData.complete_case()performs complete-case selection within one asset class, never across the unbalanced 124-asset panel.All three frames carry path-free
frame_provenance()with archive/member hashes, recipe, rows, units, source mode, andredistributable=false. The author’s page permits free non-commercial use and provides the files as-is, but states no general redistribution grant; the test assets also retain their original third-party source obligations.