Geschichte | Geographie | Wirtschaft | Gesellschaft

 

Parthiv Kangsabanik, 2003 | Basel, BS

 

This project investigated different algorithmic trading strategies. Algorithmic trading is a method to automate trading by using computers programmed to follow a defined set of instructions for placing trades to generate profits at a speed, frequency and volume which are beyond a human trader’s capability. Algorithms can be backtested on historical data to gauge how they will work in current conditions. The aim was to optimise, backtest, evaluate and combine different strategies to create safe and profitable strategies. During the parameter optimisation of the numerous strategies, different theories and myths about strategy parameters or the strategy itself could be accepted or rejected with the chosen set of data.

Introduction

The herd-like behaviour of the market results in price movement trends. To find trends in the price movement of an asset the historical price data of the chosen asset is needed. Then technical indicators can be used to try to come up with a strategy to predict future movements based on past behaviour. This project aimed to answer the following key questions: (I) What are different strategies used in trading? (II) What strategies are profitable and secure? (III) How can different strategies be combined?

Methods

Different materials and methods were used during this project. A Python program was written to acquire the historical data from yahoo finance. The portfolio was made up of the current 30 and the previous 20 DJIA stocks. The chosen time frame for backtesting and optimisation was 1990 till 2019. The 50 stocks in the portfolio were weighted according to their volatility in the past year on the day of the trade. After writing the necessary algorithms for the strategies and the stock weighting, the strategies were backtested and optimised on historical stock price data to evaluate the strategies. The chosen interface for optimisation and backtesting was Excel. To be able to optimise numerous parameter combinations together, without manually inputting the parameter values every time, an Excel Macro was coded. The program could be supplied with the parameter combinations to be optimised. The program then would go through all parameter combinations and calculate the respective VAMI of each parameter combination. Various evaluation metrics were taken into account to evaluate the strategies. As a benchmark, the strategies were compared with a predefined buy-and-hold strategy where one holds a long position for the entire period of 30 years.

Results

The best single strategy proved to be a strategy consisting of a Bollinger Band and moving averages. The strategy had an annual return of 28%, annual volatility of 20%, a Sharpe Ratio of 1.4 and a Sortino Ratio of 2.5. The best combination strategy proved to be a combination of 5 different single strategies: 2 Bollinger Band strategies, a Keltner Channel strategy, a Donchian Channel strategy and an Aroon Oscillator strategy. The combination strategy had an annual return of 22%, annual volatility of 13% a Sharpe Ratio of 1.6 and a Sortino Ratio of 2.8. In comparison, the benchmark buy-and-hold strategy had only an annual return of 23%, annual volatility of 22%, a Sharpe Ratio of 1.1 and a Sortino Ratio of only 1.8. The best single and combination strategies outperformed the benchmark buy-and-hold strategy in almost every aspect. Additionally, the combination strategy outperformed the best single strategy for almost every evaluation metric, indicating that a combination of strategies reduces the volatility and risk involved greatly.

Discussion

One of many interesting phenomena to be observed was the overall decreasing performance of the strategies over the 30 years. As this was also the case for the benchmark buy-and-hold strategy, this behaviour could be due to the overall trend of the market. With further optimisations we would be able to conclude if possibly the recent markets are more volatile and as a result need shorter lookbacks for the technical indicators, to be able to react fast enough to changing markets.

Conclusions

Different strategies were introduced and backtested during this project. Based on the optimisations, strategies and technical indicators which worked better than others for the chosen set of data and time frame could be identified. A simple and effective way of combining different strategies was found to reduce volatility in the VAMI of the combination strategy and have a more stable VAMI increase. A possible next step of this project would be to backtest the strategies on a different timeframe (e.g. 2020-2022) and dataset (e.g. S&P500) to see if the results are replicable.

 

 

Würdigung durch den Experten

Prof. Dr. Raul Gimeno

Algorithmischer Handel stellt eine Automatisierung des Tradings mittels Computer, welche die menschlichen Fähigkeiten weit übersteigen dar.
Herr Parthiv hat verschiedene algorithmische Handelsstrategien mittels zahlreicher Backtests und Optimierungen in Excel über fast dreissig Jahren bewertet.
Eine grosse Menge an Parameterkombinationen wurden manuell analysiert und der jeweilige monatliche Mehrwertindex (VAMI) wurde berechnet, was eine beeindruckende Leistung darstellt.
Eines der vielen interessanten Ergebnisse war die insgesamt abnehmende Performance der Handelsstrategien.

Prädikat:

hervorragend

Sonderpreis Alfred Escher – ETH Student Project House

 

 

 

Gymnasium Kirschgarten, Basel
Lehrer: Attila Kapas