Add forecast_dashboard: an honest multi-instrument forecasting UI#339
Open
demandnexustech wants to merge 1 commit into
Open
Add forecast_dashboard: an honest multi-instrument forecasting UI#339demandnexustech wants to merge 1 commit into
demandnexustech wants to merge 1 commit into
Conversation
A self-contained dashboard (under forecast_dashboard/) that wraps the Kronos pretrained model and forecasts four instruments out of the box: Silver, Gold, WTI crude, and GBP/JPY. It is designed around being HONEST about uncertainty, which is the main thing it adds over a single-symbol demo: - Forecast is shown as a DISTRIBUTION of sample paths (a p10-p90 band), never a lone point prediction, and never a fabricated confidence score. - Every forecast is logged to SQLite and later reconciled against the realized close, so calibration (band hit-rate, errors, directional accuracy) is shown as actual numbers, not a vibe. - News headlines are surfaced explicitly as "things the model did NOT see" (it reads past price candles only); they never feed the forecast. One engine, several thin clients (no duplicated model/data logic): - forecast_engine.py - all model + data logic (single source of truth) - server.py + web/ - primary UI: FastAPI JSON API + a hand-built, dependency -light frontend (ECharts vendored offline, so it runs on a locked-down box) - app.py - legacy Streamlit UI (fallback) - mcp_server.py - exposes the engine as MCP tools - storage.py - forecast logging + accuracy tracking - instruments.py / news_context.py / news_sentiment.py - instruments + the optional, clearly-labelled news context layer Ships inside the repo: forecast_engine.py auto-discovers the model package from the parent Kronos directory (honouring $KRONOS_DIR, with a sibling ./Kronos fallback so the folder also works standalone). Verified `from model import Kronos, KronosTokenizer` resolves and the storage accuracy smoke test passes from this location. Optional ops extras (not required to run the UI): a Dockerfile for Cloud Run and a deploy/ kit for an on-demand GCP VM. They use placeholder project values and document their own cost guardrails. The news layer (ANTHROPIC_API_KEY / TAVILY_API_KEY) is optional; the dashboard works fully without any API keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A self-contained dashboard under
forecast_dashboard/that wraps the Kronos pretrained model and forecasts four instruments out of the box: Silver, Gold, WTI crude, GBP/JPY.It is built around being honest about uncertainty, which is the main thing it adds over a single-symbol demo:
Architecture (one engine, several thin clients)
No duplicated model/data logic — everything imports
forecast_engine.py:forecast_engine.pyserver.py+web/app.pymcp_server.pystorage.pyinstruments.py,news_context.py,news_sentiment.pyShips inside the repo
forecast_engine.pyauto-discovers the model package from the parent Kronos directory (honouring$KRONOS_DIR, with a sibling./Kronosfallback so the folder also works standalone). Verified locally:from model import Kronos, KronosTokenizerresolves fromforecast_dashboard/python storage.py) passes from this locationOptional ops extras (not required to run the UI)
A
Dockerfile(for Cloud Run) and adeploy/kit for an on-demand GCP VM. These use placeholder project values and document their own cost guardrails. The UI itself needs none of this.No API keys required
The optional news layer uses
ANTHROPIC_API_KEY/TAVILY_API_KEY, but the dashboard works fully without any keys (the news panel just shows a notice).How to run
Happy to adjust scope (e.g. drop the
deploy/kit, or rename the directory) if you'd prefer a leaner PR. Thanks for Kronos!