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

Re: hello from a newbie - Now Lin Reg



PureBytes Links

Trading Reference Links

What I do with Linear Regression is:

1. Take the log(C) - because a linear rising log(C) is an exponential rising chart
   of the stocks I am looking for. Log(C) and the projections are superior to C.
2. LinRegSlope(log(C)) will give us the projection, preferably annualized.
3. Calculate the projected standard-deviations. -1s, -2s, or even -5s.
4. Screen NASDAQ stocks for the best annual projection.
5. Apply some entry-techniques (trailing buy stop for example).
6. Tight money management
7. Tight stops.

Formula for (1) and (2), to be modified with input() etc.:

watch:= 63; {lookback period}
ttt:=252;   {projection periods}
mmm:=LinRegSlope( Log(C), watch ); {LinRegSlope}
sss:=Stdev(ROC(Log(C),1,$),watch); {StandardDeviation of daily ROCs}
ra:=(Exp(mmm*ttt-2*sss*Sqrt(ttt))-1)*100; {Projection -2SD;"risk averse"}
pe:=(Exp(mmm*ttt-  sss*Sqrt(ttt))-1)*100; {Projection -1SD;"pessimistic"}
ne:=(Exp(mmm*ttt                )-1)*100; {neutral}
op:=(Exp(mmm*ttt+  sss*Sqrt(ttt))-1)*100; {Projection +1SD;"optimistic"}
ra; {to display}

Bodo