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.
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.
Yesterday I had to fill out a questionnaire on my programming skills as part of a job application procedure. I was asked to name some GoF and JEE patterns I am familiar with, so I pondered on what I had learned for a little while. One thing that somehow struck me as odd was the silent underlying assumption that a “good programmer” nowadays is actually supposed to be familiar with these patterns. Singleton, MVC, Factory, Adapter, Fly-Weight, DAO and so on. After all, programming is a lot about robust design and improving code quality, isn’t it? And sure it is. There is nothing more frustrating than trying to untangle an old piece of software code horribly designed and possibly poorly documented. Using OOP patterns appropriately simply makes the world a better place. So, where is the problem?