HyperTrader AI/ML Notes

This is a practical notes page for the dashboard AI section.

What the model reads

- BTC chart/candle features before and during each daily market.
- Distance from BTC price to the market target.
- Prediction market price/edge data.
- Settled outcomes after a market closes.

What the model does

- It scores YES vs NO for the daily Hyperliquid BTC prediction market.
- If AI control is enabled, it locks one side for that daily market and does
  not keep changing sides during the 24 hour window.
- The normal entry rules still apply: price, edge, sizing, balance, hedge, and
  safety checks can still stop an entry.
- Standard fallback is the default. If the optional AI only setting is on,
  the bot waits instead of using the standard strategy whenever AI is not
  ready, is uncertain, or fails its recent evidence check.

What learning means

- The bot records settled outcomes and uses them to update the lightweight
  local model. For a market it traded, the outcome is read from its own
  settlement fill on Hyperliquid (1.0 for the winning side, 0.0 otherwise).
- The learning record is a running score of settled tests the bot has been
  able to label.
- A trade entered before an AI decision was recorded is shown as not scored,
  because scoring it would make the result misleading.

Backtesting and drift checks

- bot/ml_backtest.py keeps one early snapshot per distinct market by default
  and reports accuracy, Brier score, logloss, confidence buckets, baselines,
  walk-forward performance, and a conservative post-cost binary-leg result.
- The live model should be treated as a decision aid until enough settled
  markets exist for the account's own configuration.
- If market behavior changes, recent scored results matter more than older
  results. Use the dashboard learning record and backtest output to decide
  whether AI control should stay on.

Risk controls around AI

- AI can choose the side only when the AI control setting is enabled.
- The bot still requires the configured edge and safety checks before buying.
- The daily loss guard and open P&L lock can pause or close the bot regardless
  of the AI side.
- AI only needs at least 15 distinct recent settled markets and pauses unless
  the recorded blend clears a conservative paired Brier-score check against
  the fair-value baseline. Repeated positions in one daily market count once.
- The total settled-test score may include older records that do not contain
  the paired probabilities needed by this evidence gate. The dashboard shows
  the total record separately from the distinct AI-only evidence count.
- This is a minimum evidence gate, not proof that future trades will be
  profitable.
