Author: weso
Creation Date: 10/3/2010 1:06 PM
profile picture


hi there, anyone got code for calculating the cointegration between pairs of stock price series?
profile picture


I did not find follow up of this. I would like to know how to build a cointegration test within wealth lab or at least how to create a regression between two assets in order to get the hedge ratio. Log (asset1) = alpha + beta * Log (asset2) + e. then how to use the residuals in order to create a z-score in order to use different levels to backtest the strategy.
profile picture


Sounds like many building blocks can be found in Community.Indicators:

+ Log
+ Alpha
+ Beta
+ Z-Score is an auxiliary DataSeries (see Correlation.cs, AggZ.cs, MACZ.cs in its open source code)
profile picture


Thanks. I have something to start working. Cheers.