A Python toolkit that downloads historical market data from Yahoo Finance, generates basic market analytics,
simple strategy backtest, and serves precomputed results in a Flask dashboard.
Disclaimer: Educational use only. Not investment advice.
Python3.10+Flask3.1.2+
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt-
Download data (CSV)
python3 analysis/download_data.py
Expected Outputs:
analysis/data/AAPL.csvanalysis/data/SPY.csv
-
Market analysis (plots)
python3 analysis/part2_analysis.py
Expected Outputs:
analysis/output/price_history.pnganalysis/output/volatility.png
-
Strategy backtest (20/50 MA crossover)
python3 analysis/part3_strategy.py
Expected Outputs:
analysis/output/strategy_equity.pnganalysis/output/metrics_part3.json
Copy precomputed results into the web app
cp analysis/output/*.png webapp/static/
cp analysis/output/metrics_part3.json webapp/data/python3 webapp/app/views.pyOpen on Browser:
http://127.0.0.1:5000/(Dashboard)http://127.0.0.1:5000/data/(Data preview)http://127.0.0.1:5000/results/(Plots & metrics)
- Reports on each part of the project is in the
analysis/Deliverables/folder - Proof of the web app running is the
webapp/Screenshots/folder.
Kelvin Ihezue