A comprehensive portfolio management and analysis system using a simple MVC architecture.
The project uses a simple MVC (Model-View-Controller) architecture:
portfolio_csv_builder.py- Your original data building engine- Handles CSV file creation and data processing
portfolio_controller.py- Main business logic orchestrator- Performance modules - Your original sophisticated analytics
returns_calculator.py- Multiple return horizonsrisk_metrics.py- Volatility, drawdown, etc.ratios.py- Sharpe, Sortino, Information ratiosmarket_comparison.py- Beta, Alpha, risk premiumbenchmark.py- Custom and SPY benchmarks
app.py- Main Streamlit interface- Clean, tabbed UI for portfolio analysis
securities_config.py- Loadscore.yamlconfiguration- Provides sector, fund, and geography mapping
pip install -r requirements.txtstreamlit run src/app.pypython scripts/build_all_portfolios.pyThis runs the legacy builder for both core and benchmark.
Edit config/portfolio_definitions/core.yaml to:
- Add new securities
- Update fund classifications
- Modify sector mappings
https://dfic-fund.streamlit.app/ This will update automatically on main pushes