Online quantitative dashboard built for an Asset Management workflow:
- Quant A: Single-asset analysis + backtesting strategies
- Quant B: Multi-asset portfolio simulation + diversification metrics
- Infra: Linux deployment, auto-refresh, and daily report generated by cron
- Streamlit app deployed on a Linux VM (AWS EC2, Ubuntu) with systemd + cron.
- Dynamic Data: Real-time market data retrieval (Yahoo Finance via
yfinance) [updates every 5 min]. - Interactive Dashboard: Single asset analysis + Portfolio simulation.
- Algorithmic Strategies: Implementation of Buy & Hold and MA Crossover.
- Bonus ML: Linear Regression model to predict short-term price trends.
- ** robust Architecture:** Auto-refresh logic (TTL caching) and error handling.
- Automated Reporting: Daily risk report generated via Cron and stored on the VM.
├── app/
│ ├── streamlit_app.py # Point d'entrée principal
│ ├── pages/ # Modules Quant A et Quant B
│ └── core/ # Logique métier (Data, Calculs, ML)
├── scripts/ # Scripts d'automatisation (Cron)
├── infra/ # Fichiers de configuration serveur
└── requirements.txt # Dépendances Python
From the repository root: streamlit run app/streamlit_app.py Open: http://localhost:8501
- Market data retrieval uses @st.cache_data(ttl=300) to refresh data every 5 minutes while limiting API calls.
- Dashboard refresh uses @st.fragment(run_every=300) to update the interface periodically without reloading the full app.
- The script daily_report.py generates a daily text report stored locally on the server: reports/report_YYYY-MM-DD.txt
Edit crontab: crontab -e Add the following line (adapt paths if necessary): 0 20 * * * /home/ubuntu/Project_python_ESILV_A4/.venv/bin/python /home/ubuntu/Project_python_ESILV_A4/daily_report.py >> /home/ubuntu/Project_python_ESILV_A4/reports/cron.log 2>&1
Check logs: tail -n 50 /home/ubuntu/Project_python_ESILV_A4/reports/cron.log
The application is deployed as a systemd service to ensure continuous availability and automatic restart. Service file: /etc/systemd/system/streamlit.service
[Unit] Description=Streamlit Dashboard After=network.target
[Service] User=ubuntu WorkingDirectory=/home/ubuntu/Project_python_ESILV_A4 Environment="PATH=/home/ubuntu/Project_python_ESILV_A4/.venv/bin" ExecStart=/home/ubuntu/Project_python_ESILV_A4/.venv/bin/streamlit run app/streamlit_app.py --server.port 8501 --server.address 0.0.0.0 Restart=always
[Install] WantedBy=multi-user.target
Enable and start the service: sudo systemctl daemon-reload sudo systemctl enable streamlit sudo systemctl start streamlit sudo systemctl status streamlit
- Development split into two modules: Quant A and Quant B
- Separate feature branches used for each module
- Integration performed via Pull Requests to ensure clean history and proper separation of work
- Annualization uses 252 periods/year by default for comparability.
- Yahoo Finance can be unstable; the code includes retries and empty-data safeguards to prevent crashes.