Bachelor Thesis

Statistical Agent Based Modelling Approach (SABM) Towards Complex Financial and Economic Systems: Implementation in Go

Abstract

Statistical agent based modelling (SABM) aims at reverse-engineering financial markets. In order to do so, more than ten thousand of market strategies are sampled to represent the agents within the market. The SABM is very computationally intensive, especially the backtesting function within it, as identified by Professor Sornette’s research group. Thus, the backtesting function needs to see some time cutting measures in order to reduce the execution time of SABM.

The main task of this thesis was to translate the backtesting function from Python to Go in order to profit from the speed of Go. In addition, after the na\”ive version of the backtesting function was written in Go, the implementation was analysed to find the lines that needed optimisation. After localising the most time-consuming functions using CPU profiling, the identified functions were optimised, tested, and benchmarked until an optimised version of the backtesting function was reached.

This optimised version realised a speed-up of a factor 2.9x in comparison to the vectorised backtesting function in Python, that is to say it  only uses 34.63% of the vectorised version’s execution time.

 

The PDF of the thesis is available here:
To the Bachelor Thesis

 

Create a website or blog at WordPress.com

Up ↑