Repository navigation
Version 1.1 introduces modularisation, a cleaner architecture, a backtest module, and a significant usability upgrade:
- Modular Code Structure
Core logic is now split across:
- portfolio_optimiser_v1.1.py (main script)
- utils.py (core functions and definitions)
- test_backtest.py (unit and sanity tests)
- Yahoo Finance Integration
No need to fetch your own historical data (but you still can if you prefer it that way!).
- Automatic price data fetching from Yahoo Finance via the yfinance package.
- Local caching added to avoid redundant downloads on re-runs (saves data in yahoo_cache/).
- Backtest Module with Key Metrics
The most important addition of this release!
- Test strategies over time and calculate the cumulated P&L
- Prints CAGR, annualised volatility, Sharpe/Sortino ratios and Max Drawdown for each asset.
- Test File Added: test_backtest.py
Contains unit tests and sanity checks for optimisation structure and numerical stability.
Useful for debugging edge cases or validating results after code updates