D

DailyTrade

Find profitable intraday trading algorithms using a simple language.

D

DailyTrade

Find profitable intraday trading algorithms using a simple language.

The problem DailyTrade solves

At least 50% of the turnover at NSE, on average, is through completely automated trading algorithms. These algorithms leverage the speed and processing power of a computer, paired with the ability to not waver from its intents like humans do.

It is generally considered that only large hedge funds can do this kind of trading, since it requires a lot of coding knowledge and infrastructure. However, with the advent of trading APIs from Zerodha, Upstox and many other brokerage firms, even the retail trader can make good returns with algorithmic trading.

How do we find and design these algorithms? Our product is the answer to that. We have designed a simple language, where you can enter a math condition and some parameters and see exactly what returns you would have made if you used that algorithm over the last two years, adjusted for brokerage and slippage costs.

Eventually, we want to make infrastructure that can execute these algorithms live on the market just given your Zerodha credentials. We want to put a algotrading hedge fund in your phone. This is the first step to that.

Challenges we ran into

Granular minute level data of stock prices comes out to have a large size. The data we are processing on is about 1 gigabyte and our platform takes about 1-2 seconds to go through all of it and compute complex statistics.

Our backtesting platform was first written in pure python, but then we ran into serious speed issues. Backtests on one stock would take 2-3mins, which is not very conducive to the creative process of alpha creation.

To solve this, we first wrote the backtester in a compiled typed version of python called cython.

Now to deploy this technology, we ran into another issue. Loading the data into RAM was the bottleneck now :)
So we had to make a daemon, that communicates to our backend via a pubsub server (through Redis). The process stored the required data in memory and communicates with the Django ORM in real time. This is what has made our backtests faster than usual backtests written in python.

Discussion