Andrew Y. Chen commited on
Commit ·
98201dc
1
Parent(s): cedff1c
Add dataset README
Browse filesDescribes the data, quick downloads for the latest release, and how to load
each archived release by branch (revision=).
Claude-Session: https://claude.ai/code/session_019jhbPVKzWGSubG2HoKReUR
README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: Open Source Cross-Sectional Asset Pricing
|
| 3 |
+
license: cc-by-4.0
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
tags:
|
| 7 |
+
- finance
|
| 8 |
+
- asset-pricing
|
| 9 |
+
- stock-returns
|
| 10 |
+
- anomalies
|
| 11 |
+
size_categories:
|
| 12 |
+
- 100M<n<1B
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Open Source Cross-Sectional Asset Pricing (data releases)
|
| 16 |
+
|
| 17 |
+
Stock-level signals (firm characteristics) and portfolio returns from
|
| 18 |
+
[Chen and Zimmermann (2022), "Open Source Cross-Sectional Asset Pricing"](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3604626),
|
| 19 |
+
produced by the code at [github.com/OpenSourceAP/CrossSection](https://github.com/OpenSourceAP/CrossSection).
|
| 20 |
+
The official data page and FAQ are at [openassetpricing.com](https://www.openassetpricing.com), which
|
| 21 |
+
includes a [browser for signal descriptions](https://openassetpricing.com/SignalDoc-Browser.html).
|
| 22 |
+
|
| 23 |
+
**Each data release is its own branch of this repo.** The `main` branch holds only this
|
| 24 |
+
README. The latest release is on branch `Data-Release-2026.10`.
|
| 25 |
+
|
| 26 |
+
The data are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). If you
|
| 27 |
+
use them, please cite [Chen and Zimmermann (2022)](#citation).
|
| 28 |
+
|
| 29 |
+
## Quick download (latest release, 2026.10)
|
| 30 |
+
|
| 31 |
+
### Predictor Portfolios
|
| 32 |
+
|
| 33 |
+
Click a link to download, or pass it to any parquet reader. No account or token is needed.
|
| 34 |
+
|
| 35 |
+
| Data | File | Size |
|
| 36 |
+
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
| 37 |
+
| Signal documentation | [SignalDoc.csv](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/SignalDoc.csv) | 0.2 MB |
|
| 38 |
+
| 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 |
|
| 39 |
+
| 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 |
|
| 40 |
+
| Placebo portfolio returns (long) | [PlaceboPortsFull.parquet](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/Portfolios/Full%20Sets%20OP/PlaceboPortsFull.parquet) | 7.9 MB |
|
| 41 |
+
| 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 |
|
| 42 |
+
| 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 |
|
| 43 |
+
| Release notes | [Release Notes 2026.10.md](https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/Data-Release-2026.10/Release%20Notes%202026.10.md) | 17 KB |
|
| 44 |
+
|
| 45 |
+
For example, in Python:
|
| 46 |
+
|
| 47 |
+
```python
|
| 48 |
+
import pandas as pd
|
| 49 |
+
|
| 50 |
+
ports = pd.read_parquet(
|
| 51 |
+
"hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Portfolios/Full Sets OP/PredictorPortsFull.parquet"
|
| 52 |
+
)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
### Accessing Specific Predictor Signals (Firm Level Characteristics)
|
| 56 |
+
|
| 57 |
+
For most predictors, you can quickly download them via the `columns` argument in `pd.read_parquet()`.
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
# only the columns you list are downloaded (here 3 of the 211 in the 1.9 GB file)
|
| 61 |
+
bm = pd.read_parquet(
|
| 62 |
+
"hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Firm Level Characteristics/Predictors.parquet",
|
| 63 |
+
columns=["permno", "yyyymm", "BM"],
|
| 64 |
+
)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
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).
|
| 68 |
+
|
| 69 |
+
You cannot access the Predictors `Price`, `Size`, `STreversal` this way. To access these signals, you need a WRDS account.
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
### The Full Panel of Firm Level Predictors (signals)
|
| 73 |
+
|
| 74 |
+
If you have a WRDS account, you can download the full dataset of predictor signals with one call using
|
| 75 |
+
the `openassetpricing` (Python) or `OpenSourceAP.DownloadR` (R) package.
|
| 76 |
+
|
| 77 |
+
Both examples return signed signals by default: each predictor is multiplied by its
|
| 78 |
+
`Sign` so that higher values imply higher expected returns. The `Predictors.parquet`
|
| 79 |
+
example above returns unsigned signals.
|
| 80 |
+
|
| 81 |
+
Python:
|
| 82 |
+
|
| 83 |
+
```python
|
| 84 |
+
# pip install openassetpricing
|
| 85 |
+
import openassetpricing as oap
|
| 86 |
+
|
| 87 |
+
openap = oap.OpenAP() # latest release
|
| 88 |
+
signals = openap.dl_all_signals("pandas") # or "polars", defaults to signed signals
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
R:
|
| 92 |
+
|
| 93 |
+
```r
|
| 94 |
+
# install.packages("OpenSourceAP.DownloadR")
|
| 95 |
+
library(OpenSourceAP.DownloadR)
|
| 96 |
+
|
| 97 |
+
openap <- OpenAP$new() # latest release
|
| 98 |
+
signals <- openap$dl_all_signals() # defaults to signed signals
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
Package documentation:
|
| 102 |
+
|
| 103 |
+
- Python: [openassetpricing](https://github.com/mk0417/open-asset-pricing-download)
|
| 104 |
+
- R: [OpenSourceAP.DownloadR](https://github.com/tomz23/OpenSourceAP.DownloadR)
|
| 105 |
+
|
| 106 |
+
## Files (2025.10 and later)
|
| 107 |
+
|
| 108 |
+
| Path | Contents |
|
| 109 |
+
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 110 |
+
| `SignalDoc.parquet`, `SignalDoc.csv` | One row per signal: category, original paper, sign, portfolio construction settings |
|
| 111 |
+
| `Firm Level Characteristics/Predictors.parquet` | Wide panel: `permno`, `yyyymm`, one column per predictor (209 predictors) |
|
| 112 |
+
| `Firm Level Characteristics/signed_predictors_dl_wide.parquet` | Same, with each predictor multiplied by its `Sign`, so that higher means higher expected return |
|
| 113 |
+
| `Firm Level Characteristics/Placebos.parquet` | Wide panel of placebos (113 "not predictors" and "indirect evidence" signals) |
|
| 114 |
+
| `Portfolios/Full Sets OP/PredictorPortsFull.parquet` | Monthly portfolio returns using the original papers' construction. Long: `signalname`, `port`, `date`, `ret`, `signallag`, `Nlong`, `Nshort` |
|
| 115 |
+
| `Portfolios/Full Sets OP/PredictorLSretWide.parquet` | Long-short returns, wide: `date`, one column per predictor |
|
| 116 |
+
| `Portfolios/Full Sets OP/PlaceboPortsFull.parquet` | Same as `PredictorPortsFull`, for placebos |
|
| 117 |
+
| `Portfolios/Full Sets OP/*Summary.xlsx` | Summary statistics by signal |
|
| 118 |
+
| `Portfolios/Full Sets Alt/*.parquet` | Alternative implementations: deciles, quintiles, EW/VW, holding periods, liquidity screens, FF93 style |
|
| 119 |
+
| `DailyPortfolios/*.parquet` | Daily portfolio returns. Long: `signalname`, `port`, `date`, `ret` |
|
| 120 |
+
| `Results/` | Figures and tables from the paper |
|
| 121 |
+
|
| 122 |
+
For firm-level signals, `yyyymm` identifies the month-end when the signal is available
|
| 123 |
+
and valid. Use signals from month-end $t$ to predict returns in month $t+1$.
|
| 124 |
+
For monthly portfolio returns, `date` identifies the return month: the return runs
|
| 125 |
+
from the last trading day's closing price in the preceding month to the last trading
|
| 126 |
+
day's closing price in that month. Returns are in percent.
|
| 127 |
+
`port` is text: `"01"`–`"10"` for quantiles, `"LS"` for long-short.
|
| 128 |
+
|
| 129 |
+
Firm-level signals exclude Price, Size and STreversal (CRSP-only), and BidAskTAQ (TAQ),
|
| 130 |
+
which cannot be redistributed. The R and Python packages above retrieve the three
|
| 131 |
+
CRSP signals using your WRDS account. To construct BidAskTAQ, use the required TAQ
|
| 132 |
+
data with the
|
| 133 |
+
[CrossSection code](https://github.com/OpenSourceAP/CrossSection).
|
| 134 |
+
|
| 135 |
+
Older releases may have slightly different file structure.
|
| 136 |
+
|
| 137 |
+
## Releases
|
| 138 |
+
|
| 139 |
+
For another release, replace `Data-Release-2026.10` in the link with that release's branch
|
| 140 |
+
from the table below.
|
| 141 |
+
|
| 142 |
+
| Release | Branch (`revision=`) | Notes |
|
| 143 |
+
| ------- | ------------------------ | ----- |
|
| 144 |
+
| 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` |
|
| 145 |
+
| 2025.10 | `"2025.10"` | 212 predictors, 114 placebos; data through 2024-12; code translated from Stata to Python (v2.0.0) |
|
| 146 |
+
| 2024.10 | `"2024.10"` | 212 predictors, 114 placebos; patch of 2024.08 fixing look-ahead bias in AnnouncementReturn |
|
| 147 |
+
| 2024.08 | `"2024.08"` | 212 predictors, 114 placebos; data through 2023-12; OptionMetrics signals end 2022-12 |
|
| 148 |
+
| 2023.08 | `"2023.08"` | 212 predictors, 114 placebos; data through 2022-12; 5 new predictors; BM follows Stattman (1980) |
|
| 149 |
+
| 2022.04 | `"2022.04"` | 207 predictors, 114 placebos; SignalDoc corrections; no daily portfolios or `Results/` |
|
| 150 |
+
| 2022.03 | `"2022.03"` | 207 predictors, 114 placebos; data through 2021-12; `SignalDoc.csv` replaces the xlsx; FF93-style portfolios added |
|
| 151 |
+
| 2021.04 | `"2021.04"` | 205 predictors, 114 placebos; adds value-weighted and daily portfolios; docs in `SignalDocumentation.xlsx` |
|
| 152 |
+
| 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 |
|
| 153 |
+
| 2020.07 | `"2020.07"` | 210 base and 104 additional signals; adds trading-cost portfolios (`PortCosts/`); original layout |
|
| 154 |
+
| 2020.05 | `"2020.05"` | 210 base and 104 additional signals; first release; original layout (`signalbase`, `portbase`, ...) |
|
| 155 |
+
|
| 156 |
+
Counts include Price, Size, STreversal and BidAskTAQ, which are not in the firm-level files.
|
| 157 |
+
|
| 158 |
+
Older releases were originally distributed as csv/zip files on Google Drive. On this hub, every
|
| 159 |
+
csv (zipped or not) is stored as parquet at the same path. The other files (pdf, tex, xlsx, docx)
|
| 160 |
+
are kept as they were. The layout of each release follows its original Drive folder, so file paths
|
| 161 |
+
can differ between releases. To see what a release contains, list its files:
|
| 162 |
+
|
| 163 |
+
```python
|
| 164 |
+
from huggingface_hub import list_repo_files
|
| 165 |
+
|
| 166 |
+
list_repo_files("OpenSourceAP/CrossSection", repo_type="dataset", revision="Data-Release-2026.10")
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
## Loading a release
|
| 171 |
+
|
| 172 |
+
Python, one file at a time (cached locally after the first download):
|
| 173 |
+
|
| 174 |
+
```python
|
| 175 |
+
import pandas as pd
|
| 176 |
+
from huggingface_hub import hf_hub_download
|
| 177 |
+
|
| 178 |
+
release = "Data-Release-2026.10" # any branch in the table above
|
| 179 |
+
|
| 180 |
+
path = hf_hub_download(
|
| 181 |
+
repo_id="OpenSourceAP/CrossSection",
|
| 182 |
+
repo_type="dataset",
|
| 183 |
+
filename="Firm Level Characteristics/signed_predictors_dl_wide.parquet",
|
| 184 |
+
revision=release,
|
| 185 |
+
)
|
| 186 |
+
signals = pd.read_parquet(path)
|
| 187 |
+
```
|
| 188 |
+
|
| 189 |
+
One line per release, for the main portfolio returns:
|
| 190 |
+
|
| 191 |
+
```python
|
| 192 |
+
from huggingface_hub import hf_hub_download
|
| 193 |
+
|
| 194 |
+
f = "Portfolios/Full Sets OP/PredictorPortsFull.parquet"
|
| 195 |
+
kw = dict(repo_id="OpenSourceAP/CrossSection", repo_type="dataset", filename=f)
|
| 196 |
+
|
| 197 |
+
hf_hub_download(**kw, revision="Data-Release-2026.10")
|
| 198 |
+
hf_hub_download(**kw, revision="2025.10")
|
| 199 |
+
hf_hub_download(**kw, revision="2024.10")
|
| 200 |
+
hf_hub_download(**kw, revision="2024.08")
|
| 201 |
+
hf_hub_download(**kw, revision="2023.08")
|
| 202 |
+
hf_hub_download(**kw, revision="2022.04")
|
| 203 |
+
hf_hub_download(**kw, revision="2022.03")
|
| 204 |
+
hf_hub_download(**kw, revision="2021.04")
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
+
(2021.03 keeps this file under `Portfolios/Full_Sets_Main/`. The 2020 releases use the original
|
| 208 |
+
layout, so call `list_repo_files` first.)
|
| 209 |
+
|
| 210 |
+
With 🤗 `datasets`:
|
| 211 |
+
|
| 212 |
+
```python
|
| 213 |
+
from datasets import load_dataset
|
| 214 |
+
|
| 215 |
+
ports = load_dataset(
|
| 216 |
+
"OpenSourceAP/CrossSection",
|
| 217 |
+
data_files="Portfolios/Full Sets OP/PredictorPortsFull.parquet",
|
| 218 |
+
revision="Data-Release-2026.10",
|
| 219 |
+
split="train",
|
| 220 |
+
)
|
| 221 |
+
```
|
| 222 |
+
|
| 223 |
+
pandas can read straight from the hub (via `huggingface_hub`). Put the release after `@`:
|
| 224 |
+
|
| 225 |
+
```python
|
| 226 |
+
import pandas as pd
|
| 227 |
+
|
| 228 |
+
ports = pd.read_parquet(
|
| 229 |
+
"hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Portfolios/Full Sets OP/PredictorPortsFull.parquet"
|
| 230 |
+
)
|
| 231 |
+
|
| 232 |
+
# only the columns you list are downloaded (here 3 of the 211 in the 1.9 GB file)
|
| 233 |
+
bm = pd.read_parquet(
|
| 234 |
+
"hf://datasets/OpenSourceAP/CrossSection@Data-Release-2026.10/Firm Level Characteristics/Predictors.parquet",
|
| 235 |
+
columns=["permno", "yyyymm", "BM"],
|
| 236 |
+
)
|
| 237 |
+
```
|
| 238 |
+
|
| 239 |
+
`columns=` saves downloading only with `hf://` paths. With an `https://` link, pandas downloads
|
| 240 |
+
the whole file first.
|
| 241 |
+
|
| 242 |
+
R (download, then read with `arrow`):
|
| 243 |
+
|
| 244 |
+
```r
|
| 245 |
+
release <- "Data-Release-2026.10"
|
| 246 |
+
url <- paste0(
|
| 247 |
+
"https://huggingface.co/datasets/OpenSourceAP/CrossSection/resolve/", release,
|
| 248 |
+
"/Portfolios/Full%20Sets%20OP/PredictorPortsFull.parquet"
|
| 249 |
+
)
|
| 250 |
+
download.file(url, f <- tempfile(fileext = ".parquet"), mode = "wb")
|
| 251 |
+
ports <- arrow::read_parquet(f)
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
## License
|
| 255 |
+
|
| 256 |
+
The data are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Please cite the paper below.
|
| 257 |
+
|
| 258 |
+
## Citation
|
| 259 |
+
|
| 260 |
+
```bibtex
|
| 261 |
+
@article{ChenZimmermann2022,
|
| 262 |
+
title = {Open Source Cross Sectional Asset Pricing},
|
| 263 |
+
author = {Chen, Andrew Y. and Zimmermann, Tom},
|
| 264 |
+
journal = {Critical Finance Review},
|
| 265 |
+
year = {2022},
|
| 266 |
+
volume = {11},
|
| 267 |
+
number = {2},
|
| 268 |
+
pages = {207--264}
|
| 269 |
+
}
|
| 270 |
+
```
|