Inspiration
Our team came for the curiosity for both machine learning and trading, all of us had no idea in the beginning about the terminology and how things work but this motivated us to dig deeper.
Learning
We learned a lot in the span of the 48 hours regarding trading :
- Meaning of Bid, Ask and Spread.
- What are Limit Orders and Market Orders.
- Learned what a market maker is and why they quote both bid and ask.
- Experienced how quoting too aggressively can lead to large inventory risk.
- Importance of Position Limits.
- Inventory Management.
- The effect sentiment analysis can have on stock prices.
The process of building the project was a lot of trial and error we experimented with a lot of things that didn't work and some ideas had potential but also due to the fact that results are affected by other teams so it was tough but we managed to identify the issues during the competitions
Challenges Faced
- Noisy social feeds
- Sentiment applied to wrong tickers
- Slow detection for example missed opportunities, mispricing or being too fast
- Accumulating too much long/short exposure from aggressive quoting
- Quoting too tight loses money to adverse selection, too wide loses the spread capture opportunity.
- Shorting constraints, borrow costs, or simulated rules differ from real markets.
What We Built
We implemented an end-to-end algorithmic trading system that operated in a simulated exchange with real-time social-media sentiment, order-book data, and multiple competing teams. Our system included several core components:
1. Market-Making Engine
A module that continuously quote bid and ask prices for multiple stocks.
It dynamically adjusts spreads based on:
- Inventory levels
- Recent price movements
- Risk constraints (±100 position limits)
- Outstanding order limits (max 200)
- Competition from other teams
The goal was to earn spread capture while avoiding excessive long/short exposure.
2. Sentiment-Driven Trading Module
A lightweight sentiment analysis pipeline that:
- Read the social feed in real time
- Classified each tweet as positive/negative/neutral
- Detected referenced companies or tickers
- Generated buy/sell sentiment signals
This signal influenced our quoting behavior — for example, widening spreads during negative sentiment or leaning quotes to accumulate inventory on positive news.
3. Real-Time Risk and Inventory Management
We built safeguards to:
- Prevent exceeding long/short limits
- Unwind risky positions as limits approached
- Pause quoting during volatility or noisy sentiment spikes
- Track PnL, fill behavior, and market exposure
This stabilized our system and avoided catastrophic losses.
4. Execution Layer (Order Handling)
A reliable execution interface that:
- Submitted limit orders
- Canceled/amended stale orders as prices changed
- Respected the 25 requests/second rate limit
- Cleared all orders on shutdown
This ensured our bot interacted safely and efficiently with the simulated exchange.
Log in or sign up for Devpost to join the conversation.