{"data":{"kind":"file","path":"README.md","version_id":"to35am6osizja012p45929zc","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2633,"modified_at":"2026-10-20T10:10:58.506000","content_hash":"472a91f02215d8dbec06de215804e1efb3d9512255ed34249ed7178bf5fa7dc2"},"entries":[],"content":"# Regime Portfolio Lab V3 — Regime and Generator Shift\n\n**Role alignment:** Applied Research – Quantitative Finance: non-stationary regimes, realistic transaction costs, late consequences, risk gates and strict time-series provenance.\n\nThis is a **synthetic educational RL research environment; never trade real money on it.** An LLM receives pre-trade signals, liquidity/volatility estimates and trailing historical returns. It sequentially chooses allocations across A, B, C and CASH for 36 periods, with four latent market regimes, stale forecasts, correlated shocks and occasional tail losses. All scoring runs on the evaluator, after trades have completed. Future returns are never part of the prompts.\n\nUse `--env.taskset.variant stress` for a separate generator regime with faster transitions, more stale/noisy signals, tail events and tighter liquidity. This tests whether the policy relies on the *training generator* rather than sensible sequential decisions. It remains synthetic; do not generalize its metrics to real finance.\n\n## Allocation format\n\n```json\n{\"A\": 0.30, \"B\": 0.30, \"C\": 0.20, \"CASH\": 0.20}\n```\n\nOnly finite, nonnegative numbers are accepted. Weights sum to 1, each risky asset is capped at 65%, combined risky assets at 95%, and shorting/leverage is forbidden. Invalid actions trigger a cash fallback plus scoring penalty.\n\n## Grading and evidence\n\n- Trade execution happens before the hidden realized return; fees and liquidity-dependent quadratic market impact are charged on turnover.\n- Benchmark: static 35% A, 35% B, 20% C, 10% cash with the **same** execution cost function.\n- End-of-episode reward: `clip(0.45 + 3.5*log-excess-return - 0.8*max-drawdown - 0.3*negative-CVaR - 0.02*mean-turnover - 0.05*invalid-actions, 0, 1)`.\n- Runs with max drawdown at least 25% receive at most 0.10; runs with 3+ malformed orders are capped at 0.15; incomplete runs receive zero.\n\nTaskset `regime-portfolio-lab`: 64 deterministic scenarios by default (configurable `num_cases` and `seed_start`) spanning moderate and stressed volatility. Publish scores by scenario group, with excess log return, maximum drawdown, worst-20%-period CVaR, turnover, realized execution costs and invalid-order rates.\n\n## Limitations\n\nThis is not a tradable dataset, alpha discovery or performance forecast. Synthetic signals embed an intentionally learnable relationship; no survivorship bias, order book, borrow cost, market holidays or delistings are modeled. To study production market behavior, require licensed point-in-time historical data, independent holdouts and strict human review. No broker integration is provided.\n","encoding":"utf-8","truncated":false,"total_bytes":2633},"status":null}