Inspiration

Sports fans often say they “bought stock” in a player before everyone else recognised their potential. We wanted to turn that idea into a fantasy game where spotting an underrated player early gives you an advantage.

In HoopStreet, users build a portfolio of NBA players and earn returns through game payouts and changes in share prices. An established star might deliver consistent payouts, but their price already reflects those expectations. A younger or overlooked player could become a better investment if their performances improve enough to justify what you paid.

Because these decisions involve price, risk and expectations, the game also gives users a way to learn about trading through a sport they understand. This fitted SGX-FX’s challenge of making markets more accessible through play.

What it does

Users start with H$100 in virtual money and choose from 580 NBA players in our 2024–25 regular-season dataset. They can search for players, compare prices and build a diversified starting portfolio before beginning the season replay.

As the season progresses, players generate payouts based on their game performances, while buying and selling changes their market prices. Users can hold players for regular income, invest in players they expect to improve, or sell when they think the market has priced someone too highly.

Each player also has a model value based on expected future payouts. This takes account of historical performance, recent form, age and injury information. Long-term ability updates gradually, whereas recent form responds more quickly, so a strong game can produce a higher payout without causing an equally large jump in long-term expectations. Injuries affect expected availability according to their severity and assumed recovery time.

Users trade with simulated market makers and bots that follow different strategies. Since these participants have limited cash and shares, orders encounter spreads, trading costs and price impact. The interface supports market orders, limit orders and stop-loss orders, alongside price charts and portfolio tracking.

The aim is to grow the portfolio over the season. At the finish, the score combines remaining cash with the estimated proceeds from selling all holdings after trading costs and price impact. Weekly reports show how much came from investment gains and how much came from payouts, while the learning section and diversification feedback help users understand their decisions.

How we built it

We built the backend in Python using FastAPI, bringing the historical data, valuation model, market simulation, trading accounts and learning layer into one service. The React frontend receives market and account updates over WebSockets.

Opening valuations use earlier seasons, with greater weight given to recent performance. The replay then advances through the 2024–25 regular season at an adjustable speed, incorporating completed games and recorded injury information as they become available.

The current demo runs 300 trading bots alongside simulated market makers. Their cash and share inventories constrain their trading, which makes liquidity an important part of the game.

We also built an optional Solana devnet integration that can record trade receipts and synchronise portfolios on-chain. The backend handles trading and valuation, and the current local preview has Solana switched off.

Jonathan developed the market engine and data pipeline, Riccardo the trading system, Eshan the frontend, and Khizar the learning layer. An initial mock market let us develop in parallel while we agreed the interfaces needed to connect our work.

Challenges we ran into

Getting the economics to behave consistently took several iterations. Recent performance needs to affect payouts, but established players should retain some stability through a rough patch. At the same time, sustained improvement needs to create a meaningful opportunity for users who invested early.

We also found that liquidity problems often appeared later in the replay. As bots spent their cash or sold their inventories, trading could slow down and prices could stop responding to changing expectations. Running full-season tests helped us identify problems that were easy to miss in a short demo.

Bringing the four parts together introduced further challenges around order handling, balances, data formats and replay timing. We worked through these so that purchases, payouts and portfolio values remained consistent across the backend and interface.

Accomplishments that we're proud of

We connected a full-season dataset, a model of future player payouts and a working simulated market into a playable fantasy trading game.

During a full-season test with 300 bots, the engine processed more than 160,000 bot orders and finished with buy and sell quotes available for all 580 players. It also passed checks that cash and shares were conserved through trading.

To improve starting prices, we tested our forecasts against an earlier historical season. This reduced average prediction error and helped us address inflated expectations using evidence from previous performances.

What we learned

Market rules have a direct effect on the strategies a game rewards. Decisions about liquidity, trading costs, payouts and final scoring mattered as much as the valuation formula.

We also learned how much the experience depends on clear feedback. Users need to see what they bought, when they received a payout and why their portfolio changed before they can make informed decisions.

Working as a team reinforced the value of agreeing interfaces early and testing the whole gameplay loop throughout development.

What's next for HoopStreet

We want to test the market across more simulations, improve explanations of major price movements and verify the complete Solana-enabled demo.

After that, we would like to introduce private competitions between friends and live-season data. A classroom mode could build on the same system by giving students a shared starting budget and replay period, allowing them to compare their strategies and discuss the results.

Built With

Share this project:

Updates

Submission history