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

Re: Linear Regression


  • To: <gmulhall@xxxx>
  • Subject: Re: Linear Regression
  • From: "Brook Ewers" <bewers@xxxx>
  • Date: 25 Sep 2001 16:40:25 -0000
  • In-reply-to: <9oj75i+ucc0@xxxx>

PureBytes Links

Trading Reference Links

Sorry about the lateness of this reply, I got the equations from equis; I
have attached the web page. The equations are at the bottom. b-the slope of
the line- is already given in AB. You might also like to check the trading
strategy given in S&C october issue.
The reason is my formula is wrong. If you care to look at it:

sum(C,n)/n=ma(C,n)

sum(n,n)=n^2

and the b terms are canceld out, which leads to a moving average
calculation.

so you are right, thanks geoff. The problem is in the calculation of sum(x).

I off to Melbourne for the long weekend. Any one care to take a look at it.
other wise I will, when I get back.

Seems a PhD isn't good for the simple things.

Cheers
Brook
----- Original Message -----
From: <gmulhall@xxxx>
To: <bewers@xxxx>
Sent: Sunday, September 23, 2001 9:34 AM
Subject: Linear Regression


> Brook,
>
> Do you have a reference for these formulae pls ?
>
> I could not find any difference between a 30 day ma and the 30 day
> lin reg line. This surprised me so I'd like to check the source.
>
> Thanks,
>
> Geoff
>

Title: Linear Regression Lines - Technical Analysis from A to Z


<!--- Creators of MetaStock Technical Analysis Software
-->




<IMG align=left height=1 
src="" 
width=15> 
<IMG alt="Charting Tools" height=50 
src="" 
width=175><IMG height=10 
name=dotwhite 
src="" 
width=150>







<A 
href=""><IMG alt="Equis Home Page" border=0 
height=18 
src="" 
width=115> <FONT 
color=#fefefe face="Times New Roman" 
size=5>Contents

<A class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Preface<A class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Acknowledgments<A 
class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Terminology<A 
class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>To Learn More<A 
class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Introduction 


<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Technical Analysis <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Price fields <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Charts <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Support & resistance <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Trends <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Moving averages <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Indicators <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Market indicators <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Line studies <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Periodicity <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
The time element <A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Conclusion
<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>
Order the Book<A class=SECONDSIDEBAR 
href=""><FONT color=#fefefe face=Arial 
size=1>
Learn more about Technical Analysis


<A class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Reference<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Absolute Breadth Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Accumulation/Distribution<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Accumulation Swing Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Advance/Decline Line<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Advance/Decline Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Advancing-Declining Issues<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Advancing, Declining, Unchanged 
Volume<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Andrews' Pitchfork<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Arms Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Average True Range<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Bollinger Bands<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Breadth Thrust<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Bull/Bear Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Candlesticks, Japanese<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>CANSLIM<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Chaikin Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>Commodity Channel Index<A 
class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>Commodity Selection Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Correlation Analysis<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Cumulative Volume Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Cycles<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Demand Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Detrended Price Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Directional Movement<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Dow Theory<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Ease of Movement<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Efficient Market Theory<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Elliott Wave Theory<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Envelopes (trading bands)<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Equivolume<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Fibonacci Studies<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Four Percent Model<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Fourier Transform<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Fundamental Analysis<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Gann Angles<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Herrick Payoff Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Interest Rates<A 
class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>Kagi<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Large Block Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Linear Regression Lines<A 
class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>MACD<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Mass Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>McClellan Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>McClellan Summation Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Median Price<A 
class=SECONDSIDEBAR 
href="" 
medianprice.html?>Member Short 
Ratio<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Momentum<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Money Flow Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Moving Averages<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Negative Volume Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>New Highs-Lows Cumulative<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>New Highs-New Lows<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>New Highs/Lows Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Odd Lot Balance Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Odd Lot Purchases/Sales<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Odd Lot Short Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>On Balance Volume<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Open Interest<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Open-10 TRIN<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Option Analysis<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Overbought/Oversold<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Parabolic SAR<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Patterns<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Percent Retracement<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Performance<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Point & Figure<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Positive Volume Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Price and Volume Trend<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Price Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Price Rate-of-Change<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Public Short Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Puts/Calls Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Quadrant Lines<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Relative Strength, 
Comparative<A class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>Relative Strength Index<A 
class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>Renko<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Speed Resistance Lines<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Spreads<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Standard Deviation<A 
class=SECONDSIDEBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>STIX<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Stochastic Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Swing Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Three Line Break<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Time Series Forecast<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Tirone Levels<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Total Short Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Trade Volume Index<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Trendlines<A 
class=SECONDSIDEBAR href="" 
><FONT 
color=#fefefe face=Arial size=1>TRIX<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Typical Price<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Ultimate Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Upside/Downside Ratio<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Upside-Downside Volume<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Vertical Horizontal Filter<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Volatility, Chaikin's<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Volume<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Volume Oscillator<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Volume Rate-of-Change<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Weighted Close<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Williams' 
Accumulation/Distribution<A class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Williams' %R<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Zig Zag<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Bibliography<A 
class=SECONDSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>About the Author
<IMG 
height=1 
src="" 
width=150>




<A 
class=MAIN href="">MetaStock 
Family 
<A class=MAIN 
href="">Products 
<A 
class=MAIN href="">Customer 
Corner 
<A 
class=MAIN 
href="">Partners 
<IMG 
alt="Helpful tools we provide Free for traders" border=0 height=23 
src="" 
width=87>

<TABLE bgColor=#420451 border=0 cellPadding=0 cellSpacing=0 
width="100%">

<A class=TOPBAR 
href=""><FONT color=#fefefe face=Arial 
size=1>TA Training 
<A class=TOPBAR 
href=""><FONT color=#fefefe face=Arial 
size=1>Online Charting
<IMGheight=6 
name=top 
src="" 
width=75><A class=ONTOPBAR 
href=""><FONT color=#420451 face=Arial 
size=1>TAAZ Book
<A class=TOPBAR 
href=""><FONT color=#fefefe 
face=Arial size=1>DownLoader
<A class=TOPBAR 
href="" 
target=offsite>Hot 
Stocks

Technical Analysis 
from A to ZBy Steven B. 
Achelis 




 



 
>"> 





  
<FONT face=Arial 
size=2>
LINEAR REGRESSION 
LINES
<FONT face="Times New Roman" 
size=4>Overview
Linear regression is a statistical tool used to predict future values 
from past values. In the case of security prices, it is commonly usedto 
determine when prices are overextended.
A Linear Regression trendline uses the least squares method to plot a 
straight line through prices so as to minimize the distances between the 
prices and the resulting trendline.


Interpretation
If you had to guess what a particular security's price would be 
tomorrow, a logical guess would be "fairly close to today's price." If 
prices are trending up, a better guess might be "fairly close to today's 
price with an upward bias." Linear regression analysis is the statistical 
confirmation of these logical assumptions.
A Linear Regression trendline is simply a trendline drawn between two 
points using the least squares fit method. The trendline is displayedin 
the exact middle of the prices. If you think of this trendline as the 
"equilibrium" price, any move above or below the trendline indicates 
overzealous buyers or sellers.
A popular method of using the Linear Regression trendline is to 
construct Linear Regression Channel lines. Developed by Gilbert Raff,the 
channel is constructed by plotting two parallel, equidistant lines above 
and below a Linear Regression trendline. The distance between the channel 
lines to the regression line is the greatest distance that any one closing 
price is from the regression line. Regression Channels contain price 
movement, with the bottom channel line providing support and the top 
channel line providing resistance. Prices may extend outside of the 
channel for a short period of time. However if prices remain outside the 
channel for a longer period of time, a reversal in trend may be 
imminent.
A Linear Regression trendline shows where equilibrium exists. Linear 
Regression Channels show the range prices can be expected to deviate from 
a Linear Regression trendline.
The <A 
href="">Time Series 
Forecast indicator displays the same information as a Linear 
Regression trendline. Any point along the Time Series Forecast is equal to 
the ending value of a Linear Regression Trendline. For example, the ending 
value of a Linear Regression trendline that covers 10 days will have the 
same value as a 10-day Time Series Forecast.


Example
The following chart shows the Japanese Yen with a Linear Regression 
Channel.
<IMG height=267 
src="" 
width=380>


Calculation
The linear regression formula is:

<IMG height=20 
src="" 
width=84>


Where:
<IMG height=62 
src="" 
width=115>


<IMG height=85 
src="" 
width=215>


<IMG height=41 
src="" 
width=273>

 

 
>"> 
 


<A class=HEADSIDEBAR 
href=""><FONT 
color=#fefefe face=Arial size=1>Top of Page
<FONT color=#665f55 face=Arial 
size=1><FONT color=#665f55 face=Arial 
size=1>Home | <FONT 
color=#665f55 face=Arial size=1>MetaStock | <A 
href=""><FONT color=#665f55 face=Arial 
size=1>Products | <FONT 
color=#665f55 face=Arial size=1>Customer Corner | <A 
href=""><FONT color=#665f55 face=Arial 
size=1>Partners | <FONT 
color=#665f55 face=Arial size=1>Free Stuff | <A 
href=""><FONT color=#665f55 face=Arial 
size=1>Legalities | <A 
href=""><FONT color=#665f55 face=Arial 
size=1>Site Map | <A 
href=""><FONT color=#665f55 face=Arial 
size=1>Contact 
Copyright2000 
Equis International.