[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I calculate linear regression?



PureBytes Links

Trading Reference Links

Anybody know how to calculate a 2 series linear regression?

The omega description left me clueless.  I took a stab with the following
code, but it does NOT work....what am I doing wrong?

TIA.





Inputs : IndPrice(Close of Data4), DepPrice(Close of Data1);

Array: IndPriceArray [10](0);
Array: DepPriceArray [10](0);

For Value2 = 1 to 10
 begin
  IndPriceArray [Value2] = (IndPrice[Value2]);
  DepPriceArray [Value2] = (DepPrice[Value2]);
    end;
Value1 = LinRegForecast_a(IndPriceArray, DepPriceArray, 10, 0);