Laboratory Sessions
Hands-on Python coding for financial data science
Laboratory Sessions
Laboratory sessions are where theory meets practice. Each week, you’ll implement statistical methods, analyse financial data, and build skills that transfer to professional tools.
Lab Philosophy
Our labs follow the principle of active learning. You’ll write code, debug problems, and build real applications rather than just following tutorials. This approach ensures you develop practical skills that transfer directly to industry roles.
How labs run
All labs are scheduled in the Financial Innovation Lab where Bloomberg Terminals are available. Each lab has:
- In-class component: Work with Bloomberg data during the session
- Take-home fallback: Pre-collected data or free APIs for homework/Colab
You can start labs before class using the Colab notebooks (Colab repo). Bloomberg-specific exercises are completed in class.
12-Week Lab Schedule
Foundations Block (Weeks 1-4)
| Week | Lab | Focus | Bloomberg component |
|---|---|---|---|
| 1 | Lab 1: Primer | Bias-variance, uncertainty, validation | : |
| 2 | Lab 2: Data & Measurement · Lab 2 Bloomberg | Data pipelines, survivorship bias | UK banking crisis extraction |
| 3 | Lab 3: Time Series · Lab 3 Bloomberg | Stationarity, ACF/PACF, ARIMA | SPY/VIX extraction |
| 4 | Lab 4: Volatility · Lab 4 Bloomberg | GARCH estimation, VIX vs realised | Volatility risk premium |
Applications Block (Weeks 5-8)
| Week | Lab | Focus | Bloomberg component |
|---|---|---|---|
| 5 | Lab 5: Robo-Advisors | Mean-variance, portfolio optimisation | ETF data, PORT analytics |
| 6 | Lab 6: Alternative Finance | Credit scoring, ML classification | : (P2P data) |
| 7 | Lab 7: When Does Complexity Pay? | Bias-variance, out-of-sample validation, factor signals | : |
| 8 | Lab 8a: Cryptocurrency · Lab 8b: Fraud Detection | Crypto volatility and market structure; anomaly detection | CRYP function |
Advanced Block (Weeks 9-12)
| Week | Lab | Focus | Bloomberg component |
|---|---|---|---|
| 9 | Lab 9: Factor Investing | Cross-sectional regression, alpha testing | Factor exposures (EQS) |
| 10 | Lab 10: Backtesting & Validation | CSCV, PBO, PSR/DSR, walk-forward validation | : |
| 12 | Lab 12: Synthesis | Integration, professional development | Capstone project |
Lab Details
Week 1: Foundations
Lab 1: Data Science Primer
Duration: 60–90 minutes
This lab accompanies the Week 1 lecture on statistical foundations. It introduces key concepts through hands-on Python exercises.
Objectives:
- Refresh core Python, plotting, and data handling
- Explore bias-variance tradeoff with visualisations
- Understand uncertainty quantification basics
Week 2: Data & Measurement
Lab 2: Data & Measurement
Duration: 2–3 hours
Build data pipelines, learn Bloomberg Terminal basics, and quantify survivorship bias using the UK banking crisis.
Objectives:
- Build resilient data pipelines with validation
- Extract professional data from Bloomberg Terminal
- Quantify survivorship bias with UK banking crisis data
- Compare free APIs vs professional data sources
Homework: Lab 2: Data & Measurement (Colab, pre-collected Bloomberg data). In class: Lab 2: Survivorship Bias in UK Banking (Bloomberg Excel add-in, Financial Innovation Lab). You can run the survivorship analysis in Colab after the Bloomberg session: open the Colab notebook from the lab page, then export your Excel sheet as CSV and upload it in Step 5.
Open Lab 2 (homework) · Open Lab 2 (in-class Bloomberg)
Week 3: Time Series Foundations
Lab 3: Time Series Analysis
Duration: 2–3 hours
Apply the “Three Prediction Problems” framework: test whether ARIMA beats naive forecasts for returns (spoiler: it doesn’t).
Objectives:
- Test stationarity with ADF and visual methods
- Interpret ACF/PACF for model selection
- Validate: does ARIMA beat naive for returns?
- Extract SPY and VIX from Bloomberg Terminal (in-class)
Homework: Lab 3: Time Series Foundations (Colab, pre-collected Bloomberg data). In class: Lab 3: SPY and VIX Extraction (Bloomberg Terminal, Financial Innovation Lab). Extract SPY and VIX yourself, export to CSV, run stationarity diagnostics on your own data.
Open Lab 3 (homework) · Open Lab 3 (in-class Bloomberg)
Week 4: Volatility Modelling
Lab 4: Volatility Modelling
Duration: 2–3 hours
Model the second prediction problem: volatility. Unlike returns, volatility is predictable. Analyse the volatility risk premium using Bloomberg data.
Objectives:
- Estimate GARCH(1,1) models
- Compare symmetric vs asymmetric specifications
- Analyse VIX vs realised volatility
- Quantify the volatility risk premium
Homework: Lab 4: Volatility Modelling (Colab, Bloomberg parquet data). In class: Lab 4: VIX/GARCH Bloomberg (Bloomberg Terminal, Financial Innovation Lab). Extract VIX and S&P 500 data yourself and analyse the volatility risk premium with live Bloomberg data.
Open Lab 4 (homework) · Open Lab 4 (in-class Bloomberg)
Week 5: Robo-Advisors & Portfolio
Lab 5: Portfolio Optimisation
Duration: 2 hours
Implement mean-variance optimisation and understand how robo-advisors automate portfolio construction.
Objectives:
- Calculate VaR and CVaR
- Implement efficient frontier
- Perform Monte Carlo simulation
Week 6: Alternative Finance
Lab 6: Credit Scoring & ML
Duration: 2 hours
Apply ML classification to P2P lending data. Understand model calibration and fairness.
Objectives:
- Build credit scoring models
- Evaluate with AUC, calibration curves
- Address class imbalance
Week 7: From Linear Models to Machine Learning
Lab 7: When Does Complexity Pay?
Duration: 75–90 minutes
Bridge the Week 7 lecture to CW2 by making the bias-variance tradeoff visible in UK equity factor data. You will compare simple benchmarks to more flexible models, and see why out-of-sample evaluation is the non-negotiable discipline of financial prediction.
Objectives:
- Compute and compare UK factor Sharpe ratios
- Build a simple equal-weighted multi-factor benchmark
- Demonstrate the in-sample versus out-of-sample gap in OLS prediction
- Explore how tree depth controls overfitting
- Use walk-forward validation to avoid look-ahead bias
Week 8a: Cryptocurrency
Lab 8a: Digital Asset Data Analysis
Duration: 2 hours
Analyse cryptocurrency market structure, volatility patterns, and efficiency.
Objectives:
- Compare crypto versus equity volatility
- Detect volatility regimes
- Apply GARCH to digital assets
Week 8b: Fraud Detection
Lab 8b: Anomaly Detection
Duration: 2 hours
Build fraud detection systems using classification and anomaly detection methods.
Objectives:
- Handle highly imbalanced data
- Implement cost-sensitive learning
- Evaluate with precision-recall
Week 9: Factor Investing
Lab 9: Factor Replication
Duration: 90 minutes
Understand factor investing through replication. Test whether factors deliver alpha after costs.
Objectives:
- Replicate academic factor strategies
- Use HAC standard errors
- Assess robustness to transaction costs
Week 10: Backtesting & Validation
Lab 10: Avoiding Overfitting
Duration: 90 minutes
Learn rigorous backtesting methods to avoid false discoveries. Principles-first coverage of the ideas that apply across all three CW2 scaffolds.
Objectives:
- Implement CSCV (Combinatorially Symmetric Cross-Validation) for strategy selection
- Calculate Probability of Backtest Overfitting (PBO)
- Compute the Deflated Sharpe Ratio (DSR) for multiple-testing-adjusted significance
- Use walk-forward validation and embargo periods
Week 12: Synthesis
Lab 12: Course Integration
Duration: 2 hours
Bring together all concepts in a comprehensive project.
Objectives:
- Integrate methods from the course
- Present analysis professionally
- Reflect on learning journey
Lab Resources
Colab Access
Each lab links to a Colab notebook for cloud-based execution:
[](https://colab.research.google.com/github/quinfer/fin510-colab-notebooks/blob/main/labs/[notebook].ipynb)Bloomberg integration
All labs are run in the Financial Innovation Lab where Bloomberg Terminals are available. Labs with a “Bloomberg component” (see schedule table) include exercises that use the Terminal for professional data extraction. Each lab also includes take-home fallback options using pre-collected data or free APIs, so you can complete work outside the lab.