The pages linked below are a frozen snapshot of the original pandas edition of Tidy Finance with Python, captured in June 2026. They are provided for reference only:
- The code is no longer maintained and may not run with current versions of
pandas,numpy, or our data providers. - The maintained edition — covering both R and Python (now using polars) in unified chapters — lives at tidy-finance.org/chapters.
- Only the rendered output is preserved here; the original
.qmdsources are not kept.
Why we changed
We rebuilt Tidy Finance with Python around polars instead of pandas, and merged the separate R and Python books into a single set of chapters with side-by-side language tabs. The motivation: faster and more memory-efficient data wrangling, closer parity between the R and Python code, and a single source of truth that is easier to keep in sync.
Because the previous edition will not be updated, we archive its full rendered output below so existing readers, bookmarks, and citations still have somewhere to land.
Archived chapters
These are static, unmaintained pages. Each one carries a banner linking back to the maintained edition.
Front matter
Prerequisites
Getting Started
- Working with Stock Returns
- Modern Portfolio Theory
- Capital Asset Pricing Model
- Financial Statement Analysis
- Discounted Cash Flow Analysis
Financial Data
Asset Pricing
- Beta Estimation
- Univariate Portfolio Sorts
- Size Sorts and p-Hacking
- Value and Bivariate Sorts
- Replicating Fama and French Factors
- Fama-MacBeth Regressions
Modeling and Machine Learning
- Fixed Effects and Clustered Standard Errors
- Difference in Differences
- Factor Selection via Machine Learning
- Option Pricing via Machine Learning
Portfolio Optimization
Appendix