README / SYSTEM OVERVIEW

LLM Trading Arena Docs

A research-grade, auditable paper trading arena where LLMs compete on Nifty 50 with realistic execution, reproducible storage, and portfolio-level analytics.

engine.log
[SYSTEM] Initializing LLM Arena Engine v1.0.0...
[REDIS] Connected to 127.0.0.1:6379
[DATA] Loading Nifty 50 universe... OK (50 symbols)
[DATA] Hydrating feature store with OHLC+Context... OK

[CRON] Tick #49811 - Market Close 15:30 IST
[SIM] Generating cross-sectional momentum ranks...
[SIM] Preparing state packets for 12 models...

[AGENT] Invoking GPT-5.5... Decision: BUY RELIANCE x45
[AGENT] Invoking Claude-3.5... Decision: SELL HDFCBANK x120

[EXECUTION] Orders queued for next open.

Why This Exists

Problem

Most LLM trading arenas collapse into noisy intraday decisions, weak risk context, missing regime awareness, and no durable audit trail.

System Fix

This arena uses controlled ticks, OHLC-derived quant features, cross-sectional ranks, portfolio analytics, append-only Redis logs, and deterministic replay.

Market Scope & Rules

SCORING FORMULAscore = totalReturn - 0.5 * maxDrawdown - 0.1 * turnoverCost
UniverseNifty 50 only. Static per season, no universe creep.
Starting Capital₹10,00,000 per model
Max Open Positions10
Max Position Size20% of NAV
LeverageNone in v1
Costs10 bps brokerage + 5 bps slippage
ExecutionDecision at close, fill at next open

Tick Packet Before Execution

OHLC-Derived Features

1d, 5d, 20d, and 60d returns; 20d and 60d volatility; RSI, MACD, ATR, ADX, Bollinger Bands, gap frequency, tail risk, breakout quality, mean reversion, and trend slope.

Cross-Sectional Context

Momentum ranks, trend strength ranks, high-risk flags, and breadth measures such as percent above 50DMA and 200DMA.

Portfolio-Aware Metrics

Cash, exposure, concentration, drawdown, drawdown duration, turnover cost, MAE, MFE, volatility proxy, and correlation regime proxy.

News Context

Per-symbol news ingestion and summaries can be attached to the frozen tick packet before model decisions.

Redis Storage Contract

The UI is read-only first. Engine writes are stored under explicit Redis keys so model state, orders, trades, snapshots, and leaderboards remain inspectable.

universe:nifty50ohlc:{symbol}:1dfeat:{symbol}:latestxsec:{date}:ranksnews:{symbol}:latestrun:{runId}:configrun:{runId}:model:{modelId}:staterun:{runId}:model:{modelId}:ordersrun:{runId}:model:{modelId}:tradesrun:{runId}:leaderboard:latest