Spaces:
Running
Running
metadata
title: SuperAI Forecast
emoji: 📈
colorFrom: blue
colorTo: cyan
sdk: docker
app_port: 7860
pinned: false
SuperAI Forecast
SuperAI Forecast is a FastAPI + Lightweight Charts application for live market analysis with a multi-model AI forecast stack: Kronos, Google TimesFM, and Amazon Chronos.
Core Features
- multi-source OHLCV data with automatic fallback
- technical indicator calculation
- independent Kronos / TimesFM / Chronos forecasting
- unified OHLC4 forecast contract across all AI models
- real-time WebSocket price streaming
- single-origin frontend served directly from the backend
Runtime Requirements
- Windows with Python 3.11
- Internet access for market data
- Internet access on the first TimesFM model load if the checkpoint is not cached locally
Quick Start
run.bat
The launcher validates the virtual environment, ensures the local AI model dependencies are ready, applies the TimesFM compatibility patch, starts the backend, and opens the dashboard automatically.
Manual Start
py -3.11 -m venv venv
venv\Scripts\python.exe -m pip install -r requirements.txt
venv\Scripts\python.exe -m backend.launcher
Project Layout
SuperAI Forecast/
|-- backend/
| |-- main.py
| |-- frontend_assets.py
| |-- launcher.py
| |-- server_runtime.py
| |-- forecasting/
| `-- startup_utils.py
|-- frontend/
| |-- app.js
| |-- forecast-models.js
| |-- index.html
| |-- workspace.js
| `-- workspace.css
|-- libs/
| `-- chronos-forecasting/
|-- scripts/
| `-- patch_timesfm.py
|-- requirements.txt
`-- run.bat
Key Endpoints
GET /api/healthGET /api/symbolsGET /api/historical/{symbol}GET /api/indicators/{symbol}GET /api/forecast/{symbol}GET /api/market-statusGET /api/crypto/marketWS /ws/price/{symbol}
SuperAI Forecast Contract
- Input to every AI model is a single
OHLC4series built as(open + high + low + close) / 4. - The recommended context length is
512, with model-specific fallback windows when the source history is shorter. - The default horizon is
10, so each enabled AI model predictsT+1 ... T+10. - Output from each AI model is an independent future
OHLC4line with quantilesp10,p50,p90. - API responses expose both
last_close(market close) andlast_ohlc4(forecast baseline) so downstream analysis stays explicit and stable. - Frontend rendering uses one forecast line per model, a shared horizon/timeframe contract, and a versioned asset registry for consistent model/UI alignment.
Health Expectations
When the system is healthy:
/api/healthreturnsstatus: onlinetimesfm.availableistruechronos.availableistruekronos.availableistrue- each model reports its own readiness state after warmup or after the first forecast
- the frontend loads from the same backend origin
Troubleshooting
- Install Python 3.11 if it is missing.
- Rebuild
venvif it was copied from another machine. - If forecasts fail, check
/api/healthand confirm the target model is available and loaded. - If market data fails, verify connectivity to Binance, Bybit, CoinGecko, Twelve Data, Finnhub, and Yahoo Finance.