U.F.O.
Aug 4 2004, 10:15 PM
I've been playing around with the indicator R-Squared for over a year and think I've developed a better handle on using it. Indicator rising = strengthening trend, indicator falling = weakening trend. We just started a strengthening move but in which direction? R-Squared used in conjunction with Linear Regression Slope says up. (2 charts)
U.F.O.

Teaparty
Aug 4 2004, 10:31 PM
If the oex can break free above that neckline then I'm with ya on the up side. If not I can target 517,500, 470 on the downside. And since financials make up over 26% of oex at this point in time, I'll throw in 2 more charts. Not being a bear as I'm flat indices. Just looking at weekly's..............man, I don't like what I see. But that could change in a heart beat I guess if sentiment turns ugly quickly. Tell me honestly, would you feel comfortable against these charts being long? Besides a short scalp of course. Which way would the trend favour at this point in time?
[img]http://stockcharts.com/def/servlet/SharpChartv05.ServletDriver?chart=$oex,uu[w,a]waclyiay[dd][pc4!c8!c40!c10!c20!f][vc60][iut!ub14!la5,34,5!ld20!lg!lp14,3,3][j26990866,y]&r=7063.gif[/img]
[img]http://stockcharts.com/def/servlet/SharpChartv05.ServletDriver?chart=$xbd,uu[w,a]waclyiay[d20030701,20041231][pb200!b100!b50!d20,2!c40!f][vc60][iut!ub17!la5,34,5!ld20!lg!lp14,3,3][j28947893,y]&r=9559.gif[/img]
[img]http://stockcharts.com/def/servlet/SharpChartv05.ServletDriver?chart=$bkx,uu[w,a]waclyiay[d20030301,20041231][pd20,2!c40!c10!c20!f][vc60][iut!ub17!la5,34,5!ld20!lg!lp14,3,3][j33978581,y]&r=2813.gif[/img]
thoughtpwr
Aug 4 2004, 11:02 PM
What is R-Squared measuring? Thanks, I am looking for confirmation of my own analysis. Thx, EJ
jmicou
Aug 4 2004, 11:10 PM
Here's another view using a DecisionPoint chart. The 20/50 EMAs that are both curving up have, yet to make the bull cross, but bounced off of the 200 EMA. Nice, tight triangle, too.
http://www.ttrader.com/mycharts/display.ph...20charts&id=982
btreehouse
Aug 4 2004, 11:35 PM
UFO,
This type of post is what I consider the best side of FF.
Thanks,
Teaparty
Aug 4 2004, 11:43 PM
I guess I'm just a meat and potatoes guy 'cause I just don't understand. UFO, Treehouse, anyone, if you have time, could you explain just the basics of what is implied? Muchly appreciated from the Great (and obviously naive) White North.
Cycle Analytics
Aug 5 2004, 02:10 AM
Thoughtpwr wrote:
QUOTE
What is R-Squared measuring? Thanks, I am looking for confirmation of my own analysis. Thx, EJ
Goodness of fit... R^2 measures how well the regression equation fits the data in the look back window.
Regression analysis is a statistical method for fitting and equation to (typically) measured data. The most common equation being fit is a line y = mx + b athough it could be a polynomial, power function, sine wave etc. For a line, given a set of at least two (x,y) data points, using (typically) least squares regression you can find the two unknowns: m (slope) and b (intercept). "Least squares" implies choosing (calculating actually) m and b such that the sum of the squares of the deviations: (actual value (i.e. measured) minus equation predicted)^2 are minimized.
So whats R^2? is a measure of the "goodness of fit" for the solution found by the method of least squares. Its a number that ranges between 1 (a perfect fit... perfect correlation) and zero (a terrible fit no correlation). The other thing UFO is showing is the slope of the regression: m. If its positive, prices (in the window used to determine the equation) are trending up. It its negative, prices ( in the window used to determine the equation) are trending down.
Lest think about this for a minute... the results are highly dependent on what "look back" window is choosen. Lets say price was cycling in a perfect sine wave and you had your regression set to the exact number of bars in the cycle. What would happen? The slope (m) would stay constant ... zero and the correlation coefficient r^2 would stay the same something less than 1 meanwhile price would be swinging above and below the line defined by the regression equation. Potentially profitable trades would be missed.
Another statistical method I like better is Pearson's Rank Correlation. It makes for a very smooth yet responsive momentum measure. To each his/her own.
OEXCHAOS
Aug 5 2004, 03:28 AM
Post of the Week...maybe the month.
jmicou
Aug 5 2004, 07:53 AM
Really nice post, UFO.
For those who don't have LR charting access, PC Quotes does have a linear regression channel setting. It is usefull for Fib levels, too. Otherwise, it's not in the same ballpark as StockCharts.
http://www.ttrader.com/mycharts/display.ph...20charts&id=982
kamakazeman
Aug 5 2004, 09:48 AM
QUOTE (jmicou @ Aug 4 2004, 11:10 PM)
Here's another view using a DecisionPoint chart. The 20/50 EMAs that are both curving up have, yet to make the bull cross, but bounced off of the 200 EMA. Nice, tight triangle, too.
http://www.ttrader.com/mycharts/display.ph...20charts&id=982 jmicou -
Interesting Chart!
Whut dost thou make of the MACD and CCI studies on the chart?
Islander
Aug 5 2004, 09:55 AM
R squared has little or nothing to do with forecasting, it merely says how well the regression coefficient fits the data points used. If R squared rises you have merely a better fit to the past data, but no reason to believe the trend will continue into the future, unless you have independent data suggesting a trend is developing. It is all in the mind of the beholder. An honest trend line tells you about as much about the future, if not more, and it will not mislead you about where support is likely.
I suspect the next move will be determined by oil prices which are confused this morning. Best I
jmicou
Aug 5 2004, 10:27 AM
kamakazeman,
The MACD is rolling over, but does not have a bearish cross and is above the 0 line. Still says longs are favored for the OEX. The CCI is pointing up, but has yet to cross above the 0 line -- an aggressive long in conjunction with the other indicators. If the CCI were above the +100, then a long trend would seem to be in place. The CCI has a lot of room overhead. If the OEX were to breakout to the upside, there would be room to move up. It is interesting to compare the Dollar-Weighted Volume with the OEX MCSUM and OEX Volume MCSUM. The ADX on this chart is helpful as a swing indicator, too.
How do you see it?
TechSkeptic
Aug 5 2004, 11:43 AM
Thanx, UFO! That was a great contribution.
traderpaul
Aug 5 2004, 01:22 PM
UFO, Trying new indicators is like walking into a Thai Resturant and point at the menu and say "give me this one"....

You don't know what you are getting.....
jmicou
Aug 5 2004, 05:37 PM
Thought a follow up to the first dollar weighted chart would be in order. As Bob K pointed out, the advanced volume to declined volume was really lopsided.
http://www.ttrader.com/mycharts/display.ph...20charts&id=982
U.F.O.
Aug 5 2004, 06:19 PM
Thx. for all the kind words and helpful interpretations of this indicator. I'll post it periodically to see what pans out. We did get a strong move today although in a different direction than slope had been indicating. R-Squared actually reversed direction and moved lower today indicating to me that the budding uptrend was either aborted or delayed by this pullback. Here's the MetaStock interpretation of of R-Squared in it's entirety. I'll post today's chart in a different post.
U.F.O.
Interpretation
r-squared values show the percentage of movement that can be explained by linear regression. For example, if the r-squared value over 20 days is at 70%, this means that 70% of the movement of the security is explained by linear regression. The other 30% is unexplained random noise.
It is helpful to consider r-squared in relation to Slope (see Linear Regression Slope). While Slope gives you the general direction of the trend (positive or negative), r-squared gives you the strength of the trend. A high r-squared value can be associated with a high positive or negative Slope.
Although it is useful to know the r-squared value, ideally, you should use r-squared in tandem with Slope. High r-squared values accompanied by a small Slope may not interest short term traders. However, high r-squared values accompanied by a large Slope value may be of huge interest to traders.
One of the most useful way to use r-squared is as a confirming indicator. Momentum based indicators (e.g., Stochastics, RSI, CCI, etc.) and moving average systems require a confirmation of trend in order to be consistently effective. R-squared provides a means of quantifying the "trendiness" of prices. If r-squared is above its critical value and heading up, you can be 95% confident that a strong trend is present.
When using momentum based indicators, only trade overbought/oversold levels if you have determined that prices are trendless or weakening (i.e., a low or lowering r-squared value). Because in a strong trending market, prices can remain overbought or oversold for extended periods. Therefore, you may want to reconsider trading on strict overbought/oversold levels used by many indicators. An "overbought" market can remain overbought for extended periods in a trending market. However, a signal generated by a moving average crossover system may be worth following, since these systems work best in strong trending markets.
To determine if the trend is statistically significant for a given x-period linear regression line, plot the r-squared indicator and refer to the following table. This table shows the values of r-squared required for a 95% confidence level at various time periods. If the r-squared value is less than the critical values shown, you should assume that prices show no statistically significant trend.
Number ofPeriods r-squaredCritical Value(95%confidence)
5 0.77
10 0.40
14 0.27
20 0.20
25 0.16
30 0.13
50 0.08
60 0.06
120 0.03
You may even consider opening a short-term position opposite the prevailing trend when you observe r-squared rounding off at extreme levels. For example, if the slope is positive and r-squared is above 0.80 and begins to turn down, you may consider selling or opening a short position.
There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems. For more detailed coverage, refer to the book The New Technical Trader by Tushar Chande and Stanley Kroll.
U.F.O.
Aug 5 2004, 06:36 PM
Here are those same two charts from yesterday with today's price action.
TP,

that's exactly how I've learned so many good ethnic dishes. Thai, Indian, no matter. Just point at the menu and say "DONE". (2 charts)
U.F.O.

humble1
Aug 5 2004, 07:37 PM
since we are talking about money here with serious people, i think a response to islander's fairly made point is required. frankly, this is pretty much algebra1 or 2, i can't remember which. though math is fun and impressive, i don't remember regression analysis as being predictive, either, in a dynamic and sometimes chaotic and some say random system like the equity markets.
thanks to UFO for sharing his hard work. i hope he doesn't take my remarks as being overly critical. it would certainly be dismissive to simply say nothing.
U.F.O.
Aug 5 2004, 08:27 PM
Humble. ? Check it out and decide for yourself. Read the MetaStock description above. They seem to think the indicator has a lot of merit in determining the "trendiness" of moves.
QUOTE
"R-squared provides a means of quantifying the "trendiness" of prices.....There are numerous ways to use the linear regression outputs of r-squared and Slope in trading systems"
If you're looking for a Philadelphia lawyerish rebuttal of what Islander apparently thinks is a worthless trading tool, you're peeing on the wrong fire hydrant as I'm just learning this indicator myself. I'm finding a definite correlation between trend strength via R-Squared and price action. You (and Islander) may not. Shoot, I may not a month from now. I'll leave you with this. Stochastic Oscillator. Widely accepted by technicians worldwide. Here's what MetaStock has to say about the importance of establishing trend strength when using Sto's to trade OB/OS and how MS suggests one do that.
U.F.O.
QUOTE
"However, before basing any trade off of strict overbought/oversold levels it is recommended that you first qualify the trendiness of the market using indicators such as r-squared (see r-squared) or CMO (see Chande Momentum Oscillator). "
traderpaul
Aug 5 2004, 09:29 PM
OK UFO, When I was little, my mom took us to a Thai resturant and she ordered 7 dishes. I took one bite ( my mouth was on fire )and did not tasted anything for two full days..... Niow tell me how to use your new pride and joy. Should I buy here?
U.F.O.
Aug 5 2004, 10:02 PM
Oh TP, don't tell me you swore off "HOT and SPICY" food as a yout? Man.....I put jalapenos in my scrambled eggs!
On how to use the R2. Here's my read. A nascient uptrend was in progress on $OEX until today. The indicator has backed up and is currently showing a non-trending market. the non-tech indices ($SPX, $INDU, $NYA, $RUT) are all still on higher lows. If the market craps badly again tomorrow the R2 indicator will likely begin to rise, breaking .27 would indicate a 95% probability that a further downtrend was in place. Conversely, if today's move gets reversed tomorrow and the market rallies, the indicator would also likely move up. R2 doesn't indicate direction, only trend strength. I think the main usage of this indicator will be in trend confirmation. Yesterday, I was trying to catch an early move and it didn't happen. We're at a point in the cycle on the verge of a new, strong trend developing. My main interest here is in determining if the R2 can keep me out of the whipsaws and involved more when you actually get paid to ride that trend.
U.F.O.
U.F.O.
Aug 5 2004, 10:21 PM
P.S. TP
Should you buy here? Absolutely. We're at the bottom of a bull flag. Maybe R2 will give us an indication in the next day or two of how aggressively to buy (or sell), but IMO, the next move is up. Best.
U.F.O.
kamakazeman
Aug 5 2004, 11:45 PM
QUOTE (jmicou @ Aug 5 2004, 10:27 AM)
kamakazeman,
The MACD is rolling over, but does not have a bearish cross and is above the 0 line. Still says longs are favored for the OEX. The CCI is pointing up, but has yet to cross above the 0 line -- an aggressive long in conjunction with the other indicators. If the CCI were above the +100, then a long trend would seem to be in place. The CCI has a lot of room overhead. If the OEX were to breakout to the upside, there would be room to move up. It is interesting to compare the Dollar-Weighted Volume with the OEX MCSUM and OEX Volume MCSUM. The ADX on this chart is helpful as a swing indicator, too.
How do you see it?
micou:
'pears that I was less able to see the little bitty charts than I thought.
anyway, the "overview" I had in mind was/is that the action on the studies on the bottom of the chart were indicating low end of the range, etc, so would not have expected the downdraft.
thx for your contributions.......
mike
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.