|
Download README.md from OpenSourceAP/CrossSection: direct link, hf CLI and curl.
- Browser
- Download file 25.2 kB
-
https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/main/README.md
- Command line
-
hf download hf://datasets/OpenSourceAP/CrossSection/README.md
-
curl -L -o README.md https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/main/README.md
25.2 kB
| pretty_name: Open Source Cross-Sectional Asset Pricing | |
| license: cc-by-4.0 | |
| language: | |
| - en | |
| tags: | |
| - finance | |
| - asset-pricing | |
| - stock-returns | |
| - anomalies | |
| size_categories: | |
| - 100M<n<1B | |
| # dataset viewer tables (files on main, which mirrors the latest release) | |
| configs: | |
| - config_name: long_short_returns | |
| data_files: "Portfolios/Full Sets OP/PredictorLSretWide.parquet" | |
| default: true | |
| - config_name: predictor_portfolios | |
| data_files: "Portfolios/Full Sets OP/PredictorPortsFull.parquet" | |
| - config_name: placebo_portfolios | |
| data_files: "Portfolios/Full Sets OP/PlaceboPortsFull.parquet" | |
| - config_name: signal_doc | |
| data_files: "SignalDoc.parquet" | |
| - config_name: predictors | |
| data_files: "Firm Level Characteristics/Predictors.parquet" | |
| # Open Source Cross-Sectional Asset Pricing (data releases) | |
| Stock-level signals (firm characteristics) and portfolio returns from | |
| [Chen and Zimmermann (2022)](#paper), produced by the code at | |
| [github.com/OpenSourceAP/CrossSection](https://github.com/OpenSourceAP/CrossSection). | |
| The official data page and FAQ are at [openassetpricing.com](https://www.openassetpricing.com), which | |
| includes a [browser for signal descriptions](https://openassetpricing.com/SignalDoc-Browser.html). | |
| **All past releases are available.** This page shows the latest, 2026.10. See | |
| [Releases](#releases) for older ones, including 2021.03, which matches the published paper. | |
| ## Paper | |
| The paper for this dataset is | |
| [Chen and Zimmermann (2022), "Open Source Cross-Sectional Asset Pricing," *Critical Finance Review* 11(2): 207–264](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3604626). | |
| The data are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). If you | |
| use them, please cite the paper ([BibTeX](#citation)). | |
| ## Quick download (latest release, 2026.10) | |
| ### Core predictor portfolios and documentation | |
| Click a link to download. | |
| | Data | File | Size | | |
| | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | |
| | Signal documentation | [SignalDoc.csv](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/SignalDoc.csv) | 0.2 MB | | |
| | Long-short returns, original papers' construction (wide) | [PredictorLSretWide.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PredictorLSretWide.parquet) | 1.4 MB | | |
| | All portfolio returns, original papers' construction (long) | [PredictorPortsFull.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PredictorPortsFull.parquet) | 18.7 MB | | |
| | Value-weighted decile portfolio returns (long) | [PredictorAltPorts_DecilesVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_DecilesVW.parquet) | 25.7 MB | | |
| | Daily value-weighted portfolio returns, original papers' construction (long) | [PredictorVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/DailyPortfolios/PredictorVW.parquet) | 252 MB | | |
| | Release notes | [Release Notes 2026.10.md](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Release%20Notes%202026.10.md) | 12 KB | | |
| Or use a parquet reader, e.g.: | |
| ```python | |
| import pandas as pd | |
| ports = pd.read_parquet( | |
| "hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Portfolios/Full Sets OP/PredictorPortsFull.parquet" | |
| ) | |
| ``` | |
| We offer many other portfolio implementations too. See the [File Directory](#file-directory-202610). | |
| ### Accessing Specific Predictor Signals (Firm Level Characteristics) | |
| For most predictors, you can quickly download them via the `columns` argument in `pd.read_parquet()`. | |
| ```python | |
| # only the columns you list are downloaded (here 3 of the 211 in the 1.9 GB file) | |
| bm = pd.read_parquet( | |
| "hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Firm Level Characteristics/Predictors.parquet", | |
| columns=["permno", "yyyymm", "BM"], | |
| ) | |
| ``` | |
| Check [SignalDoc.csv](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/SignalDoc.csv) for the column name definitions, including the sign of each signal (e.g. higher BM implies higher mean return). | |
| You cannot access the Predictors `Price`, `Size`, `STreversal` this way. To access these signals, you need a WRDS account. | |
| ### The Full Panel of Firm Level Predictors (signals) | |
| If you have a WRDS account, you can download the full dataset of predictor signals with one call using | |
| the `openassetpricing` (Python) or `OpenSourceAP.DownloadR` (R) package. | |
| Both examples return signed signals by default: each predictor is multiplied by its | |
| `Sign` so that higher values imply higher expected returns. The `Predictors.parquet` | |
| example above returns unsigned signals. | |
| Python: | |
| ```python | |
| # pip install openassetpricing | |
| import openassetpricing as oap | |
| openap = oap.OpenAP() # latest release | |
| signals = openap.dl_all_signals("pandas") # or "polars", defaults to signed signals | |
| ``` | |
| R: | |
| ```r | |
| # install.packages("OpenSourceAP.DownloadR") | |
| library(OpenSourceAP.DownloadR) | |
| openap <- OpenAP$new() # latest release | |
| signals <- openap$dl_all_signals() # defaults to signed signals | |
| ``` | |
| Package documentation: | |
| - Python: [openassetpricing](https://github.com/mk0417/open-asset-pricing-download) | |
| - R: [OpenSourceAP.DownloadR](https://github.com/tomz23/OpenSourceAP.DownloadR) | |
| ### Placebos | |
| Placebos are 114 signals whose original papers did not show clear, statistically significant | |
| predictability in long-short portfolios. This includes 14 "not-predictors," which were clearly | |
| insignificant, and 100 "indirect signals," which had only suggestive evidence or were modifications of | |
| another signal. Most come from [Hou, Xue, and Zhang (2020)](https://doi.org/10.1093/rfs/hhy131), | |
| who count them among their 452 "anomalies." Chen and Zimmermann (2022) include them so that | |
| the dataset nests Hou, Xue, and Zhang, and helps reconcile the disparate replication rates | |
| (Hou, Xue, and Zhang's "failed replications" are mostly tests that were never shown to be | |
| predictive previously). | |
| The placebos may still be useful. Many of them seem to have predictive power and true | |
| statistical predictability is plentiful, historically (Chen 2026, "Most Claimed Statistical Findings in Cross-Sectional Return | |
| Predictability Are Likely True," *JF Insights*; Chen and Dim 2023, "High-Throughput Asset Pricing"). | |
| Firm-level placebo signals are in [Placebos.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Firm%20Level%20Characteristics/Placebos.parquet), | |
| and their portfolio returns are in | |
| [PlaceboPortsFull.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PlaceboPortsFull.parquet). | |
| `BidAskTAQ` is not included. To build it with your own TAQ, ISSM and CRSP data, run the | |
| [TAQ prep scripts](https://github.com/OpenSourceAP/CrossSection/tree/master/Signals/pyCode/PrepScripts/taq-chen-velikov) | |
| and then [BidAskTAQ.py](https://github.com/OpenSourceAP/CrossSection/blob/master/Signals/pyCode/Placebos/BidAskTAQ.py) | |
| from the CrossSection repo. | |
| ## File Directory (2026.10) | |
| Click a file or folder to open its page on the hub. Then click "Download" to download. | |
| - [SignalDoc.csv](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/SignalDoc.csv) (0.2 MB) — one row per signal: category, original paper, sign, portfolio settings | |
| - [SignalDoc.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/SignalDoc.parquet) (64 KB) — same, as parquet | |
| - [Release Notes 2026.10.md](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Release%20Notes%202026.10.md) (12 KB) | |
| - **[Firm Level Characteristics/](https://huggingface.co/datasets/OpenSourceAP/CrossSection/tree/Data-Release-2026.10/Firm%20Level%20Characteristics)** — monthly panels: `permno`, `yyyymm`, one column per signal | |
| - [Predictors.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Firm%20Level%20Characteristics/Predictors.parquet) (1.9 GB) — 209 predictors; omits `Price`, `Size` and `STreversal` ([how to get them](#the-full-panel-of-firm-level-predictors-signals)) | |
| - [signed_predictors_dl_wide.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Firm%20Level%20Characteristics/signed_predictors_dl_wide.parquet) (1.9 GB) — same, each multiplied by its `Sign` so that higher signal means higher in-sample mean return; omits `Price`, `Size` and `STreversal` ([how to get them](#the-full-panel-of-firm-level-predictors-signals)) | |
| - [Placebos.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Firm%20Level%20Characteristics/Placebos.parquet) (1.0 GB) — 113 placebos (not-predictors and indirect signals); omits `BidAskTAQ` ([how to get it](#placebos)) | |
| - **[Portfolios/](https://huggingface.co/datasets/OpenSourceAP/CrossSection/tree/Data-Release-2026.10/Portfolios)** | |
| - **[Full Sets OP/](https://huggingface.co/datasets/OpenSourceAP/CrossSection/tree/Data-Release-2026.10/Portfolios/Full%20Sets%20OP)** — monthly returns, original papers' construction | |
| - [PredictorLSretWide.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PredictorLSretWide.parquet) (1.4 MB) — long-short returns, one column per predictor | |
| - [PredictorPortsFull.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PredictorPortsFull.parquet) (18.7 MB) — all portfolios, long format | |
| - [PlaceboPortsFull.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PlaceboPortsFull.parquet) (7.9 MB) — same, for placebos | |
| - [PredictorSummary.xlsx](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PredictorSummary.xlsx) (1.1 MB) — summary statistics by predictor | |
| - [PlaceboSummary.xlsx](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PlaceboSummary.xlsx) (0.4 MB) — summary statistics by placebo | |
| - **[Full Sets Alt/](https://huggingface.co/datasets/OpenSourceAP/CrossSection/tree/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt)** — monthly returns, alternative constructions | |
| - [PredictorAltPorts_Deciles.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_Deciles.parquet) (25.1 MB) | |
| - [PredictorAltPorts_DecilesEW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_DecilesEW.parquet) (25.1 MB) | |
| - [PredictorAltPorts_DecilesVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_DecilesVW.parquet) (25.7 MB) | |
| - [PredictorAltPorts_Quintiles.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_Quintiles.parquet) (13.7 MB) | |
| - [PredictorAltPorts_QuintilesEW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_QuintilesEW.parquet) (13.7 MB) | |
| - [PredictorAltPorts_QuintilesVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_QuintilesVW.parquet) (13.9 MB) | |
| - [PredictorAltPorts_HoldPer_1.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_HoldPer_1.parquet) (18.8 MB) | |
| - [PredictorAltPorts_HoldPer_3.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_HoldPer_3.parquet) (19.0 MB) | |
| - [PredictorAltPorts_HoldPer_6.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_HoldPer_6.parquet) (18.9 MB) | |
| - [PredictorAltPorts_HoldPer_12.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_HoldPer_12.parquet) (18.8 MB) | |
| - [PredictorAltPorts_LiqScreen_ME_gt_NYSE20pct.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_LiqScreen_ME_gt_NYSE20pct.parquet) (18.8 MB) | |
| - [PredictorAltPorts_LiqScreen_NYSEonly.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_LiqScreen_NYSEonly.parquet) (18.2 MB) | |
| - [PredictorAltPorts_LiqScreen_Price_gt_5.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_LiqScreen_Price_gt_5.parquet) (18.9 MB) | |
| - [PredictorAltPorts_LiqScreen_VWforce.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_LiqScreen_VWforce.parquet) (19.0 MB) | |
| - [PredictorAltPorts_FF93style.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PredictorAltPorts_FF93style.parquet) (16.2 MB) | |
| - [PlaceboPortsFull.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/Portfolios/Full%20Sets%20Alt/PlaceboPortsFull.parquet) (7.9 MB) | |
| - **[DailyPortfolios/](https://huggingface.co/datasets/OpenSourceAP/CrossSection/tree/Data-Release-2026.10/DailyPortfolios)** — daily returns, long format | |
| - [Predictor.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/Predictor.parquet) (252 MB) | |
| - [PredictorVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/PredictorVW.parquet) (252 MB) | |
| - [CtsPredictorDecile.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/CtsPredictorDecile.parquet) (324 MB) | |
| - [CtsPredictorDecileVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/CtsPredictorDecileVW.parquet) (324 MB) | |
| - [CtsPredictorQuintile.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/CtsPredictorQuintile.parquet) (182 MB) | |
| - [CtsPredictorQuintileVW.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/CtsPredictorQuintileVW.parquet) (182 MB) | |
| - [DailyPortSummary.xlsx](https://huggingface.co/datasets/OpenSourceAP/CrossSection/blob/Data-Release-2026.10/DailyPortfolios/DailyPortSummary.xlsx) (8 KB) | |
| - **[Results/](https://huggingface.co/datasets/OpenSourceAP/CrossSection/tree/Data-Release-2026.10/Results)** — figures and tables from the paper | |
| Older releases may have slightly different file structure. | |
| ## Data Format | |
| **Firm-level signals** (`Firm Level Characteristics/`) | |
| - One row per stock-month. `permno` is the CRSP stock identifier, `yyyymm` is the month as an | |
| integer (e.g. `198601`), and every other column is one signal, named by its acronym in | |
| `SignalDoc.csv`. | |
| - Timing: signals are available and relevant for trading (based on the original paper) at the | |
| end of the month `yyyymm`. Use signals with `yyyymm = 202511` to predict the return between | |
| end of November 2025 and some future date (e.g. end of December 2025). | |
| - Note: Many of the original papers imply that signals are valid long after the fiscal year end. | |
| For example, Fama-French 1992 assume that book equity is available 6 months after the fiscal | |
| year end, and is relevant for trading for another 12 months after that. | |
| **Monthly portfolio returns** (`Portfolios/`) | |
| - Long format (`PredictorPortsFull`, `PlaceboPortsFull` and the `Full Sets Alt` files): one row | |
| per signal, portfolio and month, with columns | |
| - `signalname`: the signal's acronym, as in `SignalDoc.csv` | |
| - `port`: text, `"01"`–`"10"` for quantile portfolios and `"LS"` for long-short | |
| - `date`: the return month, dated the last trading day of the month | |
| - `ret`: return, in percent | |
| - `signallag`: the average lagged signal of the stocks in the portfolio | |
| - `Nlong`, `Nshort`: the number of stocks in the long and short legs (for quantile | |
| portfolios, `Nlong` is the number of stocks and `Nshort` is 0) | |
| - Wide format (`PredictorLSretWide`): long-short returns only, one row per month, with `date` | |
| and one column per predictor. | |
| - The return for `date` runs from the closing price on the last trading day of the preceding | |
| month to the closing price on the last trading day of that month. | |
| - Long-short portfolios are signed using the original papers' results, so the long leg is | |
| the one the original paper found to have higher returns. | |
| **Daily portfolio returns** (`DailyPortfolios/`) | |
| - Long format with `signalname`, `port`, `date` (the trading day) and `ret` (in percent). | |
| ## Releases | |
| Each data release is its own branch of this repo. The latest release is on branch | |
| `Data-Release-2026.10`, and the `main` branch holds a copy of it (plus this README), so | |
| downloads that don't name a branch (no `revision=` in Python) get the latest data. | |
| For another release, replace `Data-Release-2026.10` in the link with that release's branch | |
| from the table below. | |
| | Release | Branch (`revision=`) | Notes | | |
| | ------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | |
| | 2026.10 | `"Data-Release-2026.10"` | 212 predictors, 114 placebos; data through 2025-12; CRSP v2 (CIZ); parquet only. See `Release Notes 2026.10.md` | | |
| | 2025.10 | `"2025.10"` | 212 predictors, 114 placebos; data through 2024-12; code translated from Stata to Python (v2.0.0) | | |
| | 2024.10 | `"2024.10"` | 212 predictors, 114 placebos; patch of 2024.08 fixing look-ahead bias in AnnouncementReturn | | |
| | 2024.08 | `"2024.08"` | 212 predictors, 114 placebos; data through 2023-12; OptionMetrics signals end 2022-12 | | |
| | 2023.08 | `"2023.08"` | 212 predictors, 114 placebos; data through 2022-12; 5 new predictors; BM follows Stattman (1980) | | |
| | 2022.04 | `"2022.04"` | 207 predictors, 114 placebos; SignalDoc corrections; no daily portfolios or `Results/` | | |
| | 2022.03 | `"2022.03"` | 207 predictors, 114 placebos; data through 2021-12; `SignalDoc.csv` replaces the xlsx; FF93-style portfolios added | | |
| | 2021.04 | `"2021.04"` | 205 predictors, 114 placebos; adds value-weighted and daily portfolios; docs in `SignalDocumentation.xlsx` | | |
| | 2021.03 | `"2021.03"` | 205 predictors, 114 placebos; **code v1.0.0, matches the CFR publication**; portfolios in `Full_Sets_Main/` and `Full_Sets_Extended/`; `signed_predictors_dl_wide` lacks KZ and ZScore | | |
| | 2020.07 | `"2020.07"` | 210 base and 104 additional signals; adds trading-cost portfolios (`PortCosts/`); original layout | | |
| | 2020.05 | `"2020.05"` | 210 base and 104 additional signals; first release; original layout (`signalbase`, `portbase`, ...) | | |
| Counts include Price, Size, STreversal and BidAskTAQ, which are not in the firm-level files. | |
| Older releases were originally distributed as csv/zip files on Google Drive. On this hub, every | |
| csv (zipped or not) is stored as parquet at the same path. The other files (pdf, tex, xlsx, docx) | |
| are kept as they were. The layout of each release follows its original Drive folder, so file paths | |
| can differ between releases. To see what a release contains, list its files: | |
| ```python | |
| from huggingface_hub import list_repo_files | |
| list_repo_files("OpenSourceAP/CrossSection", repo_type="dataset", revision="Data-Release-2026.10") | |
| ``` | |
| ## Loading a release | |
| Python, one file at a time (cached locally after the first download): | |
| ```python | |
| import pandas as pd | |
| from huggingface_hub import hf_hub_download | |
| release = "Data-Release-2026.10" # any branch in the table above | |
| path = hf_hub_download( | |
| repo_id="OpenSourceAP/CrossSection", | |
| repo_type="dataset", | |
| filename="Firm Level Characteristics/signed_predictors_dl_wide.parquet", | |
| revision=release, | |
| ) | |
| signals = pd.read_parquet(path) | |
| ``` | |
| One line per release, for the main portfolio returns: | |
| ```python | |
| from huggingface_hub import hf_hub_download | |
| f = "Portfolios/Full Sets OP/PredictorPortsFull.parquet" | |
| kw = dict(repo_id="OpenSourceAP/CrossSection", repo_type="dataset", filename=f) | |
| hf_hub_download(**kw, revision="Data-Release-2026.10") | |
| hf_hub_download(**kw, revision="2025.10") | |
| hf_hub_download(**kw, revision="2024.10") | |
| hf_hub_download(**kw, revision="2024.08") | |
| hf_hub_download(**kw, revision="2023.08") | |
| hf_hub_download(**kw, revision="2022.04") | |
| hf_hub_download(**kw, revision="2022.03") | |
| hf_hub_download(**kw, revision="2021.04") | |
| ``` | |
| (2021.03 keeps this file under `Portfolios/Full_Sets_Main/`. The 2020 releases use the original | |
| layout, so call `list_repo_files` first.) | |
| With 🤗 `datasets`: | |
| ```python | |
| from datasets import load_dataset | |
| ports = load_dataset( | |
| "OpenSourceAP/CrossSection", | |
| data_files="Portfolios/Full Sets OP/PredictorPortsFull.parquet", | |
| revision="Data-Release-2026.10", | |
| split="train", | |
| ) | |
| ``` | |
| pandas can read straight from the hub (via `huggingface_hub`). Put the release after `@`: | |
| ```python | |
| import pandas as pd | |
| ports = pd.read_parquet( | |
| "hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Portfolios/Full Sets OP/PredictorPortsFull.parquet" | |
| ) | |
| # only the columns you list are downloaded (here 3 of the 211 in the 1.9 GB file) | |
| bm = pd.read_parquet( | |
| "hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Firm Level Characteristics/Predictors.parquet", | |
| columns=["permno", "yyyymm", "BM"], | |
| ) | |
| ``` | |
| `columns=` saves downloading only with `hf://` paths. With an `https://` link, pandas downloads | |
| the whole file first. | |
| R (download, then read with `arrow`): | |
| ```r | |
| release <- "Data-Release-2026.10" | |
| url <- paste0( | |
| "https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/", release, | |
| "/Portfolios/Full%20Sets%20OP/PredictorPortsFull.parquet" | |
| ) | |
| download.file(url, f <- tempfile(fileext = ".parquet"), mode = "wb") | |
| ports <- arrow::read_parquet(f) | |
| ``` | |
| ## License | |
| The data are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Please cite the paper below. | |
| ## Citation | |
| ```bibtex | |
| @article{ChenZimmermann2022, | |
| title = {Open Source Cross Sectional Asset Pricing}, | |
| author = {Chen, Andrew Y. and Zimmermann, Tom}, | |
| journal = {Critical Finance Review}, | |
| year = {2022}, | |
| volume = {11}, | |
| number = {2}, | |
| pages = {207--264} | |
| } | |
| ``` | |