Support Board
Date/Time: Thu, 13 Feb 2025 20:05:24 +0000
[Programming Help] - Linear regression of two price series
View Count: 548
[2020-12-22 14:30:10] |
User820318 - Posts: 40 |
I would like to run a linear regression using the price series of two instruments as my dependent and independent variables and compute the residuals. - e.g. y=c+m*x, where y = last price of GC and x = last price of SL. From what I understand the sc.LinearRegressionIndicator() only takes one input variable as well as index (time).Is there a way to achieve what I am trying? |
[2020-12-22 21:19:04] |
User820318 - Posts: 40 |
Figured this out using a spreadsheet study and calculating the SLOPE and INTERCEPT and then using that to generate predicted values and residuals.
|
To post a message in this thread, you need to log in with your Sierra Chart account: