Adaptive Portfolio Intelligence System (APIS)
Author / Written by: Anthony De Ruiter
Data-driven finance capstone applying Python for Data Analysis and Python for Finance to Canadian energy equities.
A comprehensive project demonstrating clean code, interpretive visuals, and methods from both books applied to an original domain—TSX-listed energy stocks (e.g. CNQ, Suncor, Cenovus)—rather than copying textbook examples.
View full report with code and outputs →
Overview
The APIS project is an 18-section report that maps to the majority of Python for Data Analysis (pydata-book) and Python for Finance content. Each section includes docstrings, commentary, and described visual outputs. All code in this project is original work.
Highlights
- Original domain — All techniques are applied to Canadian energy equities (TSX-listed stocks such as CNQ, Suncor, Cenovus), not taken directly from the textbooks.
- 18 sections — From environment setup through derivatives valuation and Kelly Criterion capital management.
- 4 custom OOP classes —
Portfolio, RiskEngine, BSMOption, GeometricBrownianMotion — demonstrating use of the Python data model.
- Coverage matrix — End-of-report mapping of each book chapter to its corresponding project section.
- Documented code — Docstrings, commentary, and visual outputs throughout.
Topics Covered
- Basics: Data types and structures, NumPy vectorization, pandas analytics, object-oriented programming
- Financial data science: Data visualization, financial time series, I/O operations, performance Python (including Numba)
- Math and stochastics: Mathematical tools, stochastic processes (GBM, Merton jump diffusion, CIR), variance reduction, valuation
- Statistics: Normality tests, portfolio optimization (efficient frontier, capital market line), Bayesian statistics, machine learning
- Algorithmic trading: Trading strategies (e.g. simple moving averages, ML-based), backtesting, Kelly Criterion capital management
- Derivatives: Valuation framework, simulation of financial models, derivatives valuation (European and American, e.g. LSMC), portfolio and market-based valuation
The report ties these together with NumPy vectorization, pandas workflows, stochastic simulation, VaR/CVaR risk analytics, BSM options pricing with Greeks, and performance benchmarking with Numba.
Tech Stack
- Language: Python 3
- Libraries: NumPy, pandas, SciPy, Numba, Matplotlib/Plotly (or similar for visuals)
- References: Python for Data Analysis (Wes McKinney), Python for Finance (Yves Hilpisch)
References