From 3fc7ef241de6badf4d53fb551d21a65022491e16 Mon Sep 17 00:00:00 2001 From: Mark Bradley Date: Sun, 1 Nov 2026 18:09:07 +0000 Subject: [PATCH] Separate 24h-volume floor for shadow forecasts (R209) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With an economics-only mandate and the $5k 24h-volume floor nearly nothing can be forecast, so no bucket can reach the 30 scored forecasts it needs. Lowering min_liquidity_usd would also loosen live orders. - mandate.yaml markets.min_forecast_volume_usd (optional, at most min_liquidity_usd; unset keeps today's single floor): submit_forecast needs only that 24h volume. Orders keep the trading floor; the risk engine is unchanged. Opt-in: commented out in the default and example files; config change effect neutral. - search_markets flags markets between the floors "forecast only" and below the forecast floor "no forecast either". - Forecast Executor skips markets whose 24h volume is below the trading floor (ctx.risk.getMandateSummary + ctx.polymarket.getMarket) and cancels its bids there, instead of collecting liquidity rejections that would trip the rejection cooldown. Unknown volume and backtests (no calls) behave as before. - Agent system prompt v6 and guide §3, Ledger page help text, guides, PROGRESS R209 and log. Co-Authored-By: Claude Opus 5.5 --- apps/agent/prompts/system.md | 5 +-- apps/web/src/pages/Ledger.tsx | 2 +- config/mandate.example.yaml | 1 + docs/PROGRESS.md | 12 +++++++ docs/guide/operations.md | 6 ++++ docs/guide/strategies.md | 4 ++- packages/core/src/config/changes.ts | 2 ++ packages/core/src/config/defaults.ts | 1 + packages/core/src/config/schema.ts | 10 ++++++ packages/core/src/ledger/LedgerService.ts | 8 +++-- packages/core/src/sdk/guide.ts | 4 ++- packages/core/src/services/MarketService.ts | 9 +++++- templates/forecast-executor.ts | 15 +++++++++ tests/config/config.test.ts | 8 +++++ tests/ledger/ledger.test.ts | 10 ++++++ tests/ledger/market-search.test.ts | 36 +++++++++++++++++++++ tests/templates/forecast-executor.test.ts | 21 ++++++++++++ 17 files changed, 146 insertions(+), 8 deletions(-) diff --git a/apps/agent/prompts/system.md b/apps/agent/prompts/system.md index 1158c99..44c2e58 100644 --- a/apps/agent/prompts/system.md +++ b/apps/agent/prompts/system.md @@ -1,4 +1,4 @@ - + You are the BotLab agent: an autonomous research and strategy assistant for a self-hosted trading lab on Polymarket (prediction markets) and Binance (crypto spot). You run unattended on a schedule; nobody is watching this session and nobody will answer questions. Work through the tools, then end the run. @@ -22,7 +22,8 @@ BotLab enforces the boundaries on the server, not you: Read the mandate and limits (`botlab://config/mandate`, `botlab://config/limits`, or `get_overview`) at the start of every run and stay inside them: categories and horizons the mandate allows, minimum 24h volume (`min_liquidity_usd` is 24h volume, not -order-book liquidity), maximum ambiguity. Read `botlab://sdk/guide.md` (the script and forecasting guide) before writing or changing a template, +order-book liquidity; when the mandate sets the lower `min_forecast_volume_usd`, markets between the two are +forecast-only: record forecasts there to build the track record, never expect a bot to trade them), maximum ambiguity. Read `botlab://sdk/guide.md` (the script and forecasting guide) before writing or changing a template, and `botlab://sdk/types.d.ts` for the exact `ctx` API. # Untrusted data diff --git a/apps/web/src/pages/Ledger.tsx b/apps/web/src/pages/Ledger.tsx index 6956749..e68c0c5 100644 --- a/apps/web/src/pages/Ledger.tsx +++ b/apps/web/src/pages/Ledger.tsx @@ -541,7 +541,7 @@ function SubmitForecast() {

- The probability that the token resolves YES. The server captures the market price, checks spread, 24 h volume (min_liquidity_usd) and UMA status, and files the forecast in + The probability that the token resolves YES. The server captures the market price, checks spread, 24 h volume (mandate min_forecast_volume_usd if set, else min_liquidity_usd) and UMA status, and files the forecast in its (category, horizon) bucket. A token’s active forecast can be superseded after 6 hours.