Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

backtesting with PCF's Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
celo
Posted : Tuesday, September 4, 2012 12:17:08 PM
Registered User
Joined: 10/7/2004
Posts: 131

I have been having some issues  backtesting with the PCF's below. I am getting different results on some of the older tests than I believe I should be getting. The  more recent tests seem to be correct,  but the further back in time I go the more incorrect the tests seem to be.

 I would appreciate it if you could check to see if I have the following PCF's  written correctly. I have put in PCF's for today, yesterday and 10 days ago for most of the tests to make sure they are all correct and I have not made any mistakes on the PCF's on the older scans. Since I have been spending my full time backtesting I want to make sure the PCF's are correct.  

Are these any other reasons why you would believe the older tests could be incorrect?

Also,are there any limitations on using these PCF's back in time besides the availability of data for the days I would want to test?  Thanks very much.

 ((C - C1) / C1 * 100)  1 day price change

 ((C9 - C10) / C10 * 100)  1 day price change 10 days ago

 100 * ( V / AVGV136)  136 day volume surge today

 100 * V1 / AVGV136.1  136 day volume surge 1 day ago

 100 * V10 / AVGV136.10   136 day volume surge 10 days ago

 100 * ((C - C136) / C136 + (C - MINL252) / (MAXH252 - MINL252)) / 2    136 day price change and 252 day range  

100 * ((C1 - C137) / C137 + (C1 - MINL252.1) / (MAXH252.1 - MINL252.1)) / 2   136 day price change and 252 day range 1 day ago  

100 * ((C10 - C146) / C146 + (C10 - MINL252.10) / (MAXH252.10 - MINL252.10)) / 2  136 day price change and 252 day range 2 days ago  

C1  price one day ago

C10  price 10 days ago

 AVGC5 * AVGV5 / 100   5 day average dollar volume

AVGC5.1* AVGV5.1/ 100   5 day average dollar volume 1 day ago

AVGC5.10* AVGV5.10 100   5 day average dollar volume 10 days ago

Bruce_L
Posted : Tuesday, September 4, 2012 12:43:14 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

QUOTE (celo)
((C - C1) / C1 * 100)  1 day price change

This would be correct, but could be shortened to:

100 * (C / C1 - 1)

QUOTE (celo)
((C9 - C10) / C10 * 100)  1 day price change 10 days ago

This would actually be the Price Percent Change from 9-trading days ago. An Indicator Formula for the Price Percent Change from 10-trading days ago would be:

100 * (C10 / C11 - 1)

QUOTE (celo)
100 * ( V / AVGV136)  136 day volume surge today

Assuming you see 136 day volume surge today as the ratio between the current volume and the 136-Period Simple Moving Average of volume, then yes, this formula would be correct.

QUOTE (celo)
100 * V1 / AVGV136.1  136 day volume surge 1 day ago

As would this formula.

QUOTE (celo)
100 * V10 / AVGV136.10   136 day volume surge 10 days ago

And this formula.

QUOTE (celo)
100 * ((C - C136) / C136 + (C - MINL252) / (MAXH252 - MINL252)) / 2    136 day price change and 252 day range

This is correct (assuming I am understanding your nomenclature), but could be shortened considerably to:

(100 * (C / C136 - 1) + STOC252) / 2

QUOTE (celo)
100 * ((C1 - C137) / C137 + (C1 - MINL252.1) / (MAXH252.1 - MINL252.1)) / 2   136 day price change and 252 day range 1 day ago

This is also correct but could be shortened as well:

(100 * (C1 / C137 - 1) + STOC252.1.1) / 2

QUOTE (celo)
100 * ((C10 - C146) / C146 + (C10 - MINL252.10) / (MAXH252.10 - MINL252.10)) / 2  136 day price change and 252 day range 2 days ago 

Your formula actually seems to be for 10-trading days ago instead of 2-trading days ago. An Indicator Formula for 2-trading days ago would be:

(100 * (C2 / C138 - 1) + STOC252.1.2) / 2

QUOTE (celo)
C1  price one day ago

Correct.

QUOTE (celo)
C10  price 10 days ago

Also correct.

QUOTE (celo)
AVGC5 * AVGV5 / 100   5 day average dollar volume

It is decent approximation if dollar volume is in units of $10,000 (the shortest possible using daily data). You would actually need to multiply by 100 to get the units in actual dollars because volume in TC2000 version 7 is reported in blocks of 100 shares.

100 * AVGC5 * AVGV5

QUOTE (celo)
AVGC5.1* AVGV5.1/ 100   5 day average dollar volume 1 day ago

Correct for $10,000 units. In $1 units it would be:

100 * AVGC5.1 * AVGV5.1

QUOTE (celo)
AVGC5.10* AVGV5.10 100   5 day average dollar volume 10 days ago

You appear to be missing either a / or a * sign in your formula. In units of $10,000 it would be:

AVGC5.10 * AVGV5.10 / 100

In units of $1 it would be:

100 * AVGC5.10 * AVGV5.10

QUOTE (celo)
Are these any other reasons why you would believe the older tests could be incorrect? Also,are there any limitations on using these PCF's back in time besides the availability of data for the days I would want to test?

I cannot think of a reason the older results would be incorrect as long as you realize the offsets are in trading days and not calendar days. Can you provide some specific examples?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
celo
Posted : Tuesday, September 4, 2012 1:37:02 PM
Registered User
Joined: 10/7/2004
Posts: 131

Bruce,

Thanks for you very thorough and precise response.

I actually had all of the the PCF's written correctly for other days, I screwed up the  (2) 10 days PCF's  since I wrote them only for this question and apparently I wrote them inproperly by mistake.

I checked the new PCF'S  put into this question multiple times but you found the errors and I did not and I definitely appreciate your  attention to detail.

I did check the one days price change for previous days since this is easy to check I did find that my PCF works for this. We must count  the number of days in the past in a different way than I do. I look at the number of days after the market is closed and the program is updated. Regardless,  the way I have the PCF written works for me the way I count days  but I appreciate you pointing this out.

As I have been doing tests full time backtesting for weeks I really wanted to make sure these PCF's were correct as I found differences in some days test run 20 or 30 days ago. I am not sure why there are differences except perhaps I did the tests wrong originally and now I am doing them correctly.

I was really freaking out last night when I ran the tests for twenty days ago and compared them to the evening I ran the test the results were not even close. I was afraid I had a mistake somewhere in my calculations and the last 4 weeks work were all in vain, apparently this is not the case.

Thanks very much again.

 

Bruce_L
Posted : Tuesday, September 4, 2012 1:41:51 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I'm pretty sure we are probably counting the number of days ago the same way. I only added the trading days versus calendar days comment as a remote possibility for the differences.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
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.