A finance pipeline turned 31,460 Compustat signals into 288 complete papers in about a day
Novy-Marx and Velikov published every stage, every prompt and every paper in January 2025. One of them now helps run the AFA session for AI-written work.
Robert Novy-Marx of the University of Rochester and Mihail Z. Velikov of Penn State describe “a process for automatically generating academic finance papers” and run it on stock return predictability. The code, the prompts and every generated paper are in a public repository under an MIT license.
Seven steps run from raw accounting data to a compiled PDF
| Step | The script does this | Result |
|---|---|---|
| 1. Build candidates | Combines Compustat items and their changes over time into ratios and differences | 31,460 signals |
| 2. Clean | Drops duplicates, cross-sections under 30 stocks and histories under 360 months | 17,074 signals |
| 3. Test | Sorts stocks into portfolios and checks the return spread five ways | 183 signals |
| 4. Benchmark | Runs the authors’ “Assaying Anomalies” protocol against more than 200 published anomalies and prints a PDF report for each signal | 96 signals |
| 5. Name | GPT-3.5-turbo turns variable codes into an academic name | “Operating Liquidity Margin” for current assets over EBITDA |
| 6. Write | Claude 3.5 Sonnet writes the introduction, data section and conclusion from the report | Three versions per signal |
| 7. Assemble | Scripts fill a LaTeX template, merge the references and compile | 288 PDFs |
The authors describe the 288 papers as “fully programmatically-generated”. The appendix prints the prompts.
Six tests cut 17,074 candidates to 96
| Test | Signals left |
|---|---|
| Candidates after cleaning | 17,074 |
| Significant return spread, equal-weighted deciles | 7,102 |
| Equal-weighted quintiles | 1,249 |
| Quintiles on NYSE breakpoints | 808 |
| Value-weighted portfolios | 640 |
| Alpha against the Fama-French six-factor model | 183 |
| “Assaying Anomalies” protocol | 96 |
Each signal got three theories, written after the result was known
The introduction of each paper runs to roughly 1,100 words in four fixed parts: 200 on motivation, 300 on hypothesis development, 300 on results and 300 on contribution. The model wrote three versions for every signal, each with a different economic mechanism for the same return spread. The paper’s reference list credits the generated papers to an author named I. M. Harking.
The repository has moved since the paper. Its README now lists 95 signals with four versions each: slow diffusion of information, production-based asset pricing, consumption-based asset pricing and an unrestricted one.
The authors report that the model “occasionally generates fictitious references” when it cites specific or recent work, while most citations to foundational papers in top finance journals are accurate. They had not yet measured the rate. Their abstract calls the exercise “a cautionary tale, illustrating how it can be abused to industrialize HARKing”, hypothesizing after results are known.
The profession waited sixteen months to ask for more
A reader of one of these papers cannot tell from the text that the mechanism was chosen after the sort. Open the repository, pick one signal and read its versions side by side. Then date your own hypothesis before you run the test: a research plan committed to git ahead of the data pull is the evidence a referee can check.
Sources
- NBER nber.org
- GitHub, velikov-mihail/AI-Powered-Scholarship github.com
- American Finance Association, call for papers afajof.org