StockFetcher Forums · General Discussion · Slope number seems wrong<< >>Post Follow-up
29 posts
msg #103611
Ignore jcollins01
12/4/2011 4:07:41 PM

These should return exactly the same number but they don't. Am I missing something?
set {fast_slope, 5 day slope of the high}
set {fiveday, high - high five days ago}
set {fiveslope, fiveday / 5 }
add column fast_slope
add column fiveslope

29 posts
msg #103612
Ignore jcollins01
12/4/2011 7:51:40 PM

I got a reply from the nice StockFetcher people:

"Thank you for the feedback. The "slope" on StockFetcher is the slope calculated from the "best-fit" line using linear regression:

Your example below is more similar to a "rate of change" computation."

4 posts
msg #103713
Ignore aero23
12/9/2011 11:40:32 PM

That still doesn't make sense. The SF Guide goes out of its way to make it seem like the slope calculation is normalized to make it useful for comparison between stocks with widely varying prices. They're response about using the slope of a linear regression fit does not do that though. If the slope value is indeed the slope of a linear regression fit, then it does NOT allow one to compare slopes over a broad range of price values, which in a sense makes it useless in a filter.

Here's how I think the slope should be calculated: (2 different methods)

1. Use the same linear regression line, but calculate using: (percent change of the y-axis of the line) / (size of range). With this calculation, if a $1 stock goes to $2 in 5 days, it's slope is .2 calculated by 1 / 5 (1 as the decimal representation of 100%.) Likewise, if a 15$ goes to $30 in 5 days, it also has a slope of .2 since it also increased 100% in the same time period.

2. just use the decimal representation of the percent change of the linear regression line as above, regardless of the time period since all stocks will be compared to that metric over the same defined time period. This technically isn't a slope, but it could be thought of as a normalized slope. Ex: a stock increases 25% will have a slope of .25. Average volume decreases by 50% will have a slope of -.5. The close tripling would have a slope of 2. Again, in this scenario the time period isn't used to make the calculation of the slope value, but it is used to find the linear fit to the data.

Just my thoughts...

973 posts
msg #103714
12/10/2011 9:08:35 AM

If you are interested in using a "normalized" slope, simply use "normslope" in place of "slope" in your filters. Support

131 posts
msg #103716
Ignore 15minoffame
12/10/2011 10:22:47 PM

I'd like to thank both aero23 & stockfetcher. Aero23 for bringing up the true definition of slope & stockfetcher explaining the differences. I didn't know we could use normslope. That's exactly what I'm looking for!

Thanks again boys/girls!

4 posts
msg #103762
Ignore aero23
12/14/2011 1:36:05 AM

Excellent! Thank you Stockfetcher team. Now I just need to figure out what the value actually means! I filtered for a 5 day normslope of closing price between .1 and .11 and with three different results ranging from closing prices of $.14, $12, and $56, they all were a price increase of roughly 8.5%. Can you explain how the normalized slope calculation is derived? I can't figure out how the slope value of .1 returned that price increase.

Thanks a lot guys.

StockFetcher Forums · General Discussion · Slope number seems wrong<< >>Post Follow-up

*** Disclaimer *** does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. does not recommend particular securities., Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.

Copyright 2018 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus