The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: FileSystemError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
id int32 | date date32 | ret float32 |
|---|---|---|
1 | 1960-02-01 | 0 |
1 | 1960-03-01 | 0 |
1 | 1960-04-01 | 0 |
1 | 1960-05-01 | 0 |
1 | 1960-06-01 | 0 |
1 | 1960-07-01 | 0 |
1 | 1960-08-01 | 0 |
1 | 1960-09-01 | 0 |
1 | 1960-10-01 | 0 |
1 | 1960-11-01 | 0 |
1 | 1960-12-01 | 0 |
1 | 1961-01-01 | 0 |
1 | 1961-02-01 | 0 |
1 | 1961-03-01 | 0 |
1 | 1961-04-01 | 0 |
1 | 1961-05-01 | 0 |
1 | 1961-06-01 | 0 |
1 | 1961-07-01 | 0 |
1 | 1961-08-01 | 0 |
1 | 1961-09-01 | 0 |
1 | 1961-10-01 | 0 |
1 | 1961-11-01 | 0 |
1 | 1961-12-01 | 0 |
1 | 1962-01-01 | 0 |
1 | 1962-02-01 | 0 |
1 | 1962-03-01 | 0 |
1 | 1962-04-01 | 0 |
1 | 1962-05-01 | 0 |
1 | 1962-06-01 | 0 |
1 | 1962-07-01 | 0 |
1 | 1962-08-01 | 0 |
1 | 1962-09-01 | 0 |
1 | 1962-10-01 | 0 |
1 | 1962-11-01 | 0 |
1 | 1962-12-01 | 0 |
1 | 1963-01-01 | 0 |
1 | 1963-02-01 | 0 |
1 | 1963-03-01 | 0 |
1 | 1963-04-01 | 0 |
1 | 1963-05-01 | 0 |
1 | 1963-06-01 | 0 |
1 | 1963-07-01 | 0 |
1 | 1963-08-01 | 0 |
1 | 1963-09-01 | 0 |
1 | 1963-10-01 | 0 |
1 | 1963-11-01 | 0 |
1 | 1963-12-01 | 0 |
1 | 1964-01-01 | 0 |
1 | 1964-02-01 | 0 |
1 | 1964-03-01 | 0 |
1 | 1964-04-01 | 0 |
1 | 1964-05-01 | 0 |
1 | 1964-06-01 | 0 |
1 | 1964-07-01 | 0 |
1 | 1964-08-01 | 0 |
1 | 1964-09-01 | 0 |
1 | 1964-10-01 | 0 |
1 | 1964-11-01 | 0 |
1 | 1964-12-01 | 0 |
1 | 1965-01-01 | 0 |
1 | 1965-02-01 | 0 |
1 | 1965-03-01 | 0 |
1 | 1965-04-01 | 0 |
1 | 1965-05-01 | 0 |
1 | 1965-06-01 | 0 |
1 | 1965-07-01 | 0 |
1 | 1965-08-01 | 0 |
1 | 1965-09-01 | 0 |
1 | 1965-10-01 | 0 |
1 | 1965-11-01 | 0 |
1 | 1965-12-01 | 0 |
1 | 1966-01-01 | 0 |
1 | 1966-02-01 | 0 |
1 | 1966-03-01 | 0 |
1 | 1966-04-01 | 0 |
1 | 1966-05-01 | 0 |
1 | 1966-06-01 | 0 |
1 | 1966-07-01 | 0 |
1 | 1966-08-01 | 0 |
1 | 1966-09-01 | 0 |
1 | 1966-10-01 | 0 |
1 | 1966-11-01 | 0 |
1 | 1966-12-01 | 0 |
1 | 1967-01-01 | 0 |
1 | 1967-02-01 | 0 |
1 | 1967-03-01 | 0 |
1 | 1967-04-01 | 0 |
1 | 1967-05-01 | 0 |
1 | 1967-06-01 | 0 |
1 | 1967-07-01 | 0 |
1 | 1967-08-01 | 0 |
1 | 1967-09-01 | 0 |
1 | 1967-10-01 | 0 |
1 | 1967-11-01 | 0 |
1 | 1967-12-01 | 0 |
1 | 1968-01-01 | 0 |
1 | 1968-02-01 | 0 |
1 | 1968-03-01 | 0 |
1 | 1968-04-01 | 0 |
1 | 1968-05-01 | 0 |
Tidy Finance Factor Library: Portfolio Returns
Monthly long-short portfolio returns for 179 firm characteristics across 4,105,728 portfolio construction specifications. The data cover US common stocks from January 1960 to December 2024.
Dataset Details
Dataset Description
The dataset contains monthly long-short portfolio returns for 179 sorting variables: the continuous predictors published by Open Source Asset Pricing (Chen and Zimmermann, 2022) and the three CRSP-based signals that Open Source Asset Pricing adds (short-term reversal, price, and size). Each sorting variable is evaluated across all valid combinations of construction choices: sample exclusions, lagging conventions, breakpoints, sorting methods, weighting schemes, and rebalancing frequencies. Every return series is identified by an id that links to the specification grid, which records all choices behind the series.
- Curated by: Christoph Frey (Lancaster University), Christoph Scheuch (Tidy Intelligence), Stefan Voigt (University of Copenhagen), Patrick Weiss (Reykjavík University)
- License: CC0 1.0
Dataset Sources
- Construction pipeline: github.com/tidy-finance/factor-library
- Specification grid: tidy-finance/factor-library-grid
- R package: github.com/tidy-finance/r-tidyfinance
- Python package: github.com/tidy-finance/py-tidyfinance
- Demo: factors.tidy-finance.org
Uses
Direct Use
- Empirical asset pricing research: evaluating factor models, testing anomalies, and benchmarking portfolio strategies.
- Robustness analysis: comparing factor returns across methodological specifications.
- Teaching and replication: reproducing canonical results from the asset pricing literature.
- Sensitivity analysis: studying how construction choices (breakpoints, weighting, rebalancing, lags) affect factor premia.
Out-of-Scope Use
- Live trading signals. The dataset reflects historical, backward-looking portfolio returns and does not account for transaction costs, market impact, or real-time data availability.
- Causal inference about individual firm outcomes.
Dataset Structure
The returns are stored in Parquet files with three columns:
| Column | Type | Description |
|---|---|---|
id |
int32 | Specification identifier, the key of the specification grid |
date |
date32 | Month of the return |
ret |
float32 | Monthly long-short excess return |
Everything else about a series, such as its sorting variable, lag, sorting method, or weighting scheme, is a property of its id and is recorded in the specification grid, so it is not repeated in the returns.
The files are cut by contiguous ranges of 1,000 ids and named after the range they cover, so the file that holds a series follows from its id alone:
id_0000001-0001000.parquet
id_0001001-0002000.parquet
...
id_4105001-4106000.parquet
Within a file, rows are sorted by id and date. The last file is named after its nominal range although it only holds ids up to the last id of the grid.
Months without a return, and missing series
- A month without a valid long-short return is stored as exactly
0. This happens before a signal starts, after it ends, and when a sort collapses to a single portfolio. Most Open Source Asset Pricing signals end before December 2024, so most series end in a run of zeros. Genuine returns are never exactly zero, so filterret != 0to restrict a series to the months in which the factor exists. - Specifications whose sort produced no portfolios at all have no rows. This applies to
rdcapandprobinformedtradingwhen small firms are excluded, because Open Source Asset Pricing provides these signals only for small firms. retis stored in single precision. Compare a downloaded series with a locally rebuilt one using a tolerance of about1e-6.
Loading the Data
With the tidyfinance R package, version 0.8.0.9007 or later, which selects series by their construction choices or by id and joins the specification grid:
library(tidyfinance)
download_data("Tidy Finance", "factor_library", sorting_variable = "bm")
download_factor_library_ids(c(1L, 2L, 3L))
Without the package, compute the file that holds an id and read only that file, for example with DuckDB:
SELECT *
FROM 'hf://datasets/tidy-finance/factor-library/id_0000001-0001000.parquet'
WHERE id IN (1, 2, 3);
A glob over all files also works, but it reads the metadata of every file first, so reading the files computed from the ids is faster.
Specification grid
Each sorting variable is evaluated across the combinations of:
| Choice | Options |
|---|---|
| Size filter | None; exclude stocks below the 20th NYSE size percentile |
| Exclusion of financials | No; Yes |
| Exclusion of utilities | No; Yes |
| Exclusion of negative earnings | No; Yes |
| Minimum listing age | 24 months |
| Sorting variable lag | 1 month (timing of Open Source Asset Pricing); 3 months; 6 months; Fama-French |
| Rebalancing | Monthly; Annual (July) |
| Portfolios in the main sort | 3; 5; 10 |
| Sorting method | Univariate; Bivariate dependent; Bivariate independent (size as the second variable) |
| Portfolios in the size sort | 2; 5 |
| Minimum size for the main breakpoints | None; 20th percentile |
| Breakpoint exchanges | NYSE; NYSE, AMEX, and NASDAQ |
| Weighting | Equal-weighted; Value-weighted; Capped value-weighted (market capitalization capped at its 80th percentile each month) |
Invalid combinations are removed: univariate sorts have no size sort, and size itself is not used in bivariate sorts. See the specification grid for the exact values.
Dataset Creation
Curation Rationale
Existing factor libraries (e.g., the French Data Library) provide canonical factor series but without code or detailed workflows, limiting reproducibility and methodological comparison. We constructed this dataset to offer a transparent, fully replicable factor library that covers a comprehensive grid of specification choices.
Source Data
Data Collection and Processing
Stock returns, market capitalization, exchange, industry, price, and listing age come from the CRSP monthly stock file, and book equity and earnings from Compustat, both via WRDS. Compustat is used only for the negative book equity and negative earnings filters. The sorting variables are the signed firm-level predictors of the Open Source Asset Pricing release. The tidyfinance R package implements the portfolio sorts, and the full pipeline is in github.com/tidy-finance/factor-library.
The signals enter the 1-month lag at the timing of Open Source Asset Pricing, which already accounts for when the underlying data become available. The 3-month, 6-month, and Fama-French conventions add further lag for robustness. Annual Compustat data count as available six months after the fiscal year end, matching Open Source Asset Pricing.
Who are the source data producers?
- CRSP (Center for Research in Security Prices) at the University of Chicago
- Compustat (S&P Global Market Intelligence)
- Open Source Asset Pricing (Andrew Y. Chen and Tom Zimmermann)
Personal and Sensitive Information
The dataset contains aggregated portfolio-level returns only. No individual-level, personal, or sensitive information is included.
Bias, Risks, and Limitations
- Look-ahead and survivorship bias: The lagging conventions are designed to avoid look-ahead bias, but the dataset reflects the CRSP and Compustat universe with its known survivorship characteristics.
- Signal coverage: Signals start and end at different dates, which shows up as leading and trailing zero months.
std_turnalso covers only small firms, so its series have long runs of zero months. - US equities only: International markets are not included.
- Historical data: Returns reflect past market conditions and do not predict future performance.
- Data vendor dependence: Reproducing the dataset from scratch requires WRDS access (CRSP and Compustat subscriptions).
- Data revisions: CRSP, Compustat, and Open Source Asset Pricing revise their data between releases, so a rebuild can differ slightly from a published release. Earlier releases stay available through the commit history of this dataset.
Recommendations
Consult the specification grid and the companion paper before using the data. When reporting results, state the id of every series used.
Citation
BibTeX:
@article{Frey.2026,
title={A Transparent Financial Risk Factor Library},
author={Frey, Christoph and Scheuch, Christoph and Voigt, Stefan and Weiss, Patrick},
year={2026},
journal={Working Paper}
}
Please also cite Open Source Asset Pricing:
@article{ChenZimmermann.2022,
title={Open Source Cross-Sectional Asset Pricing},
author={Chen, Andrew Y. and Zimmermann, Tom},
journal={Critical Finance Review},
volume={11},
number={2},
pages={207--264},
year={2022}
}
- Downloads last month
- 328