Dear Programmers,
This is Gunter Meissner. I am currently writing a book on Forecasting and
derived the regression coefficient with Numpy:
import numpy as np
X=[1,2,3,4]
Y=[1,8000,5000,1000]
print(np.cov(X,Y))
print(np.var(X))
Beta1 = np.cov(X,Y)/np.var(X)
print(Beta1)
However
Thanks Warren! Worked like a charm 😊 Will mention you in the book...
Gunter Meissner, PhD
University of Hawaii
Adjunct Professor of MathFinance at Columbia University and NYU
President of Derivatives Software www.dersoft.com
CEO Cassandra Capital Management www.cassandracm.com
CV
> which
> > > > one is it using?
> > >
> > > I've tried to read about this, but couldn't find anything. What
> > > are
> > > these different strategies?
> > ___
> > NumPy-Discuss