★ Open-source · R & Python · Reproducible
Tidy Finance takes an opinionated, fully transparent approach to empirical research in financial economics. One open-source code base now covers R and Python, side by side in every chapter.
20+ Hands-on chapters
2 Languages, one code base
100% Open source & reproducible
A single, transparent code base takes you from raw data to publication-quality results, in R and Python.
Every chapter ships R and Python side by side from a single source. Switch with a tab. Your choice follows you through the book.
Open code you can run end to end, from raw data to every figure and table, with no black boxes.
tidyfinanceA companion package for R and Python that wraps data downloads and the routines we use throughout the book.
Work with the data professionals use, like CRSP, Compustat, and TRACE, through clean, documented access patterns.
Portfolio sorts, factor models, fixed effects, causal inference, and modern ML give you the full empirical toolkit.
Read the whole book online for free or dive into the blog all in the open.
Five parts take you from your first stock return to constrained portfolio backtests.
Stock returns, modern portfolio theory, the CAPM, and financial statement analysis.
Access and manage WRDS, CRSP, Compustat, TRACE, and FISD with documented workflows.
Beta estimation, univariate and bivariate sorts, Fama-French factors, and Fama-MacBeth.
Fixed effects, difference-in-differences, factor selection, and option pricing via ML.
Parametric portfolio policies and constrained optimization with realistic backtesting.
Praise
A clean coding environment is a prerequisite for building a relevant investment platform and conducting meaningful factor research. Tidy Finance is the name of the game, giving aspiring academics and finance practitioners just what they need to perform clean and reproducible research. Highly recommended.
Harald Lohre
Executive Director at Robeco
Honorary Researcher at Lancaster University Management School
From our crowd-sourced paper on non-standard errors, I learned how important clean coding is. Tidy Finance is a rich resource for empirical finance researchers, offering clean coding techniques that benefit both beginners and experts.
Albert J. Menkveld
Professor of Finance at Vrije Universiteit Amsterdam
Fellow at Tinbergen Institute
A fantastic book bringing together financial theory, sound econometrics, thorough data processing and powerful programming techniques. An absolute must for every student and scholar in empirical finance.
Nikolaus Hautsch
Professor of Finance & Statistics at University of Vienna
Tidy Finance is a fantastic resource that lowers the threshold for entry into empirical finance, all in the spirit of open and reproducible science.
Björn Hagströmer
Professor of Finance at Stockholm Business School
To have a deep understanding of empirical asset pricing, one needs to write code using actual data. To learn how to do this, there is no better starting point than Tidy Finance. [...] I strongly recommend Tidy Finance to both beginners and experts.
Raman Uppal
Professor of Finance at EDHEC Business School
Students and professionals alike are led step by step until they suddenly find themselves coding on their own. A brilliant and required resource!
Mark Salmon
Professor of Economics at University of Cambridge
The team
Associate Researcher at HU Berlin
LinkedIn →
Assistant Professor of Finance at University of Copenhagen
Website →
Assistant Professor of Finance at Reykjavik University
Website →
Quantitative Researcher
Website →