Live notebooks

Run Python in the lesson

These JupyterLite-style notebooks are real `.ipynb` files students can download. They also run in the browser with Python, pandas, NumPy, and matplotlib so learners can execute cells and see results without installing anything.

Official Data

Official Data Observatory

Data structures, trends, and evidence

Python

Load official economic indicators from Ceteris Lab's server export endpoint, plot a time series, calculate growth rates, and discuss limitations.

Intermediate25 to 40 minRelated dataset: Official economic indicatorpandas, numpy, matplotlib
official datatime series plotgrowth rateslimitations

Module 0

Loading CSV Data in Python

Loading CSV data in Python

Python

Load wage_sample.csv, inspect rows, and identify variables in a DataFrame.

Beginner15 to 25 minRelated dataset: wage_sample.csvpandas, numpy
pandasCSV loadingDataFrame preview

Module 0

Descriptive Statistics in Python

Descriptive statistics in Python

Python

Calculate means, medians, standard deviations, and grouped wage summaries.

Beginner15 to 25 minRelated dataset: wage_sample.csvpandas, numpy
summary statisticsgroupbyinterpretation

Module 0

Creating Simple Graphs in Python

Creating simple graphs in Python

Python

Create a scatter plot that compares education and wages.

Beginner15 to 25 minRelated dataset: wage_sample.csvpandas, numpy, matplotlib
matplotlibscatter plotsvisual interpretation

Module 0

Mini Python Practice Lab

Mini Python practice lab

Python

Run a full beginner workflow: load, inspect, summarize, graph, and interpret.

Beginner15 to 25 minRelated dataset: wage_sample.csvpandas, numpy, matplotlib
workflowsummariesgraphs

Module 1

First Python Data Example

First Python data example

Python

Use Python to describe the wage and education relationship without overclaiming causality.

Intermediate25 to 40 minRelated dataset: wage_sample.csvpandas, numpy
correlationgrouped meanscareful interpretation

Module 2

Simple Regression in Python

Regression in Python

Python

Estimate wage on education, draw the fitted line, and read the coefficient output with a statsmodels-compatible fallback.

Intermediate25 to 40 minRelated dataset: wage_sample.csvpandas, numpy, statsmodels, patsy
OLSstatsmodels-readyfitted line

Module 2

Fitted Values and Residuals

Fitted values and residuals

Python

Calculate fitted wages, residuals, squared residuals, and residual plots from the wage regression.

Intermediate25 to 40 minRelated dataset: wage_sample.csvpandas, numpy, matplotlib
fitted valuesresidualsdiagnostic plots

Module 2

OLS and R-squared by Formula

Ordinary Least Squares intuition

Python

Compute the OLS slope, intercept, residual sum of squares, and R-squared step by step.

Intermediate25 to 40 minRelated dataset: wage_sample.csvpandas, numpy, statsmodels, patsy
OLS formulasSSRR-squared

Module 2

Module 2 Regression Project Template

Practice regression project

Python

A reusable project notebook students can edit to choose y and x, estimate the model, and write an interpretation.

Applied35 to 55 minRelated dataset: wage_sample.csvpandas, numpy
project workflowstudent templateinterpretation

Module 3

WAGE1 Multiple Regression

Multiple Regression in Python

Python

Estimate log wage on education, experience, and tenure when the WAGE1 file is installed.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, statsmodels, patsy
multiple regressionWAGE1statsmodels

Module 3

GPA1 Multiple Regression

Holding Other Factors Fixed

Python

Estimate college GPA on high-school GPA and ACT when the GPA1 file is installed.

Intermediate25 to 40 minRelated dataset: GPA1pandas, numpy, statsmodels, patsy
controlsGPA1coefficient interpretation

Module 3

Simple vs Multiple Regression

Simple Regression versus Multiple Regression

Python

Compare the education coefficient before and after adding experience and tenure controls.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, statsmodels, patsy
simple regressioncontrolscoefficient comparison

Module 3

Partialling-Out Demonstration

The Partialling-Out Interpretation

Python

Recover a multiple-regression coefficient by using the leftover part of education after controls.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, matplotlib
partialling outresidualsceteris paribus

Module 3

Omitted-Variable Bias Example

Omitted-Variable Bias

Python

Compare a short wage model with a controlled model and discuss the direction of omitted-variable bias.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, statsmodels, patsy
omitted-variable biascontrolsinterpretation

Module 3

VIF Calculation

Multicollinearity and VIF

Python

Calculate variance inflation factors for education, experience, and tenure.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, statsmodels, patsy
VIFmulticollinearityprecision

Module 3

Residuals and Fitted Values

Fitted Values and Residuals

Python

Create fitted values and residuals from a multiple-regression wage model.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, matplotlib
fitted valuesresidualsdiagnostics

Module 3

R-squared Comparison

Goodness of Fit in Multiple Regression

Python

Compare R-squared across nested models and separate fit from causal interpretation.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy
R-squaredmodel comparisonfit

Module 4

T Tests with WAGE1

Testing a Single Coefficient Against Zero

Python

Estimate a wage equation and test education, experience, and tenure with real t statistics.

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, statsmodels, patsy
t testsWAGE1statsmodels

Module 4

One-Sided and Two-Sided Tests

One-Sided and Two-Sided Tests

Python

Compare tail choices and hypothesis wording using GPA1.

Intermediate25 to 40 minRelated dataset: GPA1pandas, numpy, scipy
one-sided teststwo-sided testsp-values

Module 4

p-Values and Critical Values

p-Values for t Tests

Python

Use scipy to compute p-values and critical values from the t distribution.

Intermediate25 to 40 minRelated dataset: GPA1pandas, numpy, scipy
p-valuescritical valuesscipy

Module 4

Confidence Intervals

Confidence Intervals for Regression Coefficients

Python

Build confidence intervals from estimates, standard errors, and t critical values.

Applied35 to 55 minRelated dataset: WAGE1pandas, numpy, statsmodels, patsy
confidence intervalsWAGE1inference

Module 4

Linear Combinations

Testing One Linear Combination of Parameters

Python

Test whether two coefficients are equal using WAGE2.

Intermediate25 to 40 minRelated dataset: WAGE2pandas, numpy, statsmodels, patsy
linear combinationscoefficient equalityt_test

Module 4

F Tests for Exclusion Restrictions

F Tests for Exclusion Restrictions

Python

Compare restricted and unrestricted models and compute an F statistic.

Intermediate25 to 40 minRelated dataset: BWGHTpandas, numpy, statsmodels, patsy
F testsrestricted modelunrestricted model

Module 4

R-Squared F Test

R-Squared Form of the F Statistic

Python

Use R-squared values to compute the F statistic for valid exclusion restrictions.

Intermediate25 to 40 minRelated dataset: BWGHTpandas, numpy
R-squaredF statisticnested models

Module 4

General Linear Restrictions

General Linear Restrictions

Python

Use statsmodels f_test for restrictions beyond simple variable exclusion.

Intermediate25 to 40 minRelated dataset: HPRICE1pandas, numpy
general restrictionsf_testhousing data

Module 4

Reporting Regression Results

Reporting Regression Results Professionally

Python

Assemble coefficient, uncertainty, p-value, fit, and interpretation into a report table.

Intermediate25 to 40 minRelated dataset: CEOSAL2pandas, numpy, statsmodels, patsy
reportingregression tableprofessional interpretation

Module 4

Applied Inference Project

Applied Inference Project

Python

Run a complete inference workflow and draft a concise empirical report.

Applied35 to 55 minRelated dataset: WAGE1pandas, numpy
applied projectinference workflowreporting

Module 5

Consistency Simulation

What Consistency Means

Python

Simulate OLS under exogeneity and watch estimates concentrate as n grows.

Intermediate25 to 40 minRelated dataset: SIMULATIONpandas, numpy, scipy
consistencysimulationlarge samples

Module 5

OLS Inconsistency from Endogeneity

Inconsistency and Asymptotic Bias

Python

Show estimates converging to the wrong target when x and u are correlated.

Intermediate25 to 40 minRelated dataset: SIMULATIONpandas, numpy, scipy
inconsistencyendogeneitysimulation

Module 5

Omitted-Variable Inconsistency

Omitted Variable Inconsistency

Python

Compare true and omitted models as sample size grows.

Intermediate25 to 40 minRelated dataset: SIMULATIONpandas, numpy, scipy
omitted variablesprobability limitssimulation

Module 5

Asymptotic Normality

Large-Sample Inference without Normal Errors

Python

Show coefficient distributions becoming approximately normal under several error distributions.

Applied35 to 55 minRelated dataset: SIMULATIONpandas, numpy, scipy
asymptotic normalityCLTsimulation

Module 5

Nonnormal Errors and Large-Sample Inference

Large-Sample t and F Tests

Python

Use 401K to discuss bounded, nonnormal outcomes and approximate inference.

Applied35 to 55 minRelated dataset: 401Kpandas, numpy, scipy
nonnormalitylarge-sample tests401K

Module 5

Standard Errors Shrink with n

Asymptotic Standard Errors

Python

Estimate growing GPA2 subsamples and compare standard errors.

Intermediate25 to 40 minRelated dataset: GPA2pandas, numpy
standard errorssample sizeGPA2

Module 5

Histograms, Skewness, and Transformations

Histograms, Normality, and Transformations

Python

Compare WAGE1 residual histograms for wage and log(wage).

Intermediate25 to 40 minRelated dataset: WAGE1pandas, numpy, matplotlib
histogramsskewnesslog transformations

Module 5

LM Test with CRIME1

The Lagrange Multiplier Test

Python

Compute the n-R-squared LM statistic and compare it with exclusion-test logic.

Intermediate25 to 40 minRelated dataset: CRIME1pandas, numpy, statsmodels, patsy
LM testauxiliary regressionCRIME1

Module 5

Asymptotic Efficiency Simulation

Asymptotic Efficiency of OLS

Python

Compare OLS with an alternative consistent estimator in simulation.

Applied35 to 55 minRelated dataset: SIMULATIONpandas, numpy, scipy
asymptotic efficiencysimulationestimator comparison

Module 5

Applied Asymptotics Project

Module 5 Applied Project

Python

Plan a complete large-sample inference workflow with simulations, diagnostics, and limitations.

Applied35 to 55 minRelated dataset: WAGE1pandas, numpy, scipy
applied projectasymptoticsreporting

Module 6

Scaling and Coefficient Interpretation

Why Units Matter in Multiple Regression

Python

Convert slopes across wage units and confirm that fitted relationships do not change when units are handled correctly.

Intermediate25 to 40 minRelated dataset: M6_WAGE_SCALINGpandas, numpy
scalingunit conversioncoefficient interpretation

Module 6

Standardized Betas

Standardized Coefficients

Python

Compare raw and standardized coefficients while avoiding causal importance rankings.

Intermediate25 to 40 minRelated dataset: M6_GPA_INTERACTIONSpandas, numpy
standardized betacomparisoninterpretation

Module 6

Log Models and Percent Changes

Level-Log and Log-Level Models

Python

Practice level-log, log-level, and log-log interpretations with exact percentage conversions.

Intermediate25 to 40 minRelated dataset: M6_SALES_ADVERTISINGpandas, numpy
log modelspercent changeselasticity

Module 6

Quadratic Turning Points

Quadratic Terms and Turning Points

Python

Estimate a quadratic model and calculate turning points and marginal effects.

Intermediate25 to 40 minRelated dataset: M6_HOUSING_LOGSpandas, numpy
quadraticsturning pointsmarginal effects

Module 6

Interaction Effects

Interactions between Continuous Variables

Python

Calculate interaction-based marginal effects at meaningful values.

Intermediate25 to 40 minRelated dataset: M6_GPA_INTERACTIONSpandas, numpy
interactionsdummy variablesmarginal effects

Module 6

Centering Interactions

Centering Variables before Interactions

Python

Show how centering changes coefficient meaning while preserving fitted values.

Intermediate25 to 40 minRelated dataset: M6_GPA_INTERACTIONSpandas, numpy
centeringinteractionscollinearity

Module 6

Adjusted R-Squared and Model Comparison

Adjusted R-Squared and Model Size

Python

Compare candidate specifications using adjusted R-squared and modeling logic.

Intermediate25 to 40 minRelated dataset: M6_POLICY_CONTROLSpandas, numpy, statsmodels, patsy
adjusted R-squaredmodel comparisoncontrols

Module 6

Bad Controls and Precision Controls

Over-Control and Bad Controls

Python

Distinguish harmful controls from safe precision controls.

Intermediate25 to 40 minRelated dataset: M6_POLICY_CONTROLSpandas, numpy, statsmodels, patsy
bad controlsprecision controlsdesign

Module 6

Prediction and Prediction Intervals

Prediction with Multiple Regression

Python

Create fitted predictions and compare mean and individual prediction intervals.

Intermediate25 to 40 minRelated dataset: M6_STARTUP_PREDICTIONpandas, numpy
predictionprediction intervalsuncertainty

Module 6

Log Prediction and Smearing

Predictions when the Dependent Variable Is Logged

Python

Compare naive and smearing-adjusted retransformation from log outcomes.

Intermediate25 to 40 minRelated dataset: M6_HOUSING_LOGSpandas, numpy
log predictionsmearingretransformation

Module 6

Bootstrap Standard Errors Project

Module 6 Applied Forecasting Project

Python

Bootstrap a coefficient and write a careful interpretation with uncertainty.

Applied35 to 55 minRelated dataset: M6_WAGE_SCALINGpandas, numpy
bootstrapstandard errorsproject

Module 7

Binary Variables

Creating Binary Variables

Python

Create and audit binary indicators from transparent rules.

Intermediate25 to 40 minRelated dataset: MODULE7_STUDENT_COMPLETION_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Group Mean Comparisons

Comparing Two Means with Regression

Python

Show how a dummy-only regression reproduces a two-group mean difference.

Intermediate25 to 40 minRelated dataset: MODULE7_WAGE_GROUPS_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Dummy Variables in Log Models

Dummy Variables in Log-Dependent Models

Python

Convert log-dummy coefficients using approximate and exact percentages.

Intermediate25 to 40 minRelated dataset: MODULE7_WAGE_GROUPS_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Multiple Categories

Multiple Categories

Python

Encode categories with a base group and compare coefficient meanings.

Intermediate25 to 40 minRelated dataset: MODULE7_CATEGORY_EFFECTS_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Dummy Interactions

Binary by Binary Interactions

Python

Interpret binary-by-binary interactions as conditional group differences.

Intermediate25 to 40 minRelated dataset: MODULE7_WAGE_GROUPS_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Different Slopes and Centering

Binary by Continuous Interactions

Python

Estimate group-specific slopes and show how centering changes the reference point.

Intermediate25 to 40 minRelated dataset: MODULE7_WAGE_GROUPS_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Chow-Style Group Difference Tests

Full Regression Differences Across Groups

Python

Use interaction restrictions to test full group differences.

Intermediate25 to 40 minRelated dataset: MODULE7_WAGE_GROUPS_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Linear Probability Model

Linear Probability Model

Python

Estimate an LPM and interpret coefficients as probability-point changes.

Intermediate25 to 40 minRelated dataset: MODULE7_STUDENT_COMPLETION_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

LPM Robust Standard Errors

Limitations of the Linear Probability Model

Python

Inspect fitted probabilities and use HC1 robust standard errors.

Intermediate25 to 40 minRelated dataset: MODULE7_LOAN_APPROVAL_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Policy Evaluation and Self-Selection

Policy Evaluation and Self-Selection

Python

Compare randomized and self-selected treatment comparisons.

Intermediate25 to 40 minRelated dataset: MODULE7_PROGRAM_EVALUATION_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Discrete Dependent Variables

Discrete Dependent Variables

Python

Describe count outcomes and explain why discrete models may be needed later.

Intermediate25 to 40 minRelated dataset: MODULE7_DISCRETE_OUTCOME_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 7

Module 7 Capstone

Module 7 Capstone

Python

Complete a full qualitative-variable modeling checklist.

Intermediate25 to 40 minRelated dataset: MODULE7_STUDENT_COMPLETION_SYNTHETICpandas, numpy, statsmodels, patsy
dummy variablesqualitative informationPythonstatsmodels

Module 8

Simulating Heteroskedasticity

What Is Heteroskedasticity?

Python

Generate and visualize changing variance.

Intermediate25 to 40 minRelated dataset: MODULE8_INCOME_SAVINGS_SYNTHETICpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Conventional versus Robust Standard Errors

Robust Standard Errors

Python

Compare conventional, HC0, HC1, HC2, and HC3 standard errors.

Intermediate25 to 40 minRelated dataset: MODULE8_ROBUST_SE_DEMOpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Breusch-Pagan Test

The Breusch-Pagan Test

Python

Run and manually audit the Breusch-Pagan workflow.

Intermediate25 to 40 minRelated dataset: MODULE8_INCOME_SAVINGS_SYNTHETICpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

White Test

The White Test

Python

Use full and fitted-value White diagnostics.

Intermediate25 to 40 minRelated dataset: MODULE8_HOUSING_VARIANCE_SYNTHETICpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Robust Joint Tests

Robust Joint Tests

Python

Test multiple restrictions with robust covariance.

Intermediate25 to 40 minRelated dataset: MODULE8_ROBUST_SE_DEMOpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Weighted Least Squares

Weighted Least Squares Intuition

Python

Choose inverse-variance weights and compare OLS with WLS.

Intermediate25 to 40 minRelated dataset: MODULE8_INCOME_SAVINGS_SYNTHETICpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Population and Group-Size Weights

Group Means, Population Weights, and Aggregated Data

Python

Use group size as a precision weight.

Intermediate25 to 40 minRelated dataset: MODULE8_WLS_GROUP_MEANSpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Feasible GLS

Feasible GLS

Python

Estimate a variance function and fit FGLS.

Intermediate25 to 40 minRelated dataset: MODULE8_FGLS_DEMOpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Robust Standard Errors after WLS

What If the WLS Variance Model Is Wrong?

Python

Compare WLS conventional and robust standard errors.

Intermediate25 to 40 minRelated dataset: MODULE8_FGLS_DEMOpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Prediction Intervals with Changing Variance

Prediction under Heteroskedasticity

Python

Plot prediction intervals under changing variance.

Intermediate25 to 40 minRelated dataset: MODULE8_HOUSING_VARIANCE_SYNTHETICpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

LPM Robust Inference

The Linear Probability Model Revisited

Python

Estimate a linear probability model with HC1 robust standard errors.

Applied35 to 55 minRelated dataset: MODULE8_BINARY_OUTCOME_LPMpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Module 8

Module 8 Capstone

Module 8 Capstone

Python

Complete a full diagnostic and correction workflow.

Intermediate25 to 40 minRelated dataset: MODULE8_INCOME_SAVINGS_SYNTHETICpandas, numpy, statsmodels, patsy
heteroskedasticityrobust standard errorsPythonstatsmodels

Fundamentals of Python for Financial Econometrics

Chapter 1: Welcome to Python and Ceteris LAB

Welcome to Python and Ceteris LAB

Python

How can one language carry an economic question from raw observations to a reproducible conclusion?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
why Python is useful in economics, finance, econometrics, and AIscripts, notebooks, packages, and environmentsRun a small end-to-end analysisRecognize the difference between computation and interpretation

Fundamentals of Python for Financial Econometrics

Chapter 2: Installing and Running Python

Installing and Running Python

Python

What is the least fragile way to move from “I have a computer” to a working, reproducible Python environment?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Choose between local Python, JupyterLab, VS Code, and Google ColabCreate and activate a virtual environmentInstall packages once in a controlled setupDiagnose common kernel and path problems

Fundamentals of Python for Financial Econometrics

Chapter 3: Variables, Values, Types, Strings, and Dates

Variables, Values, Types, Strings, and Dates

Python

How does Python know whether a value is a price, a label, a date, or a logical condition?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Create variables with meaningful namesWork with integers, floats, strings, booleans, and NoneFormat text and numeric resultsParse and compare dates safely

Fundamentals of Python for Financial Econometrics

Chapter 4: Collections, Indexing, and Slicing

Collections, Indexing, and Slicing

Python

How should related values be organized so that the structure communicates what operations are legitimate?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
lists, tuples, dictionaries, and setsIndex and slice ordered collectionsBuild nested structuresChoose a collection based on meaning rather than habit

Fundamentals of Python for Financial Econometrics

Chapter 5: Decisions, Loops, and Iteration

Decisions, Loops, and Iteration

Python

How can a script apply a rule repeatedly while remaining easy to inspect?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Write conditional branchesIterate with for and while loopsenumerate and zipRecognize when vectorization is clearer

Fundamentals of Python for Financial Econometrics

Chapter 6: Functions, Modules, Errors, and Testing

Functions, Modules, Errors, and Testing

Python

How can a calculation be trusted when it is reused in several chapters or projects?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Define reusable functionsValidate arguments and raise meaningful errorsImport modules without hidden stateassertions and tests for expected behaviour

Fundamentals of Python for Financial Econometrics

Chapter 7: Files, Paths, Projects, and Reproducibility

Files, Paths, Projects, and Reproducibility

Python

How can a project find its data tomorrow, on another computer, and after being uploaded to a website?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Build a portable project treepathlib and relative pathsSeparate raw, frozen, processed, and generated filesRecord versions, sources, and random seeds

Fundamentals of Python for Financial Econometrics

Chapter 8: NumPy and Numerical Computing

NumPy and Numerical Computing

Python

Why are numerical arrays faster and more expressive than repeatedly updating Python lists?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Create NumPy arraysUnderstand shape, dtype, broadcasting, and vectorizationGenerate reproducible random samplesPerform matrix and linear-algebra operations

Fundamentals of Python for Financial Econometrics

Chapter 9: pandas Fundamentals

pandas Fundamentals

Python

How can a rectangular dataset preserve labels, dates, and missing values while supporting fast analysis?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Create Series and DataFramesInspect rows, columns, indexes, and dtypesSelect, filter, sort, and assign variablesmethod chains without hiding intermediate meaning

Fundamentals of Python for Financial Econometrics

Chapter 10: Importing, Cleaning, Validating, and Exporting Data

Importing, Cleaning, Validating, and Exporting Data

Python

How can messy input be transformed without erasing the evidence of what was changed?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Read common tabular formatsParse dates and numeric columns explicitlyHandle missing, duplicate, invalid, and extreme valuesWrite validation checks and export clean data

Fundamentals of Python for Financial Econometrics

Chapter 11: Manipulating, Grouping, Reshaping, and Joining Data

Manipulating, Grouping, Reshaping, and Joining Data

Python

How can information be reorganized without accidentally changing the number or meaning of observations?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Aggregate with groupbyMove between wide and long formsMerge tables using keysDiagnose duplicate keys and many-to-many joins

Fundamentals of Python for Financial Econometrics

Chapter 12: Data Visualization with Python

Data Visualization with Python

Python

What should a figure reveal that a table or coefficient cannot show as clearly?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib
Construct line, scatter, distribution, and categorical chartsLabel units, sources, and transformationsDesign for accessibility and grayscale printingRecognize misleading scales and overplotting

Fundamentals of Python for Financial Econometrics

Chapter 13: Descriptive Statistics and Exploratory Data Analysis

Descriptive Statistics and Exploratory Data Analysis

Python

How can a dataset be summarized without letting one number erase its shape?

Beginner15 to 25 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib
Calculate location, spread, shape, and dependence statisticsCompare conventional and robust summariesskewness and kurtosisplots and tables together

Fundamentals of Python for Financial Econometrics

Chapter 14: Probability, Simulation, and Statistical Inference

Probability, Simulation, and Statistical Inference

Python

How can uncertainty be represented, simulated, and summarized without pretending that one sample is the population?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy, scipy
Work with random variables and common distributionsMonte Carlo simulationsampling distributions and standard errorsconfidence intervals, tests, and power

Fundamentals of Python for Financial Econometrics

Chapter 15: Regression and Econometrics with Python

Regression and Econometrics with Python

Python

What does a regression coefficient mean, and which assumptions are needed before it can support an economic claim?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib, statsmodels, patsy
Estimate simple and multiple linear regressionscoefficients, interactions, and uncertaintyDiagnose residual patterns and heteroskedasticityexplanatory inference from predictive evaluation

Fundamentals of Python for Financial Econometrics

Chapter 16: Obtaining Economic and Financial Data

Obtaining Economic and Financial Data

Python

How can a live data source be used without making the analysis disappear when the network or provider changes?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Retrieve data from authoritative APIsRecord series IDs, units, frequencies, and retrieval datesCache legally redistributable snapshotsBuild graceful fallbacks and error handling

Fundamentals of Python for Financial Econometrics

Chapter 17: Econometric Thinking and Research Design

Econometric Thinking and Research Design

Python

What exactly are we trying to learn from economic data?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
economic model versus econometric modelpopulation, sample, parameter, estimate, and estimanddata-generating processesexogeneity and endogeneity

Fundamentals of Python for Financial Econometrics

Chapter 18: Simple Linear Regression

Simple Linear Regression

Python

How does consumption change with income in a simple model?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib, statsmodels, patsy
population regression functionordinary least squaresintercept and slopefitted values and residuals

Fundamentals of Python for Financial Econometrics

Chapter 19: Multiple Regression and the Ceteris Paribus Interpretation

Multiple Regression and the Ceteris Paribus Interpretation

Python

How can we compare two people while holding other observed characteristics constant?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
multiple explanatory variablespartial effectsceteris paribus interpretationconfounding

Fundamentals of Python for Financial Econometrics

Chapter 20: Functional Forms, Dummy Variables, and Interactions

Functional Forms, Dummy Variables, and Interactions

Python

When is a one-unit change not the right way to describe an economic relationship?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
log-level, level-log, and log-log modelselasticitiesquadratic termsdummy variables

Fundamentals of Python for Financial Econometrics

Chapter 21: Inference, Robust Standard Errors, and Diagnostics

Inference, Robust Standard Errors, and Diagnostics

Python

How certain should we be about an estimated coefficient?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
sampling uncertaintystandard errorst tests and confidence intervalsjoint F tests

Fundamentals of Python for Financial Econometrics

Chapter 22: Omitted Variables, Measurement Error, Simultaneity, and Endogeneity

Omitted Variables, Measurement Error, Simultaneity, and Endogeneity

Python

Why can a beautifully estimated regression still answer the wrong question?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
omitted-variable biasbad controlsmeasurement errorreverse causality

Fundamentals of Python for Financial Econometrics

Chapter 23: Instrumental Variables and Two-Stage Least Squares

Instrumental Variables and Two-Stage Least Squares

Python

Can we isolate useful variation in an endogenous explanatory variable?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
instrument relevanceexclusion restrictionfirst stagereduced form

Fundamentals of Python for Financial Econometrics

Chapter 24: Panel Data and Fixed Effects

Panel Data and Fixed Effects

Python

What can repeated observations teach us that a single cross-section cannot?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
entity and time effectspooled OLSfirst differencesfixed effects

Fundamentals of Python for Financial Econometrics

Chapter 25: Binary, Ordered, and Count Outcomes

Binary, Ordered, and Count Outcomes

Python

How should we model outcomes that are probabilities, categories, or event counts?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
linear probability modellogit and probitodds and marginal effectsordered logit and probit

Fundamentals of Python for Financial Econometrics

Chapter 26: Censoring, Selection, Quantiles, and Robust Methods

Censoring, Selection, Quantiles, and Robust Methods

Python

What if the mean is not the whole story, or part of the outcome is unobserved?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
censoring and truncationsample selectionmissing-data mechanismssurvey weights

Fundamentals of Python for Financial Econometrics

Chapter 27: Potential Outcomes and Randomized Experiments

Potential Outcomes and Randomized Experiments

Python

What does a causal effect mean for one unit, and why can we never observe both potential outcomes?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
potential outcomesindividual and average treatment effectsfundamental problem of causal inferencerandom assignment

Fundamentals of Python for Financial Econometrics

Chapter 28: Matching, Propensity Scores, Weighting, and Doubly Robust Estimation

Matching, Propensity Scores, Weighting, and Doubly Robust Estimation

Python

How can observational studies improve comparability when treatment is not randomized?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
selection on observablespropensity scoreoverlapcommon support

Fundamentals of Python for Financial Econometrics

Chapter 29: Difference-in-Differences and Event Studies

Difference-in-Differences and Event Studies

Python

How can policy evaluation use changes over time when randomized assignment is unavailable?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
treated and comparison groupsparallel trendstwo-period DIDregression implementation

Fundamentals of Python for Financial Econometrics

Chapter 30: Regression Discontinuity

Regression Discontinuity

Python

What can a policy cutoff reveal about causal effects near the threshold?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
running variablecutoffsharp and fuzzy designslocal polynomial regression

Fundamentals of Python for Financial Econometrics

Chapter 31: Synthetic Control and Comparative Case Studies

Synthetic Control and Comparative Case Studies

Python

How can one treated region be compared with a data-driven combination of untreated regions?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
treated unit and donor poolpre-treatment fitsynthetic weightspredictor balance

Fundamentals of Python for Financial Econometrics

Chapter 32: Regularization and High-Dimensional Economic Models

Regularization and High-Dimensional Economic Models

Python

How do we build stable predictions when the number of candidate predictors becomes large?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
ridge regressionlassoelastic netstandardization

Fundamentals of Python for Financial Econometrics

Chapter 33: Decision Trees, Random Forests, and Boosting for Economic Prediction

Decision Trees, Random Forests, and Boosting for Economic Prediction

Python

Can flexible nonlinear models improve prediction without pretending to identify causal effects?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
recursive partitioningtree depth and pruningbaggingrandom forests

Fundamentals of Python for Financial Econometrics

Chapter 34: Causal Machine Learning and Double Machine Learning

Causal Machine Learning and Double Machine Learning

Python

How can flexible prediction tools help estimate causal parameters without replacing identification assumptions?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib
nuisance functionsorthogonal scoresresidualizationcross-fitting

Fundamentals of Python for Financial Econometrics

Chapter 35: Explainability, Uncertainty, and Model Governance

Explainability, Uncertainty, and Model Governance

Python

How do we decide whether a powerful prediction model is trustworthy enough to use?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
coefficients versus feature importancepermutation importancepartial dependenceSHAP as an optional tool

Fundamentals of Python for Financial Econometrics

Chapter 36: Introduction to Time-Series Data

Introduction to Time-Series Data

Python

What changes when observations are ordered in time and yesterday can influence today?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Create and validate time indexeslevels, changes, growth rates, and returnsResample data with appropriate aggregationHandle missing dates and trading calendars

Fundamentals of Python for Financial Econometrics

Chapter 37: Dependence, Stationarity, and White Noise

Dependence, Stationarity, and White Noise

Python

How can we tell whether a time series contains predictable linear structure rather than random fluctuation?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Define weak stationarity and white noiseCompute and interpret ACF and PACFApply Ljung-Box and unit-root diagnosticsRecognize volatility clustering and nonlinear dependence

Fundamentals of Python for Financial Econometrics

Chapter 38: AR, MA, ARMA, ARIMA, and Forecasting

AR, MA, ARMA, ARIMA, and Forecasting

Python

How can past values and past shocks be organized into a model that produces honest forecasts and uncertainty?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
AR and MA dynamicsACF, PACF, AIC, and BIC for model guidanceEstimate ARIMA models with statsmodelsEvaluate point and interval forecasts out of sample

Fundamentals of Python for Financial Econometrics

Chapter 39: Unit Roots, Seasonality, and Dynamic Regression

Unit Roots, Seasonality, and Dynamic Regression

Python

How can a model distinguish persistent trend, recurring seasonality, and serially correlated errors?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
Diagnose unit roots and differencing needsApply seasonal differencing and decompositionEstimate SARIMA and SARIMAX modelsregression with time-series errors cautiously

Fundamentals of Python for Financial Econometrics

Chapter 40: ARCH and GARCH Models

ARCH and GARCH Models

Python

How can returns be difficult to predict while their volatility remains persistent and forecastable?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib
conditional variance and volatility clusteringTest for ARCH effectsEstimate ARCH and GARCH modelsDiagnose standardized residuals and forecast volatility

Fundamentals of Python for Financial Econometrics

Chapter 41: Asymmetric, Advanced, and Realized Volatility

Asymmetric, Advanced, and Realized Volatility

Python

Why can equally large negative and positive shocks have different volatility consequences, and what can intraday or OHLC data add?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Compare EGARCH, GJR-GARCH, APARCH, and GARCH-M conceptsleverage and news-impact curvesCalculate rolling, EWMA, realized, and range-based volatilityDiscuss microstructure noise and overnight information

Fundamentals of Python for Financial Econometrics

Chapter 42: Nonlinear Models, Regimes, Market Microstructure, and Ordered Outcomes

Nonlinear Models, Regimes, Market Microstructure, and Ordered Outcomes

Python

What if the same lag has a different effect in calm and stressed regimes, or the observed price change is an ordered category?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
Simulate and interpret threshold autoregressionMarkov-switching regimes and expected durationmarket-microstructure effectsEstimate and interpret ordered probit probabilities

Fundamentals of Python for Financial Econometrics

Chapter 43: Stochastic Processes and Option Pricing

Stochastic Processes and Option Pricing

Python

How can continuous-time uncertainty be simulated and translated into a no-arbitrage option value?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Simulate Brownian motion and geometric Brownian motionIto’s lemma intuitivelyCalculate European option payoffs and Black-Scholes pricesMonte Carlo and sensitivity analysis

Fundamentals of Python for Financial Econometrics

Chapter 44: Financial Risk Management

Financial Risk Management

Python

How much could be lost, how often should that threshold be exceeded, and what happens beyond it?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Define a loss variable and coherent risk principlesCalculate VaR and Expected ShortfallCompare historical, parametric, GARCH, and EVT methodsBacktest exceedances and discuss stress testing

Fundamentals of Python for Financial Econometrics

Chapter 45: Multiple Time Series

Multiple Time Series

Python

When several series move together, which relationships are short-run predictive and which are long-run equilibrating?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Compute cross-correlation structuresEstimate and diagnose VAR modelsGranger predictability and impulse responses cautiouslyTest cointegration and describe VECM adjustment

Fundamentals of Python for Financial Econometrics

Chapter 46: Econometrics and Machine Learning: Different Questions, Shared Tools

Econometrics and Machine Learning: Different Questions, Shared Tools

Python

Which tasks deserve the label AI, and which claims collapse when we ask what data, objective, and evaluation produced the result?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
AI, machine learning, deep learning, and generative AISeparate rule-based systems from learned modelsregression, classification, generation, and retrievalIdentify hallucination, bias, privacy, and deepfake risks

Fundamentals of Python for Financial Econometrics

Chapter 47: Machine-Learning Workflow and Gradient Descent for Economic Data

Machine-Learning Workflow and Gradient Descent for Economic Data

Python

How can a model be trained without letting information from the future or test set leak into the learning process?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Define features, labels, train, validation, and test setsRecognize overfitting, underfitting, and leakageloss functions and gradient descentBuild reproducible preprocessing pipelines

Fundamentals of Python for Financial Econometrics

Chapter 48: Applied Economic Prediction and Classification Projects

Applied Economic Prediction and Classification Projects

Python

How can an end-to-end workflow turn housing and passenger data into models that are evaluated honestly and interpreted carefully?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, matplotlib, statsmodels, patsy
Build a regression workflow with the Tehran housing dataBuild a classification workflow with Titanic datapipelines, cross-validation, and multiple metricsAnalyze residuals, confusion matrices, and subgroup performance

Fundamentals of Python for Financial Econometrics

Chapter 49: Neural Networks and Deep Learning for Economic Data

Neural Networks and Deep Learning for Economic Data

Python

How does a stack of simple differentiable units learn a nonlinear mapping, and how do we know it has not merely memorized the training sample?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
neurons, activations, layers, and forward passesbackpropagation and optimizationTrain a small PyTorch networklearning curves, regularization, and validation

Fundamentals of Python for Financial Econometrics

Chapter 50: Computer Vision and Spatial Economic Measurement

Computer Vision and Spatial Economic Measurement

Python

How does a model transform pixels into useful local patterns without being told the exact edge or texture to search for?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Represent images as arraysconvolution, stride, padding, and channelsCNNs, augmentation, and transfer learningEvaluate errors, bias, and privacy

Fundamentals of Python for Financial Econometrics

Chapter 51: Natural-Language Processing and Transformers for Economics

Natural-Language Processing and Transformers for Economics

Python

How can text be converted into numerical representations while preserving enough context to classify or retrieve meaning?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Tokenize and vectorize textTF-IDF and word embeddingscosine similarity, attention, and transformersEvaluate text classifiers and language limitations

Fundamentals of Python for Financial Econometrics

Chapter 52: Language Models, Retrieval, and AI Agents for Econometric Research

Language Models, Retrieval, and AI Agents for Econometric Research

Python

How can a language model answer from a controlled evidence collection, use tools, and still remain subject to verification?

Intermediate25 to 40 minRelated dataset: Ceteris Lab teaching samplepandas, numpy, statsmodels, patsy
next-token prediction and context windowsBuild a simple retrieval-augmented workflowagent loops, tools, memory, and stopping conditionsEvaluate grounding, privacy, cost, and safety

Fundamentals of Python for Financial Econometrics

Chapter 53: Capstone Projects and Student Portfolio

Capstone Projects and Student Portfolio

Python

How can a student transform code fragments into a defensible, reproducible analytical product for the Ceteris LAB website or a professional portfolio?

Applied35 to 55 minRelated dataset: Ceteris Lab teaching samplepandas, numpy
Plan a complete project from question to communicationauthoritative data and a data dictionaryCompare baseline and advanced models out of samplePackage code, figures, limitations, and reproducibility files