Fabian Kostadinov

Evolving Trading Strategies With Genetic Programming - Punishing Complexity

Part 6

One of the most poorly understood and yet at the same time most important concepts of genetic programming (GP) is parsimony pressure. It has long ago been demonstrated that for every type of statistical time series a function can be invented that arbitrarily well matches the observed values in the given time frame if that function is just complex enough. Yet, such a function is effectively worthless. As soon as new observations are added or as soon as predictions should be made for values lying outside the observed time frame the function terribly fails to deliver any meaningful result. I am of course talking about the problem of overfitting.

Read More 

Reaktion auf die Verschwörungstheoretiker im Falle Charlie Hebdos

Und erneut schreiben sie wieder - die Verschwörungstheoretiker. Diesmal im Falle Charlie Hebdos. Gar nicht tot, sei er, der erschossene Polizist. Als “Beweis” wird irgendein obskurer Videomitschnitt gezeigt. Es gibt viele Gründe, sich das nicht näher anzuschauen. Eine Reaktion - aus Empörung, man darf es sagen - hier trotzdem.

Read More 

Problems Using Syntax Highlighting with Pygments on Windows

I wanted to turn on code syntax highlighting using rouge for my blog by adding the following line to my _config.yml file.

highlighter:   rouge

Whereas this worked perfectly on my local Windows machine, I ran into problems with Jekyll on GitHub.

Read More 

Cointegration and the Role of the Intercept

Yesterday I wanted to find out whether a pair of stocks would be suitable for pair trading. There is a tutorial by Paul Teetor how to test a pair of securities for cointegration. Basically, we use an OLS linear regression model to estimate the absolute prices of one security with the other’s prices. If the residuals, i.e. the spreads, are stationary then we can conclude that both time series are mean-reverting. This implies that both securities are cointegrated. However, one thing remained unclear to me after first going through Teetor’s tutorial - the role of the intercept in the regression model.

Read More 

Evolving Trading Strategies With Genetic Programming - Fitness Functions

Part 5

At the core of every genetic programming (GP) strategy is the fitness function. The fitness function specifies what the whole evolutionary process is looking for. Every individual is assigned a fitness value, which is computed by the fitness function. Individuals with a high fitness value stand a higher chance to be selected for reproduction and thus to create offspring. Finding a “good” fitness function is one of the most important design aspects of the development process. It is rarely the case that the first idea for a fitness function already produces great results, and defining one requires quite a deep understanding of the problem domain.

Read More