AdvancedQuantitative MethodsPython
Run this module
Quantitative Methods – Time Series Utility¶
Overview¶
This utility introduces core time-series techniques used in quantitative finance. It serves as a bridge between the intermediate and advanced curriculum (Documentation/Programs/level3_financial.py and level4_advanced.py) and gives you reusable helpers for analyzing historical price data.
Key Skills¶
- Generating and cleaning time-series price data
- Calculating rolling statistics (moving averages, volatility)
- Computing autocorrelation and partial autocorrelation
- Performing stationarity checks (Augmented Dickey-Fuller)
- Building a simple AR(1) forecast as a baseline model
Files¶
time_series_tools.py: Guided walkthrough with annotated prints and helper functions
How to Run¶
Open the script while it runs to follow the inline commentary.Dependencies¶
- pandas
- numpy
- statsmodels (for the ADF test)
Install them with:
Practice Ideas¶
- Swap the simulated data with real prices from
yfinance - Experiment with different rolling window lengths for volatility
- Extend the AR(1) section to ARIMA using
statsmodels.tsa.arima.model
Related Modules¶
Documentation/Programs/level3_financial.pyDocumentation/Programs/level4_advanced.pyUTILS - Technical Indicators/
Continue in Quantitative Methods¶
-
Quantitative Methods - Bayesian Inference
A strategy wins 7 of its first 10 trades. Is its true win rate 70%? Almost
-
Quantitative Methods - Bootstrap
The bootstrap estimates the sampling distribution of any statistic by resampling the observed data with replacement — no normality assumption required. It is the honest way to put confidence intervals around backtest metrics like Sharpe ratio, mean return, or maximum drawdown.
-
Quantitative Methods - Cointegration
Cointegration: two non-stationary series whose linear combination is stationary. Backbone of statistical arbitrage and pairs trading.
-
Quantitative Methods - Copulas
This module demonstrates the concept of Copulas, specifically the Gaussian Copula, used in quantitative finance to model the dependency structure between multivariate random variables.
-
Quantitative Methods - Extreme Value Theory
Most risk models assume returns are normally distributed. They are not —
-
Quantitative Methods - Factor Models
Factor models explain asset returns as a linear combination of systematic factors plus a stock-specific residual. The Fama-French 3-Factor Model (1992) extended CAPM by adding two well-documented risk premia: the Size premium (SMB) and the Value premium (HML), dramatically improving the explanation of cross-sectional stock returns.