2 About this book
The main objective of this book is to offer a thorough and accessible practical guide to empirical finance research using Python. To achieve this goal, I cover statistical and econometric techniques used in empirical finance, with a focus on practical applications using Python. I believe that learning by doing is the most effective way to master new skills. Thus, I present real-world scenarios and datasets, enabling you to see the power and efficacy of these techniques in action.
No prior programming experience is required, making this book a valuable asset for students beginning their journey in Python. Even those with some familiarity with Python will find this book useful, as it offers practical insights into the application of programming in empirical finance.
My goal is that by the end of this book, you will have an advanced understanding of the main econometric techniques used in empirical finance, and a solid grounding in modern Python programming. I look forward to guiding you through this exciting journey into the world of empirical finance, statistics, econometrics, and Python programming.
This book is still far from complete. The structure listed below reflects the target structure, not the current sturcture as it currently is.
2.1 Structure
This book is organized into four comprehensive parts, each designed to build upon the knowledge from the previous section, ultimately guiding you to a robust understanding of empirical finance using Python.
Part 1: Introduction to Python
The first part of the book is devoted to familiarizing you with Python and setting up the necessary coding environment. I begin with instructions on installing Python and understanding its basic syntax. I then move on to introduce various additional tools that are part of the programmer’s toolbox, including the terminal, Git, and GitHub. You’ll learn to use modern AI tools such as ChatGPT for coding and GitHub Copilot for code generation and assistance.
Part 2: Data Analysis with Python
In the second part, I introduce the main sources of financial data available publicly and by subscription at HEC Montréal, including WRDS, FRED, and SEC Edgar. We will use these data sources throughout the book and explore them using Python libraries such as pandas, matplotlib, and seaborn. You will learn about the main data analysis techniques, including data loading, merging, transformation, and visualization, and how they fit into the data analysis workflow.
Part 3: Financial Econometrics
In the second part, we dive into financial econometrics, starting with the basics of probabilities and statistics. Here, we begin to introduce key Python libraries, starting with scipy and numpy, which provide a foundation for numerical computing in Python.
Part 4: Presenting Results
In the final part of the book, we focus on a key skill in research: presenting results.
We will introduce Quarto, a publishing system that allows you to write in Markdown, a simple language used to format text for scientific documents. We will learn how to mix it with math expressions, how to manage citations and create a bibliography, and how to structure a document with sections, figures, tables, etc. Finally, we will learn how to embed Python code in a Quarto document to embed the analysis directly in the report.
Finally will also discuss how to structure and write a research paper, from the literature review to the discussion of results, including how to create effective tables and figures.
2.2 Learning Approach
The learning approach adopted in this book is designed to be practical and closely linked with the real-world challenges encountered in empirical finance. My philosophy is grounded in the belief that the best way to learn is by doing, especially when it comes to mastering complex concepts like econometrics and programming.
YouTube Video Tutorials
Throughout the book, I provide links to YouTube videos that provide alternative explanations of the concepts covered in the chapters. These videos are not meant to replace the book, but rather to provide additional perspectives and clarifications. Some of these videos are created by me, and are available on my YouTube channel, Vincent Codes Finance.
2.3 Tech Stack
This book is structured around a specific set of tools, forming a tech stack that has been carefully chosen based on their wide adoption, robustness, versatility, and compatibility with each other. While alternative tools exist and may be equally capable, the book takes an opinionated approach, focusing on this particular stack for clarity and consistency. It’s worth noting that the concepts and techniques covered in this book can be applied with other tools as well, but the specific examples and code use the following:
- Python 3.13 (released in November 2024)
- uv for managing Python versions and environments
- Visual Studio Code for writing code
- Git and GitHub for version control and collaboration
- ChatGPT and GitHub Copilot for coding and assistance
- Quarto for writing the technical content.