Project · Prediction markets · Position sizing
Portfolio allocator — Kelly sizing against the margin framework
The portfolio-margin framework answers “what does this book cost to hold?” The allocator inverts the question: given my edge views, what book should I hold? It consumes the framework's outputs directly — the correlation-aware cluster loss distributions, the ES99, the top-2 concentration floor — as the risk input to a Kelly-style sizer. The same engine that prices risk also shapes position sizing.
The pipeline: your annualized edge view per cluster divided by the Monte-Carlo loss variance gives raw Kelly weights; a Kelly multiple (quarter-Kelly by default) haircuts them; then a single global scalar is bisected so the portfolio margin — max of correlation ES99 and the top-2 floor, exactly as the framework defines it — lands on your bankroll utilization target. The binding constraint is the margin engine, not per-position caps, which is the entire point. The table also reports each cluster's marginal margin (finite-difference bump): diversifying clusters consume less margin per dollar, so edge-per-marginal-margin-dollar becomes the allocator's real ranking stat — a cluster with modest edge but low margin consumption can out-rank a high-edge concentrated one.
Where this goes next
Two natural extensions: feeding the divergence scanner's fee-adjusted edges in as the alpha views (locked cross-venue spreads are the cleanest possible “edge” input), and swapping the illustrative 8-cluster book for a live position feed so the allocator re-solves as prints move. Both reuse this exact pipeline.