hi there, anyone got code for calculating the cointegration between pairs of stock price series?
Size:
Color:
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.
Size:
Color:
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)
Size:
Color:
Thanks. I have something to start working. Cheers.
Size:
Color: