Goal
Recalibrate 30 hypothesis markets whose updated_at is older than 14 days by applying a
Bayesian price update based on new paper evidence and debate outcomes (composite_score drift).
Each updated market gets a price_history row for audit trail.
Acceptance Criteria
☑ 30 hypothesis markets with updated_at < NOW() - 14 days identified
☑ New papers since each market's last update counted (for/against)
☑ Bayesian update applied: prior = current_price, evidence = new papers + composite_score
☑ markets.current_price updated for each market
☑ hypotheses.market_price updated for each market
☑ 30 rows written to price_history with event_type = 'bayesian_recalibration'
Approach
Select top 30 stale hypothesis markets ordered by (composite_score drift + new paper count)
For each market apply Beta-Binomial Bayesian update:
- Prior: Beta(p
N, (1-p)N) where p = current_price, N = 5 (soft prior weight)
- Debate evidence: composite_score × M = 5 effective observations
- Paper evidence: count of for/supporting vs against papers since market's last update
- Posterior mean = new market price
Update markets.current_price and markets.updated_at
Update hypotheses.market_price
Insert row into price_historyDependencies
markets table
hypotheses table
hypothesis_papers table
price_history table
scidex.core.database.get_db()
Dependents
- Market pricing display, resource allocation weight, confidence interpretation
Work Log
2026-04-26 — Slot 45
- Investigated database schema:
markets.current_price (not market_price), hypotheses.market_price
- Found 365 stale active markets (>14d), 92 of type
hypothesis
- Found all 92 hypothesis markets have 0 new debates since last update, but many have new papers
- Designed Beta-Binomial Bayesian update combining paper evidence + composite_score debate signal
- Wrote
scripts/recalibrate_stale_market_prices.py
- Ran script: 30 hypothesis markets recalibrated, 30 price_history rows written
- Committed and pushed