Skip to content

Introduction

Whale v0.1.13 is a reusable Chelis shell for betting primitives. It provides sizing, bankroll management, risk assessment, policy enforcement, and backtesting without carrying sport-specific logic. Downstream consumers supply their own domain models and plug into Whale's typed surface.

Whale is pinned to:

  • chelis-std 0.4.0
  • shoals 0.21.4

Whale depends on Shoals for currency-tagged primitives. Stake values, bankroll balances, and payout amounts flow through the Shoals.Money type, so arithmetic respects denomination and rounding rules inherited from the Shoals currency layer.

ModulePurpose
Whale.TypesCore types: probability, odds, stake fractions, ratings, edge values
Whale.SizingKelly criterion and its variants (fractional, capped, risk-adjusted, simultaneous)
Whale.BankRollBankroll tracking, drawdown limits, allocation splits
Whale.RiskRisk assessment: expected loss, variance of return, ruin probability
Whale.PolicyDeclarative policy rules that constrain bet placement
Whale.GuardsGuardrails and hard limits enforced before execution
Whale.BackTestBacktesting surface for strategy evaluation over historical data

Whale is deliberately thin. It encodes the mathematical and operational primitives that every betting experiment needs, then gets out of the way. Sport models, market connectors, and settlement logic live in downstream consumers, not in Whale itself. This separation keeps the shell reusable across domains.