My first investment was made using the Trading 212 application after turning 18. For the first couple of years, a lot of time was spent refining investment strategy.

After observing that much time was being dedicated to finance, I decided to not ditch it completely but pursue it while learning how to incorporate and improve my computer science knowledge at the same time.


Early exploration into Algo Trading

Learning algorithmic trading first requires discerning what is legitimate advice online. This is a fairly arduous task for anyone new to the field. Most videos on Youtube are funnels that lead to the classic ‘join my course to learn more’ with a link taking you to a webpage giving you an amazing 70% discount on a £30,000 course. Many articles online on the topic also come from brokerages that sometimes give good information but also try to sign you up to their brokerage (Every trade made has a commission that goes to the brokerage firm). This made it take a while to gather valuable information. To get a feel for the field of trading, some money in was put in a brokerage account with a cheap fee structure and it was given a go. It wasn’t a rags to riches story, but a lot was learnt about the different types of information that can be collected to assist in making buy and sell decisions. The information could be financial indicators, general news, economic activity, and general market sentiment from reading opinions online.

After this experience I felt that algorithmic trading was the best way to encode trading decisions with large amounts of information.

MetaTrader

When looking for ways to program strategies, the first application used that had the ability to code algorithms and backtest, while also showing a chart of all the trades taken with summary statistics after was Metatrader 4 (MT4). It also connected to my brokerage at the time, which would technically have allowed real trading using their API if a strategy was finalised.

Some basic algorithms were made that would work in backtests. This was done by tuning parameters repeatedly to make the strategy fit to historical data and this mistake was only realised later when switching to the next application. Since my machine uses MacOS, and MT4 only worked on Windows, it had to operate through an emulation layer - Wine, which brought a set of problems and workarounds outside of strategy development.

During this time with MT4 I learnt the basics of strategy building. This included:

  • Utilising indicator values as basis for algorithms
  • Risk management using stop losses and take profits

The Zorro Project

After looking around for an MT4 replacement, I found out about The Zorro Project. In hindsight, using this application was by itself not pivotal since Python could make up for everything that this service (and MT4) could provide. However, during this time a lot was learnt about commonly used statistical metrics like Sharpe ratios, percentage returns and CAGR - and also how they can lie.

One thing Zorro had was comprehensible documentation. The application used a language called lite-C and was built on C, so the entire interface was snappy. As soon as a program was launched with the interface, it would backtest the strategy with great speed. So it made testing strategies a lot faster than MT4.

Using Zorro introduced me to Monte Carlo analysis for taking backtests further. Concepts using permutation strategies and bootstrapping was also being introduced to me by books and a couple channels on Youtube. This involved changing the price path of the time-series data randomly and testing to see if the strategy on real data had better performance on average than with permuted data.

This was still a statistical method, and when randomness comes into play, you never really know truly whether a strategy is good or not. That’s why its normal to run the strategy a few thousand times on permuted data to really verify, and even then there is no certainty.

Moving to Python

After developing algorithms using Zorro, I realised Python could do everything that Zorro could do. Using Python allowed for more fine-grained control and the opportunity to use machine learning for strategies.

Until this point, about 8-10 months was spent on this topic. Since this was during a gap year between my second and third year, time was also spent looking at other domains. Trading algorithms and gaining relevant domain knowledge however took most precedence.

My programming skills had improved by this point from working on different side projects. It was more comfortable to grasp programming concepts and easier to build more complex strategies.


For my final year of university it was decided that my final research project had to be on something financial since it was the area I immersed myself in most.

For my final year project where I developed a novel strategy of improving profitability of a machine learning model with basic technical indicators - look at Dissertation - Regime Targeted Permutations