Views
No views yet
requirements.txtThis implementation follows the assignment spec (front-end, back-end, ML, candlesticks, tests).
1# 1) (Recommended) Use a virtualenv
2python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
3
4# 2) Install deps
5pip install -r requirements.txt
6
7# 3) Run the web app
8export FLASK_APP=app.app:app # Windows PowerShell: $env:FLASK_APP="app.app:app"
9flask run --port 8000 --debug
10# open http://127.0.0.1:8000python -m app.app[Flask UI] --(form: ticker, horizon, model)--> [Controller]
\-> [Data Loader (yfinance)] --(OHLC)-> [SQLite: prices]
\-> [Models: ARIMA | MA | LSTM] --(forecast)-> [SQLite: forecasts]
\-> [Plotly] candlestick(OHLC) + overlay(forecast) -> HTMLapp/data/forecast.dbprices (ticker, datetime, open, high, low, close, volume, interval)forecasts (ticker, created_at, horizon_steps, model_name, yhat_json, interval, train_start, train_end, metrics_json)yfinance fetch fails, app will fall back to a bundled sample CSV for AAPL (1h data) to keep demo working.15m for <= 24h, else 1h.pytest -qpytest, simply run python -m pytest -q.)