Repository navigation
Game Mode
Hold the Position turns a backtest into a decision game. One simulated day passes per second, the app raises risk alerts, and the player can act before expiry.
Setup → Live tape → Alert → Decision → Outcome → Debrief
- Setup: choose asset, strategy, scenario, capital, and advanced assumptions.
- Live: the tape advances automatically; NAV, spot, drawdown, and alerts update.
- Alert: the controller reaches a significant event (strike breach, IV spike, drawdown threshold, or expiry).
- Decision: roll, hold, fast-forward, or liquidate.
- Debrief: final P&L, max drawdown, premium, fees, and a thematic badge.
| Control | Effect |
|---|---|
| Fast-forward → alert | Advance automatically to the next significant event |
| Next day | Advance one bar |
| Roll | Close the expiring leg and open a new one |
| Hold | Keep the current position through the event |
| Liquidate / Close | Close the book and finish the scenario |
The thematic score blends P&L, maximum drawdown, and premium efficiency. Badges describe behaviour, not a recommendation. The debrief is designed to start a conversation: what would you do differently in the same regime?
The live view is a Streamlit fragment with a constant one-second timer. Plotly
identities are fixed, and the game does not call a full st.rerun() inside the
fragment during auto transitions. Browser translation is explicitly disabled to
prevent React DOM mutations. This addressed the removeChild error in earlier
builds.
- 2022 Rate Shock
- 2020 COVID Crash
- 2023 AI Rally
- 2008 Global Financial Crisis (where data is available)
- Last 12 months
- Full history
Scenario availability depends on the bundled/cache history.
DerivLab · an educational options & futures strategy emulator · docs verified against v1.2.0 on 2026-10-23 · README · Docs feedback · MIT License · Not investment advice.
Start here
- Home
- Getting Started
- Compatibility & Versions
- Feature Tour
- FAQ
- Documentation & ADRs
- Versioning
- Roadmap
Core systems
- Architecture
- Backtest Engine
- Strategy Library
- AI Agents
- AI Model Guide
- LLM Quality & Safety
- Data Pipeline
- Game Mode
Engineering
- Configuration
- Testing & CI
- Deployment
- Security
- Project Structure
- Troubleshooting
- Glossary
- Release Notes