Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF TO RANK MUTUAL FUNDS USING LINEAR REGRESSION LINE Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
SILTCO
Posted : Monday, January 9, 2006 2:20:26 PM
Gold Customer Gold Customer

Joined: 2/12/2005
Posts: 2
IT IS EASY TO RANK STOCKS BASED ON A LINEAR REGRESSION
LINE BUT THE SYSTEM DOESNT WORK FOR FUNDS.
IS THERE A FORMULA AVAILABLE FOR A PCF THAT COULD BE USED
TO RANK FUNDS IN THE SAME MANNER AS STOCKS?
Craig_S
Posted : Monday, January 9, 2006 2:22:33 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Are you referring to the visual slope sorting in TeleChart?

If so, what period is the LR you are using?

- Craig
Here to Help!
SILTCO
Posted : Monday, January 9, 2006 2:31:02 PM
Gold Customer Gold Customer

Joined: 2/12/2005
Posts: 2
I WOULD LIKE TO USE A 15 DAY PERIOD AND WOULD LIKE TO BE ABLE TO USE VISUAL SLOPE SORTING OR THE PERCENT SLOPE
WHICH ARE BOTH AVAILABLE FOR STOCKS.
Doug_H
Posted : Monday, January 9, 2006 2:32:39 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
Visual sorting of indicators is not currently available in TeleChart for Mutual Funds.

- Doug
Teaching Online!
Craig_S
Posted : Monday, January 9, 2006 2:52:39 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
You can write PCFs for the slope. It is covered in this thread:

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis

I, personally, cheat and use a shortcut.

Try sorting by these PCFs and see if they do the trick:

15-day Direction
100*AVGC8/AVGC8.7

I think the relationship between the ranking and your 15-bar LR line will be obvious to you.

- Craig
Here to Help!
Bruce_L
Posted : Monday, January 9, 2006 3:52:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You may wish to try the following:

LR15 Visual Slope (Zoom 9 Arithmetic):
100 * (7 * C + 6 * C1 + 5 * C2 + 4 * C3 + 3 * C4 + 2 * C5 + C6 - C8 - 2 * C9 - 3 * C10 - 4 * C11 - 5 * C12 - 6 * C13 - 7 * C14) / 280 / (MAXH17 - MINL17)

LR15 % Slope:
100 * (7 * C + 6 * C1 + 5 * C2 + 4 * C3 + 3 * C4 + 2 * C5 + C6 - C8 - 2 * C9 - 3 * C10 - 4 * C11 - 5 * C12 - 6 * C13 - 7 * C14) / 280 / ABS(AVGC15 - 8 * (7 * C + 6 * C1 + 5 * C2 + 4 * C3 + 3 * C4 + 2 * C5 + C6 - C8 - 2 * C9 - 3 * C10 - 4 * C11 - 5 * C12 - 6 * C13 - 7 * C14) / 280)

How to create a Personal Criteria Forumula (PCF)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Craig_S
Posted : Monday, January 9, 2006 3:59:45 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
...for the record, Bruce has provided the exact formulas. My formulas are not exact and are a shortcut that I've become attached to for no particular reason.

- Craig
Here to Help!
bustermu
Posted : Tuesday, January 10, 2006 2:54:53 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

Why do you have

MAXH17-MINL17

in the denominator instead of

MAXH20-MINL20

Is that a typo or does Zoom 9 only have 17 bars for Mutual Funds or what?

In the Help Files under Linear Regression Sort it says:

"Visual Slope - Value represents % of vertical screen real estate the linear regression line covers."

I find that the Visual Slope Sort Value is nowhere near the stated value nor does the Visual Slope Sort give the same order as the stated value.

The Visual Slope PCF for LinReg5 and Zoom 9:

100*4*((2*C0+1*C1+0*C2-1*C3-2*C4)/10)/(MAXH20-MINL20)

was used. The Standard and Poors 500 Component WatchList was sorted by Visual Slope on a LinReg5 placed on Price. The discrepancy should be visually obvious near the top of the list.

I am, unfortunately, updated to 9:54 AM ET, 01/10/06. For VFC, the Visual Slope Sort value is 21.79 but the PCF (correct) value is 86.81. You will not get those numbers, but the eye can easily discriminate between 20% and 85%.

I have not checked to see if the Percent Slope Sort is actually as stated in the Help Files.

Thanks,
Jim Murphy
Bruce_L
Posted : Tuesday, January 10, 2006 3:13:53 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (bustermu)
Why do you have

MAXH17-MINL17

in the denominator instead of

MAXH20-MINL20

I started by using 20 but switched to 17 because it's the denominator that produces a Personal Criteria Formula that matches the results of the Visual Slope Sort (please give it a try and see below).

QUOTE (bustermu)
In the Help Files under Linear Regression Sort it says:

"Visual Slope - Value represents % of vertical screen real estate the linear regression line covers."

I find that the Visual Slope Sort Value is nowhere near the stated value nor does the Visual Slope Sort give the same order as the stated value.

I've been playing with it a bit since answering the question originally (I'm not done yet). As far as I can tell, the value of a Visual Slope Sort doesn't change with Zoom at all.

QUOTE (bustermu)
I have not checked to see if the Percent Slope Sort is actually as stated in the Help Files.

It seems to match. The PCF I wrote matches the chart and is based directly on the help files (although I certainly could have made a mistake in translation).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Tuesday, January 10, 2006 3:34:29 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (Bruce_L)
I've been playing with it a bit since answering the question originally (I'm not done yet). As far as I can tell, the value of a Visual Slope Sort doesn't change with Zoom at all.


I also get no change with LinReg5. If there is a number to use in place of the 20 for LinReg5, it is not 17. It is well over 20 from looking at a few plots.

Thanks,
Jim Murphy
Bruce_L
Posted : Tuesday, January 10, 2006 3:41:59 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
Please try the following:

100 * (2 * C0 + 1 * C1 + 0 * C2 - 1 * C3 - 2 * C4) / 10 / (MAXH7 - MINL7)

The timeframe appears to just be the period plus two (and the percentage appears to be based on the rise of a single bar, not the entire Linear Regression like the formula in your Tuesday, January 10, 2006 2:54:53 PM post).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Tuesday, January 10, 2006 3:48:06 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

The Percent Slope Sort as described in the Help Files makes no sense when you calculate the percent change from zero or a negative number.

You need to get a big raise and help those poor boys out.

Thanks,
Jim Murphy
Bruce_L
Posted : Tuesday, January 10, 2006 4:09:48 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
I'm not sure I would personally use a Linear Regression Percent Slope Sort on an indicator that isn't always positive (I haven't thought about it that much, but the absolute value function does keep the slopes sorted in the more intuitive order). That said, a "Percent Slope" has to have a starting value to use when calculating its percentage. What would you suggest?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Wednesday, January 11, 2006 1:13:06 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

The left endpoint of a linear regression line placed on a positive indicator is not always positive. This can lead to trouble when when using Percent Slope Sort as described in the Help Files.

Some might expect LR Slope Sorts of any kind on LR's placed on two overlying curves to give the same results. They do not.

When I place an LR5 on Price and do an LR Percent Slope Sort, I do not get agreement with that described in the Help Files, but I will check that again.

Thanks,
Jim Murphy
Bruce_L
Posted : Wednesday, January 11, 2006 10:04:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (bustermu)
The left endpoint of a linear regression line placed on a positive indicator is not always positive. This can lead to trouble when when using Percent Slope Sort as described in the Help Files.

True, but the only thing I've ever used it with is Price where it does allow apple to apple comparisons of the Linear Regression Slope under most circumstances (although I'd rather have a Price Growth Rate as described in Price % change calculations aren't right with an adjustable Period).

QUOTE (bustermu)
Some might expect LR Slope Sorts of any kind on LR's placed on two overlying curves to give the same results. They do not.

But they'd be wrong. TeleChart provides different options so a user can choose what is appropriate for their particular application. Providing a pure, non-Visual, non-Percent Slope Sort would create additional versatility, but I'd probably still use Percent Slope if I was sorting Price using Linear Regression.

QUOTE (bustermu)
When I place an LR5 on Price and do an LR Percent Slope Sort, I do not get agreement with that described in the Help Files, but I will check that again.

The following Personal Criteria Formula appears to match the LR Percent Slope Sort results:

100 * ((2 * C + C1 - C3 - 2 * C4) / 10) / ABS(AVGC5 - 3 * ((2 * C + C1 - C3 - 2 * C4) / 10))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Wednesday, January 11, 2006 10:11:30 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (bustermu)
When I place an LR5 on Price and do an LR Percent Slope Sort, I do not get agreement with that described in the Help Files, but I will check that again.


Bruce,

I have now varified this result.

From the Help Files under Linear Regression Slope:

"Percent Slope - Value represents the % change in one period of the linear regression line. Calculation = ((A - B)/ABS( B )*100)/LR Period. The LR Period is the Period value from the linear regression line."

The B and A are the left and right endpoints of the LR Line , respectively.

For LR5, the PCF:

100*4*(2*C0+1*C1+0*C2-1*C3-2*C4)/10
/(5*ABS(AVGC5-2*(2*C0+1*C1+0*C2-1*C3-2*C4)/10))

calculates 100 times the quantity described in the Help Files.

As of the close on 01/10/06, for GM with an LR5 on Price, the results are:

1) Percent Slope Sort value 3.81

2) PCF value 2.93

3) Calculated fron reading LR5 endpoints 2.93877

It appears that in the Help Files under Linear Regression Slope, the description of Visual Slope and Percent Slope are both incorrect. We have an accurate description of Visual Slope Sort from Bruce, but we still do not have a correct description of Percent Slope Sort.

Bruce. Your PCF for Percent Slope Sort is closer than that described in Help Files but does not match. Please notice that in order for your PCF to match the Help Files description, you have to multiply it by 14/15 I believe.

Thanks,
Jim Murphy
Bruce_L
Posted : Wednesday, January 11, 2006 10:24:13 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
I'm going to step back and work on this some more, because the results don't match for me at the moment (I must have pasted the wrong version of the formula and I'm going to try and use TeleChart's built in Restore function to try and find the PCF that did match).

Changing the help files is simple enough if it can be reproduced using a Personal Criteria Formula (and will be done when this topic eventually gets to that point).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Wednesday, January 11, 2006 11:17:18 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

Thank you.

Thanks to you, we now have PCF's to match both Visual Slope Sort and Percent Slope Sort. The latter appears to be the percent change from of the extension of the LR one bar to the left of the left endpoint up to the left endpoint. That should be checked for even periods. Why do you think someone would dream that up?

It makes problems with the beginning value of the percent change calculation even more likely. If you do a percent change calulation on the LR for a one bar interval starting at the center, you will never have a problem, for Price anyway. That would be my recomendation. What do you think?

Don't ever do a Percent Slope Sort for an LR on something like RSI, MS, TSV, BOP, etc. Such sorts should probably be confined to Price alone.

You should get a big raise and become the Chief Technical Advisor.

Thanks,
Jim Murphy
bustermu
Posted : Wednesday, January 11, 2006 11:43:57 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (Bruce_L)
I'm going to step back and work on this some more, because the results don't match for me at the moment (I must have pasted the wrong version of the formula and I'm going to try and use TeleChart's built in Restore function to try and find the PCF that did match).


Bruce,

Don't do that. The two PCF's you provided for LR5 are a perfect match to the Sort values. I have not checked other periods. Even periods may be a problem.

Thanks,
Jim Murphy
bustermu
Posted : Wednesday, January 11, 2006 4:12:43 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

I just checked your two LR15 Slope Sort PCF's against the actual Slope Sort values. The match is exact. I believe your only error is in thinking you had an error.

The next thing is to try an even LR period.

Thanks,
Jim Murphy
bustermu
Posted : Thursday, January 12, 2006 9:19:01 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

Consider an LR of period P and slope m on Price. The formula you gave for the Percent Slope Sort value is:

100*m/ABS(AVGCP-((P+1)/2)*m)

I have tested it for P = 4, 5, 15 and have not found a discrepancy between the PCF value and the Percent Slope Sort value. So, your formula appears to be valid for even P also.

Of course, why that m is in the denominator is a mystery to me. It can only cause trouble. My guess is that it was unintended on the part of the developer.

Thanks,
Jim Murphy
jrichard
Posted : Saturday, February 18, 2006 9:47:46 PM
Registered User
Joined: 1/26/2006
Posts: 1
Where in Telechart is the Mutual Funds stuff. I have tried putting in my Company's different Mutual Funds and Telechart says "Symbol not fount" ????

Thanks,

jrichard
Craig_S
Posted : Sunday, February 19, 2006 2:33:05 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Funds are not in TeleChart 2005 Gold. There is a Mutual Fund version of TeleChart. Please call 800.776.4940 for more information.

- Craig
Here to Help!
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.