|
allan nathan
2013-07-21 18:35:22
|
|
Hi,
would anyone hav the formulas for Beta and correlation
thanks in advance
Allan
|
|
|
|
QuantShare
2013-07-22 06:43:30
0
|
|
Correlation function is built-in QuantShare. The function name is "correl".
You can get beta function here: Beta
(by Stefan Kroscen,
uploaded several months ago)
No notes
|
|
|
|
|
allan nathan
2013-07-23 23:55:25
0
|
|
hi,
i am pretty sure the beta formula is incorrect..would you check?
checking on correlation
Allan
|
|
|
|
QuantShare
2013-07-24 07:11:04
0
|
|
Why do you think the formula is incorrect.
It is covariance(r1, r2) / var(r2)
As described, the beta function requires the covariance indicator which can be downloaded here: Covariance
(by Stefan Kroscen,
uploaded several months ago)
No notes
|
|
|
|
|
allan nathan
2013-07-24 18:04:21
0
|
|
when i check the values for beta in qs vs other programs the values are different.
i downloaded the covariance formula.
is this not correct?
temp1 = GetSeries("spy",close);
a = beta(close,temp1,252);
Plot(a, "beta", colorBlack, chartLine, StyleSymbolNone);
|
|
|
|
|
allan nathan
2013-07-25 05:47:01
0
|
|
when i plot the beta and choose the SPy for both symbols in the beta formula,I get .65.i should be getting 1.Dont you agree?
|
|
|
|
QuantShare
2013-07-25 06:41:17
0
|
|
I am getting 1 when plotting your formula:
temp1 = GetSeries("spy",close);
a = beta(close,temp1,252);
a = round(a, 10);
Plot(a, "beta", colorBlack, chartLine, StyleSymbolNone);
|
|
|
|
allan nathan
2013-07-25 13:37:09
0
|
|
my apologies..i was looking at a heikan ashi chart and it distorted the values
|
|
|
|