An algo trading system for Futuryze
Between a degree that ended early and a job that started late, I spent six months with an investment firm turning the strategies their founder already trusted into code — and then trying to teach a model to find new ones.
| What | Detail |
|---|---|
| When | March – September 2020 |
| With | Futuryze, working directly with Ashwath, the founder |
| Data | Ten years of one-minute OHLC, across multiple indicators |
| Output | A strategy library, a backtesting engine with a GUI, three time-series backends, and a deep-learning price model |
| Stack | Python, Jupyter, Pandas, TensorFlow |
How the gap happened
My final year at IIT Kharagpur was 2019–20, and it did not finish the way it was supposed to. Covid sent everyone home midway through, and the last semester dissolved into a laptop in a bedroom. I had already been placed with HSBC back in December 2019. HSBC then moved the joining date to October 2020.
So there was a hole: roughly March to September, nothing scheduled, and a strong suspicion that sitting still was the wrong response. Futuryze filled it. It started as a project, not a job — the distinction matters, because nobody was paying me to be cautious.
What we actually did
The first phase was not machine learning. It was translation.
- Understand what the firm already did. Ashwath had strategies he traded on. They were discretionary in the sense that mattered — a set of rules living in a person rather than a script. My first job was to sit with him, pull the rules out, and write down what he actually meant.
- Codify them. Those rules became strategies in code, with the entry, exit and risk conditions stated explicitly enough that a machine could disagree with them.
- Backtest them honestly. Ten years of one-minute OHLC data, multiple indicators, and a backtesting engine built for the purpose. One-minute bars over a decade is a lot of rows, which is why the repo has three different time-series database adapters in it.
- Only then, try to predict. With the existing strategies running and measurable, we moved on to building new ones and training models to forecast where price was going.
The order was the point. Codifying what already worked gave us a baseline that a model had to beat, not a green field where any positive backtest looks like progress.
What's actually in the repository
The GitHub repository undersells this badly — it has a nine-line README and looks like a notebook dump. What's in it:
DLPriceModel.py— 35 KB, a deep-learning price model, the "try to predict" phase.gui_backtest.py— 17 KB, a GUI for running backtests. Nobody asked for this. I built it because reading results out of a notebook cell is a terrible way to form an opinion, and I needed to form a lot of them.indicators.py— 11 KB of indicator implementations, the shared vocabulary everything else is expressed in.charts.pyplus acharts/directory of generated SVGs.q-trader.py— a trading runner, as distinct from a backtester.db/— three separate time-series backends: an AWS MySQL adapter, a QuestDB importer, and a TimescaleDB schema. Plus the scrapers that got the data in.- A 746 KB
notebook.ipynb, anddata/SPY.csv.
What I took from it
Codify the baseline before you model. The most valuable three months were the ones where no model existed, only a person's rules made explicit.
Backtest infrastructure is the product. Three database adapters sounds like over-engineering until you remember that one-minute bars over ten years makes the query engine the bottleneck, not the strategy.
Numbers or it didn't happen. Which is why the honest version of this page still has a hole in it.
Read the code
github.com/pikujs/Algo-Trading ↗ — and ignore the README.