Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
中文简介正在准备中。当前显示原文说明。
Kalshi daily and hourly range markets on crypto prices (BTC, ETH) and equity indices (S&P 500, Nasdaq-100) — bracket structure, Gaussian P(YES) modeling on price/vol, close-offset decision timing, longshot-sell edge with honest evidence bounds
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Kalshi lists daily (and for crypto, hourly) range bracket markets on the level of four liquid underlyings: S&P 500, Nasdaq-100, Bitcoin, and Ethereum. The math is the same partition-and-Gaussian framework as weather brackets — the variable is just price/return and σ comes from the underlying's realized or implied volatility, not a temperature model.
Cross-references: for Kalshi API mechanics see
kalshi-api; for the strategy, sizing, and backtesting framework seeprediction-market-strategy; for the temperature counterpart seekalshi-weather-markets; for the shared bracket/overround formulas seeprediction-markets/references/brackets-and-settlement.md.
SERIES_MARKET = {
"KXINX": "index", # S&P 500 index level
"KXNASDAQ100": "index", # Nasdaq-100 index level
"KXBTC": "crypto", # Bitcoin price (USD)
"KXETH": "crypto", # Ethereum price (USD)
}
market_type = "index" — daily range only; underlying is the index points level at the official market close.market_type = "crypto" — daily and hourly range markets; BTC and ETH each have multiple hourly events running in parallel with the daily.Cadence is higher than weather: crypto hourlies open and settle throughout the day; daily markets open the prior session and settle at the reference close.
Each event is a mutually exclusive, collectively exhaustive partition of the underlying's possible values at settlement:
B<center> covers a contiguous price band (floor to cap, both-ends-inclusive). Bracket widths are set per-market — read the event's market list; do not assume a fixed width.less-than (below the lowest bracket floor) and a greater-than (above the highest bracket cap).The overround (sum of all YES prices) is typically > 1.0. The excess is concentrated in the cheap tails — the same favorite–longshot bias seen in weather markets. See prediction-markets/references/brackets-and-settlement.md for the overround formula.
Given a price forecast distribution N(μ, σ) for the underlying at settlement, with bracket covering [floor, cap]:
# interior bracket
P(YES) = Φ((cap − μ) / σ) − Φ((floor − μ) / σ)
# open-tail, "greater than cap"
P(YES) = 1 − Φ((cap − μ) / σ)
# open-tail, "less than floor"
P(YES) = Φ((floor − μ) / σ)
Φ is the standard normal CDF. Unlike temperature brackets (which settle on integers), price brackets settle on a continuous reference price — the half-integer continuity correction used for weather is not applicable here. Do not add ±0.5.
For daily markets, a simple log-return diffusion gives σ_daily ≈ σ_annual / √252 for index, or the equivalent annualized vol / √365 for crypto. Express in price units (not %) before inserting into the formula.
This is the key difference from weather markets.
Weather settles on a daily extreme that occurs at some unknown intraday time. The decision book is read near the likely peak/trough (a city-local hour).
Crypto and index markets settle at a fixed reference close:
The practical convention used in production:
DECISION_OFFSET_MINUTES = 120 # read book ~2h before settlement close
decision_ts = settlement_close_ts - timedelta(minutes=DECISION_OFFSET_MINUTES)
This offset balances information freshness (IV and order-book signal) against the risk of being front-run by news that drops in the final window. Tune per-series based on your fill-rate observations.
Settlement is on Kalshi's own result field. Do not re-derive from an external feed. The exact reference price for each series (e.g., official SPX close vs. a crypto composite) is specified per-market in the Kalshi rulebook.
Honest caveat: the exact reference price spec was not pinned for every series during development. Before trading any new series, read the market's rulebook and confirm:
Backtesting against a price feed that differs from the true settlement source is the primary way to manufacture fake edge in these markets.
The favorite–longshot bias generalizes from weather to index and crypto brackets. Tail brackets are systematically overpriced relative to a Gaussian model calibrated to realized/implied vol; interior brackets near the current underlying level are fairly priced or underpriced.
From production testing with a rotating CV approach, Kalshi-settled outcomes, fee-inclusive:
| Market type | Sweet band | Edge direction | Sample | Result |
|---|---|---|---|---|
| Index | Market-implied P ∈ [0.05, 0.20] | Longshot-sell (short tail brackets) | ~50 trades | ~+1.7% taker / ~+9% maker |
| Crypto daily | — | — | Too sparse | Inconclusive |
| Crypto hourly | — | — | Too sparse | Inconclusive |
Interpret conservatively. ~50 trades is not a stable estimate; confidence intervals are wide. The index result is directionally consistent with the weather finding and prior literature on longshot bias, but treat it as a hypothesis to validate forward, not a confirmed edge.
Crypto and index markets settle on public, real-time price ticks. The underlying is continuously quoted on liquid venues with sub-millisecond latency. This means:
overround = Σ P_yes. When overround > 1.10 in the tails, the aggregate tail sell has positive expected value before fees; after Kalshi taker fees (~7 cents/$1 per leg) the bar is higher. Maker rebates change the math substantially.prediction-market-strategy for the dutch/portfolio treatment.references/structure-and-modeling.md — Series details, bracket structure, σ-from-vol modeling, decision timing, settlement还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
中文简介正在准备中。当前显示原文说明。
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
中文简介正在准备中。当前显示原文说明。
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
中文简介正在准备中。当前显示原文说明。
Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis
中文简介正在准备中。当前显示原文说明。
Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading
中文简介正在准备中。当前显示原文说明。
Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation
中文简介正在准备中。当前显示原文说明。