Python for Quantitative Finance
Master Python programming with a focus on quantitative finance applications. Build fluency with NumPy, pandas, vectorisation, and practical workflows used in quant interviews and day-to-day research.
Clean messy price data, fix ordering issues, and compute daily returns from raw market inputs.
Download the starter pack for this project. You are given messy daily prices in data/prices.csv (unsorted dates, missing prices, and duplicate rows). Implement the incomplete functions in src/clean.py and src/returns.py, then make src/pipeline.py run end-to-end so it writes cleaned_prices_with_returns.csv with columns date, price, and returns. Do not rely on live market APIs — use only the starter files. Your submission should feel like a serious junior quant take-home, not a toy script.
- •Completed implementations in src/clean.py and src/returns.py
- •A working src/pipeline.py entrypoint that reads data/prices.csv and writes cleaned_prices_with_returns.csv
- •A short README note describing cleaning assumptions and design decisions
- •All included tests passing locally with pytest
- •Dates are ordered correctly before returns are computed
- •Duplicate or inconsistent records are handled with a clear policy
- •Missing values are handled in a sensible and consistent way
- •Return calculation is correct and clearly implemented
- •Code is readable and broken into sensible helper functions
- •Cleaned raw financial time series data into analysis-ready format
- •Computed return series with sensible handling of missing values and ordering issues
- •Computing returns before sorting by date
- •Dropping too much data instead of handling missing values sensibly
- •Using an incorrect return formula
- •Hiding assumptions instead of documenting them clearly