Most fantasy golf games revolve around some type of ‘draft’ mechanism. That game style works great for sports like basketball, baseball, and football, but it falls flat for golf. In an attempt to create something innovative in that space, I created Golf Tradr.
Overview
Investors are allocated $10,000 to ‘invest’ in a dutch-auction IPO. They can allocate any amount to any or all players in the field for the week. On Wednesday night, an auction is performed and shares are allocated. At the completion of the auction, a fully function live stock market is open for trading. Investors buy and sell shares 24 hours a day throughout the duration of the golf tournament. At the completion of the tournament, the market is closed. Shares of each player are converted to cash, based on how much money the player made in the tournament. The investor with the most capital (converted shares, plus free cash) at the end of the market, is the winner.
Technology
The website was built using Django as the main framework. Celery tasks were used to coordinate jobs such as fetching PGATOUR data from our stats provider, updating the leaderboard, and running automated bot trades (for liquidity). Real-time time series data was generated using Pandas and Google Charts. Payment processing was done using Dwolla. One of the neater subsystems I cooked up was real-time notifications using PubNub. Trade confirmations, system messages, and a chat system were all made possible due to their technology.
On the front end, Bootstrap and jQuery did most of the heavy lifting. Admittedly, some of my jQuery was hideous to look at – but it was functional! One of the latter pieces of functionality to make it in was complete responsiveness across all device types. In lieu of a native mobile app, the responsive web app worked perfectly.
PostgreSQL was used for the back-end database storage and it was all hosted on the amazing platform that is Linode. All of my development was done inside of PyCharm, which I can’t say enough great things about. If you’re doing any type of Python development, please do yourself a favor and give PyCharm a consideration.
In the screenshot above, you can see the main dashboard during a live market. A real-time ticker would show trades as they happened. Each of the investor’s positions were shown with the appropriate data. Clicking on a player would bring you to a detail page (shown below) which included the chart data, and a real-time “L2” order book. As players placed bids and offers, they would show up in the Order Book in real-time.
Additionally, complete scoring was provided for the current week’s PGATOUR tournament. The scorecard showed a breakdown of the player’s round.
Post-Mortem
Unfortunately, Golf Tradr never gained enough momentum to warrant the high cost of the data feed subscription. After 6 months of live operation, I shut it down. In retrospect, the complexity of having to manage a portfolio over the course of 4 days was probably too much to ask of users. We received a few hundred testers, but almost nobody converted into a paying account.
The scope of this project was probably the biggest one I’ve done to date. There were a LOT of moving parts. Implementing a fully functional trading platform was a challenge but one that was quite rewarding. Even though Golf Tradr didn’t take off, I took away quite a few new skill sets from the project. I’ll be hanging on to the code for the project in my archives and drawing from features in future projects.