Tidy Finance with R  book cover
1st Edition

Tidy Finance with R

  • Available for pre-order on March 15, 2023. Item will ship after April 5, 2023
ISBN 9781032389349
April 5, 2023 Forthcoming by Chapman & Hall
272 Pages 33 B/W Illustrations

FREE Standard Shipping
SAVE $15.99
was $79.95
USD $63.96

Prices & shipping based on shipping country


Book Description

This textbook shows how to bring theoretical concepts from finance and econometrics to the data. Focusing on coding and data analysis with R, we show how to conduct research in empirical finance from scratch. We start by introducing the concepts of tidy data and coding principles using the tidyverse family of R packages. We then provide the code to prepare common open source and proprietary financial data sources (CRSP, Compustat, Mergent FISD, TRACE) and organize them in a database. We reuse these data in all the subsequent chapters, which we keep as self-contained as possible. The empirical applications range from key concepts of empirical asset pricing (beta estimation, portfolio sorts, performance analysis, Fama-French factors) to modeling and machine learning applications (fixed effects estimation, clustering standard errors, difference-in-difference estimators, ridge regression, Lasso, Elastic net, random forests, neural networks) and portfolio optimization techniques.


1. Self-contained chapters on the most important applications and methodologies in finance, which can easily be used for the reader’s research or as a reference for courses on empirical finance.

2. Each chapter is reproducible in the sense that the reader can replicate every single figure, table, or number by simply copy-pasting the code we provide.

3. A full-fledged introduction to machine learning with tidymodels based on tidy principles to show how factor selection and option pricing can benefit from Machine Learning methods.

4. Chapter 2 on accessing & managing financial data shows how to retrieve and prepare the most important datasets in the field of financial economics: CRSP and Compustat. The chapter also contains detailed explanations of the most relevant data characteristics.

5. Each chapter provides exercises that are based on established lectures and exercise classes and which are designed to help students to dig deeper. The exercises can be used for self-studying or as a source of inspiration for teaching exercises.

Table of Contents

1. Introduction to Tidy Finance  2. Accessing & Managing Financial Data  3. WRDS, CRSP, and Compustat  4. TRACE and FISD  5. Other Data Providers  6. Beta Estimation  7. Univariate Portfolio Sorts  8. Size Sorts and P-Hacking  9. Value and Bivariate Sorts  10. Replicating Fama and French Factors  11. Fama-MacBeth Regressions  12. Fixed Effects and Clustered Standard Errors  13. Difference in Differences  14. Factor Selection via Machine Learning  15. Option Pricing via Machine Learning  16. Parametric Portfolio Policies  17. Constrained Optimization and Backtesting  Appendix A. Cover Design  Appendix B. Clean Enhanced TRACE with R

View More



Christoph Scheuch is the Director of Product at the social trading platform wikifolio.com. He is responsible for product planning, execution, and monitoring and manages a team of data scientists to analyze user behavior and develop data-driven products. Christoph is also an external lecturer at the Vienna University of Economics and Business where he teaches finance students how to manage empirical projects.

Stefan Voigt is Assistant Professor of Finance at the Department of Economics at the University of Copenhagen and a research fellow at the Danish Finance Institute. His research focuses on blockchain technology, high-frequency trading, and financial econometrics. Stefan’s research has been published in the leading finance and econometrics journals. He teaches parts of this book in his courses on empirical finance for students and practitioners.

Patrick Weiss is a postdoctoral researcher at the Vienna University of Economics and Business and an external lecturer at Reykjavík University. His research activity centers around the intersection of empirical asset pricing and corporate finance. Patrick is especially passionate about empirical asset pricing and has published research in a top journal in financial economics.