This project simulates an institutional investment management workflow for building, monitoring, and rebalancing a multi-asset ETF portfolio.
The engine converts an Investment Policy Statement (IPS) profile into portfolio constraints, constructs a recommended allocation, validates policy limits, compares the portfolio against a benchmark, analyzes risk contribution, runs stress tests, monitors drift, generates rebalancing trades, and produces an investment committee-style Excel report and memo.
The project is educational and does not represent financial advice, a live investment recommendation, or production investment management software.
- Builds a Balanced Growth portfolio using IPS constraints
- Allocates across equity, fixed income, alternatives, and cash
- Validates allocation rules such as max ETF weight, SPY/AGG anchors, HYG cap, and asset-class ranges
- Calculates return, volatility, Sharpe ratio, Sortino ratio, drawdown, tracking error, information ratio, VaR, and CVaR
- Compares the portfolio against a 60/40 SPY/AGG benchmark
- Estimates ETF-level risk contribution using the covariance matrix
- Runs full-portfolio and equity-sleeve factor diagnostics
- Stress-tests the allocation under equity bear market, rate shock, inflation shock, credit-spread widening, and risk-on scenarios
- Monitors policy drift and generates rebalancing trade recommendations
- Produces an Excel investment committee report and investment memo
The final Balanced Growth model allocation is:
- Equity: 45.0%
- Fixed Income: 40.0%
- Alternatives: 8.6%
- Cash: 6.4%
Key portfolio metrics:
- Annualized return: 3.21%
- Annualized volatility: 9.13%
- Max drawdown: -15.63%
- Tracking error vs benchmark: 4.75%
- 95% historical VaR: -3.76%
- 95% historical CVaR: -5.04%
Risk contribution analysis identifies SPY, QQQ, and EFA as the largest estimated contributors to portfolio volatility. The rebalancing engine identifies 3 drift breaches and generates trade actions for SPY, AGG, and HYG.
The project follows a portfolio analyst workflow:
- Create synthetic IPS profiles.
- Fetch public ETF data where available, with deterministic fallback data for reproducible offline runs.
- Convert daily prices to month-end ETF returns.
- Build IPS benchmark returns.
- Construct constrained portfolio candidates.
- Select an IPS Recommended Portfolio.
- Validate IPS constraints.
- Calculate risk and return metrics.
- Estimate risk contribution from the covariance matrix.
- Run full-portfolio and equity-sleeve factor diagnostics.
- Apply market stress scenarios.
- Generate rebalancing trades from synthetic drifted current weights.
- Produce charts, CSV outputs, an Excel report, and a committee memo.
The allocation universe includes:
- SPY, QQQ, IWM, EFA, EEM for equity exposure
- AGG, TLT, SHY, LQD, HYG for fixed income and credit exposure
- VNQ, GLD, DBC for alternatives and real assets
- SGOV as a cash / T-bill proxy
Portfolio construction uses scipy.optimize with no shorting, full-investment constraints, IPS asset-class ranges, ETF-level minimums and caps, and concentration penalties.
The recommended allocation is not positioned as an attempt to beat a benchmark. It is positioned as an IPS-driven allocation that balances policy fit, diversification, downside awareness, benchmark tracking, and governance.
Key output files:
output/investment_committee_report.xlsxoutput/investment_memo.mdoutput/recommended_allocation.csvoutput/portfolio_risk_summary.csvoutput/risk_contribution_summary.csvoutput/stress_test_results.csvoutput/rebalancing_trades.csvoutput/constraints_validation.csv
Key charts:
charts/recommended_allocation.pngcharts/cumulative_performance_vs_benchmark.pngcharts/drawdown_comparison.pngcharts/risk_contribution.pngcharts/stress_test_results.pngcharts/policy_drift.png
Install dependencies:
pip install -r requirements.txtRun the full pipeline:
python main.pyRun tests:
pytest -qips-driven-asset-allocation-engine/
├── README.md
├── requirements.txt
├── main.py
├── src/
├── tests/
├── data/
│ ├── raw/
│ └── processed/
├── output/
├── charts/
└── docs/
└── screenshots/
The project uses public ETF price data where available and deterministic synthetic fallback data when downloads fail. IPS profiles are synthetic because real client IPS data is private.
- Historical and fallback data may not represent future market conditions.
- Optimizer outputs are sensitive to return samples, covariance estimates, and constraints.
- ETF proxies do not capture full fund due diligence, liquidity review, taxes, or account-level restrictions.
- Stress tests are deterministic approximations and should not be treated as comprehensive scenario analysis.
- This is an educational workflow, not financial advice or production investment software.
- Separate equity-sleeve and fixed-income-sleeve attribution
- Add transaction-lot-level rebalancing
- Add Black-Litterman expected return inputs
- Add regime-aware optimization
- Add tax-aware rebalancing
- Add liquidity scoring
- Add manager/fund due diligence layer




