Study Guide: Week 1#
Open-ended questions on the material from week 1. The exam asks multiple-choice versions of questions like these. No answers are given: each question can be answered in a few sentences from the pages listed under its heading. The exam’s format is described in Exam Preparation.
Why Reproducibility#
Read: Is There a Reproducibility Crisis in Finance? and Reproducible Analytical Pipelines.
Reinhart and Rogoff’s paper “Growth in a Time of Debt” contained a spreadsheet error. What went wrong, and which practice from this course would have caught it?
A corporate bond factor paper in the Journal of Financial Economics was retracted after a doctoral student tried to replicate it. What went wrong, and which practice from this course would have caught it?
What is a reproducible analytical pipeline? What does it mean for a number in a report to have provenance?
Git and GitHub#
Read: HW 1 Guide A: GitHub Skills and its three tutorials, and the Git and GitHub entries under “Which Tools?” in What is this course about?
What is the difference between Git and GitHub?
What does each of these do:
git clone,git add,git commit,git push? Which of them change only your computer, and which change the copy on GitHub?What is a branch, and why make one instead of committing straight to
main?What is the difference between
git fetchandgit pull?Why does a pull request passing on GitHub Actions say more than
pytestpassing on your laptop? Name two things the Actions run checks that your laptop cannot.
Software Environments#
Read: Virtual Environments. For PATH, work
through
env_vars/04_path_exploration
in the in-class examples repository.
What is a virtual environment, and what problem does it solve?
pipandcondaboth install packages. Name two thingscondacan do thatpipcannot.Compare a
requirements.txtwith a condaenvironment.yml. What does each file record, and which command reads each one?The course uses
condaandpiptogether. What job does each one do in that combination?What is the
PATHenvironment variable? When you typepython, how does the shell decide which Python to run, and what doesconda activate finmdo toPATH?
Configuration and Secrets#
Read: Env Files and the
env_vars/
examples in the in-class repository.
What is an environment variable? Give one example that is not a password.
What does “separate configuration from code” mean? Give one setting that should differ between your laptop and the autograder, and say where it lives.
What is a
.envfile, and how does a Python script read a value from it?The course’s pipelines read WRDS credentials from
.envand.pgpassrather than from a variable in the code. Explain why, what goes wrong if.envis committed, and what role.gitignoreplays.
WRDS and CRSP#
Read: Introduction to WRDS, Connecting to the WRDS Platform With Python, and A Tour of the Data.
What is WRDS? Is it a data vendor? Name three datasets you reach through it.
Why is CRSP the standard source for US stock returns in research? Give two features.
What is survivorship bias, and why would a database that drops delisted companies overstate returns?
When would you use CRSP through WRDS, and when Bloomberg? Give one strength of each.
In the
wrdsPython package, what is the difference betweendb.get_tableanddb.raw_sql?
The CAPM#
Read: From Mean-Variance to the CAPM and HW 1 Guide B: The CRSP Market Index.
The CAPM says market beta is the only priced risk. What is the market portfolio in the theory, what stands in for it in practice, and how is the CRSP value-weighted index built from constituent returns and market caps?