So we kind of have a Robinhood obsession. Robinhood is a stock trading app with no transaction fees, which makes it incredibly addicting. But when we started, we had no idea how to make educated decisions about when to buy and sell. (True story: one of our members once bought a stock that dropped 60% the next day). What's a stochastic? What's a moving point average? How do I not go broke?
What it does
Enter StockTalk, an iPhone app that lets you create your own algorithms and test them instantaneously on historic data. StockTalk shows a graph plotting what your earnings/losses would have been over the time period. You can then compare your earnings with our metrics. Is your algorithm 0.03% as efficient as a random one? Maybe don't become a broker just yet.
How we built it
Our iPhone app allows the user to create a custom algorithm to determine when to buy/sell a stock of their choice. It then sends the ticker and algorithm request to our web API (built with Node.js), which requests historical stock data through the Yahoo Finance API, then runs through the user's algorithm and responds with a JSON string containing its performance based on the historical data, and various comparisons with our own algorithms. The iPhone app then takes the response from the web API and graphs the hypothetical algorithm's performance, along with the stock's historical prices.
Challenges we ran into
Getting started was a bit rough. Callback functions were totally new to us, and so setting up the infrastructure for communication took a bit. After we analyzed the data and sent it to mobile, we struggled with preloading data and asynchronous functions.
Also, we ran into a lot of difficulty using the Robinhood API to gather user information. It turns out that the API might actually be depreciated, and we didn't have an authentication code that would allow the functions to work.
Accomplishments that we're proud of
None of us had any real experience using Node.js, let alone writing a web API with it and having it communicate with requests from iOS. We managed to pull stock data, run all sorts of data analytics on the historic charts, and display them in an intuitive way -- all using frameworks and APIs that we learned on site.
We're also proud of how efficiently we worked together.
What we learned
When your algorithm buys every time the stock is about to go down, and sells every time it's about to go up, you don't make very much money.
What's next for StockTalk
We'd like to aim for more customizable algorithms, so that users can test out more types of algorithms. Along with that, we'd make a UI for users to make their own algorithms. Perhaps most importantly, we want to integrate with a platform to automate actual trading, so that once users have evaluated their algorithms, they can easily put them into practice.