💡 Inspiration
Most financial simulators today feel outdated: they offer static $100k balances, delayed tabular quotes, and zero tools to understand modern quantitative or algorithmic trading. Meanwhile, real retail traders are bombarded by AI hype without any safe, transparent sandbox to see how prediction models actually perform when capital is on the line.
We wanted to create Aerorithmetic: a high-speed, live paper trading platform that gamifies quantitative finance. Instead of just betting against a flat chart, you can enter the Model Lab, train custom machine learning algorithms with adjustable hyperparameters, and watch your models trade as autonomous bots on a real-time leaderboard—competing directly against you and other traders.
To top it off, we wrapped the entire experience in a nostalgic, glossy Frutiger Aero aesthetic complete with Fih, an interactive 3D fish mascot powered by Gemini that delivers real-time voice commentary on your trading decisions.
🚀 What It Does
- Multi-Asset Live Trade Desk: Paper-trade Solana & crypto (
SOL,BTC,ETH,BONK,WIF), Fortune 500 equities (AAPL,NVDA,MSFT, etc.), and major forex pairs with real-time price feeds, interactive TradingView charts, and order execution. - Interactive Model Lab: Train predictive machine learning models directly from the UI. Users tweak hyperparameters (model architectures like Ridge Regression or LightGBM gradient boosted trees, lookback windows, prediction horizons, and train/test splits).
- Backtesting & Chart Overlays: See out-of-sample directional accuracy, confidence scores, and an instant backtested equity curve overlaid on historical candlestick charts before executing trades.
- Bot vs. Human Leaderboard: Saved prediction models don’t just sit in a file—they become active automated bots that place trades and compete on the global leaderboard alongside human traders.
- "Fih" AI Mascot & Voice Commentary: An interactive 3D WebGL fish mascot (rendered via Three.js / React Three Fiber) that monitors your portfolio. Powered by Google Gemini and real-time Text-to-Speech, Fih delivers witty, dynamic voice commentary when you make high-conviction trades, overleverage, or take profits.
- News Sentiment Ingestion: Real-time financial headlines scored with Gemini sentiment analysis (
-1.0to+1.0), surfacing live market sentiment indicators alongside asset charts.
🛠️ How We Built It
Aerorithmetic is built on a modern, decoupled distributed architecture:
Frontend:
- Built with React 19 and Vite with a handcrafted Frutiger Aero design system (glassmorphism, skeuomorphic translucent controls, animated aero cursors, and liquid gradients).
- High-performance financial charts powered by TradingView’s Lightweight Charts.
- 3D rendering pipeline using Three.js and @react-three/fiber for the interactive Fih mascot.
Backend & Trading Engine:
- High-throughput FastAPI server written in Python 3.11 running inside Docker.
- Atomic order execution engine tracking cash, open positions, average fill prices, and portfolio equity snapshots.
Database & TimescaleDB (Tiger Data):
- Hosted on TimescaleDB / PostgreSQL via Tiger Data.
- High-frequency market data stored in specialized hypertables with continuous aggregates for sub-millisecond 1-minute and hourly candle generation.
- Stores user profiles, order books, positions, and leaderboard snapshots.
Machine Learning Pipeline:
- scikit-learn and LightGBM feature engineering pipeline calculating price returns, rolling volatility, RSI, and MACD across historical feeds.
- Strict time-series split validation reporting honest out-of-sample directional prediction and cumulative strategy return curves.
Authentication:
- Integrated Supabase Auth with full Tiger Data PostgreSQL user synchronization supporting both Google OAuth and email credentials.
🏆 Sponsor Tracks & Integrations
🐯 Tiger Data / TimescaleDB (Core Data Backbone)
Tiger Data powers the time-series financial engine of Aerorithmetic. We leverage TimescaleDB hypertables to ingest high-frequency ticks, generate continuous aggregates for multi-timeframe candlestick data, and run relational joins across user equity, trade history, and leaderboard rankings with zero latency.
🧠 Google Gemini (Intelligence & Fih Voice Companion)
- Market News Sentiment: Automatically processes Finnhub market news to extract ticker tags, summaries, and sentiment scores.
- Fih Real-Time Companion: Evaluates trade parameters (position size relative to buying power, profit/loss ratio) and generates custom contextual quips read aloud using low-latency Gemini audio TTS.
❄️ Snowflake (Historical Warehousing & Market Data)
Houses multi-year historical price series and analytical snapshots used for training datasets and deep backtesting pipelines.
🧗 Challenges We Ran Into
- Stateless Backend OAuth with Supabase: Resolving OAuth redirect flows across Vercel and a containerized backend. We solved a PKCE code verifier state mismatch by engineering an implicit OAuth handshake that streams tokens cleanly via URL fragments directly into the frontend session manager.
- Sub-Second ML Training in the Browser: Training machine learning models in real-time within an interactive UI can easily stall requests. We tuned feature extraction pipelines so LightGBM and Ridge models finish training, evaluation, and backtest generation within ~2 seconds.
- Time-Series Financial Integrity: Financial backtests are notorious for lookahead bias and data leakage. We implemented strict chronological forward splits (train on past, evaluate on unseen future candles) to ensure reported metrics are accurate.
- 3D WebGL Mascot Performance: Seamlessly overlaying a dynamic 3D Three.js canvas on top of real-time financial charts without dropping frames or blocking pointer events.
🎉 Accomplishments That We're Proud Of
- A Living, Breathing Simulation: Real market prices, real ML models, and real automated bots all coexisting on a single live leaderboard.
- Cohesive Frutiger Aero Aesthetics: Bringing back the vibrant, optimistic aesthetic of the 2000s web with custom audio effects, custom aero cursors, and responsive glass cards.
- Zero-Friction Onboarding: Users can test out models immediately in Guest Mode with $100,000 in paper cash, or sign in via Google to persist models and portfolio progress in Tiger Data.
📚 What We Learned
- How to architect time-series hypertables and continuous aggregates in TimescaleDB/PostgreSQL.
- Best practices for time-series forecasting vs. conventional classification problems.
- How to connect multi-modal AI (Gemini text generation + Gemini TTS voice) to reactive state changes in a React application.
🔮 What's Next for Aerorithmetic
- Reinforcement Learning Bots (PPO/DQN): Letting users train RL agents that learn trading policies directly through trial-and-error simulation.
- Solana On-Chain Badges: Writing seasonal tournament winners and verified trading P&L as verifiable Memo records or minted NFT trophies on the Solana devnet.
- Multiplayer Trading Arenas: Private lobbies where university clubs or friends can host 24-hour trading tournaments.
🧰 Built With
python · fastapi · timescaledb · postgresql · tiger-data · react · vite · three.js · react-three-fiber · google-gemini · scikit-learn · lightgbm · snowflake · supabase · tradingview · docker · vercel
Built With
- fastapi
- gemini
- javascript
- numpy
- pandas
- python
- react
- scikit-learn
- supabase
Log in or sign up for Devpost to join the conversation.