learning_ai_invt_trdg/web/metric-validation-runbook.md

1.9 KiB

Runtime Validation Checklist

Before trusting the dashboard values for any operational decision, ensure the following core invariants hold in the most recent bot health payload and reconciliation summary:

  • capital_invariant_violations_total == 0
  • reconciliationMismatchCount == 0
  • reconciliationMissingFromExchange == 0
  • reconciliationMissingInDb == 0
  • tradingLoopHealthy == true
  • reconciliationLoopHealthy == true

Capital Coverage Validation

  • Ledger vs. Broker: Verify that "Allocated Capital" (from ledger) is feasible given "Broker Balance".
  • Mismatch Diagnosis: If Allocated > Buying Power, the "Capital Coverage" pill will show "Insufficient funds". This is a valid state but means trades may be rejected by the broker.
  • Action: If this warning persists, either reduce profile allocations or deposit funds into the brokerage account.

Debugging "No Trades Executed"

If the bot is running (tradingLoopHealthy == true) but no trades are opening:

  1. Check Readiness: Ensure symbol signal is "SIGNAL ACTIVE" in Overview.
  2. Check Capital Coverage: Verify the profile has not exhausted its liquidity (check "LP" pill).
  3. Check Rejections: Look at "Recent Order Rejections" for explicit broker errors (e.g., insufficient qty, day trading limit).
    • These rejections are now surfaced directly in the dashboard and do not require log diving.

Operator Note

  • Ledger ≠ Liquidity: The internal ledger (allocated_capital) tracks what the bot intends to spend. The broker balance is what is actually available.
  • Enforcement: The bot will attempt trades based on its ledger. If the broker rejects them due to lack of funds, those show up in "Recent Order Rejections".
  • UI Status: The "Capital/LP" indicators are informational warnings for the operator. They do not automatically pause the bot.