Inspiration
We wanted to improve decision-making in trading whilst making it fun and risk-free, so we linked it to card games and made it multiplayer to make it accessible for everyone as well as making it competitive.
What it does
Players first choose between playing vs AI or multiplayer. Then the game begins.
Players start with £1,000 and buy stocks from a market at a given point in time. Each round, they assign derivatives (Calls, Puts, and direct placements) to attack their opponent's net worth or hedge their own. The game jumps forward 3 months using real Yahoo Finance price data, resolves all options using Black-Scholes pricing, and updates both players' portfolios. After up to 5 rounds, a post-game analytics dashboard shows total profit, options win rate, max drawdown, and a portfolio value chart — plus an AI-powered strategy review via GPT.
The AI system consists of a C++ heuristics engine and Python backtester that validates the AI over thousands of simulated games.
How we built it
- Built with Flask and Flask-SocketIO to handle asymmetric game states and competitive multiplayer over WebSockets.
- Integrated yfinance to pull 10 years of historical data from 30 major tickers. We implemented Black-Scholes option pricing using
scipy.statsto calculate fair premiums based on 252-day annualized historical volatility. - Engineered a high-performance heuristic engine in C++ loaded via Python
ctypes. This allowed us to backtest strategies over 10,000 simulated games to ensure game balance. - Designed a brutalist aesthetic using vanilla JavaScript and Chart.js, focusing on high-contrast data visualization and terminal-style feedback.
- Leveraged LLMs (Groq/OpenAI) to parse endgame JSON logs and provide personalized, round-by-round strategy coaching.
Challenges we ran into
- Early backtesting showed that "Defense Puts" were too dominant (77% win rate). We had to iteratively tune inflation penalties and premium scaling to ensure aggressive "Call" and "Attack Put" strategies were viable.
- Coordinating memory management between Python and the C++ shared library (
.so/.dll) across different OS environments was a major technical hurdle. - Engineering the socket layer so players could see their own potential gains while keeping the future "Battle Phase" price data completely hidden from the client until resolution.
Accomplishments that we're proud of
- Deepened our understanding of the "Greeks" and how volatility impacts option pricing in a practical, gamified context.
- Learned how to bridge high-level web frameworks (Flask) with low-level performance engines (C++) for real-time simulation.
- Discovered that brutalist, data-heavy UIs can actually enhance the "high-stakes" feeling of a financial game if balanced with clear visual cues.
What we learned
- Deepened our understanding of the "Greeks" and how volatility impacts option pricing in a practical, gamified context.
- Learned how to bridge high-level web frameworks (Flask) with low-level performance engines (C++) for real-time simulation.
- Discovered that brutalist, data-heavy UIs can actually enhance the "high-stakes" feeling of a financial game if balanced with clear visual cues
What's next for Trading Arena
- A news feed that pulls real headlines from the specific time period players are in (e.g., trading through the 2008 crash).
- Introducing Delta and Gamma exposure limits for deeper strategic complexity.
- Expanding beyond stocks into crypto and commodities markets.
- A dedicated mobile view optimized for quick "Buy/Action" loops on the go.
Log in or sign up for Devpost to join the conversation.