Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 8/25/2006 Posts: 12
|
Hi, I'm trying to find stocks that have closed more than or equal to the minimum in 260 days range. 100 * (C - MINC260) / (MINC260)>=100 How can I modify this so that for stocks which don't have 260 days of available data, it still scans for stock closing >= 100% taking the minimum of all available data. Thanks, Siya123
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (siya123) Hi, I'm trying to find stocks that have closed more than or equal to the minimum in 260 days range. 100*(C-MINC260)/(MINC260) >= 100 How can I modify this so that for stocks which don't have 260 days of available data, it still scans for stock closing >= 100% taking the minimum of all available data.
siya123,
You must not be asking for what you really want.
Your PCF will return all stocks with at least 260 days of data. The PCF:
C >= 0.0
will return all stocks as will many others.
Your PCF is equivalent to:
C >= MINC260
Perhaps you intended:
C > MINC260
Maybe not?
Thanks, Jim Murphy
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
siya123,
My post is in error.
Your statement is equivalent to:
C >= MINC260
Your PCF is equivalent to:
C >= 2*MINC260
The latter cannot be modified to return all stocks for which:
C >= 2*MINC(min(260,P))
where P is the number of days of data available.
You can find all stocks for which at least one of:
C >= 2*MINCP, P= 2,3,...,260,
returns "TRUE". That would be a long process.
Thanks, Jim Murphy
|
|
Registered User Joined: 8/25/2006 Posts: 12
|
Thanks, Jim!
So I guess there is no easy way to acheive this? Anyone?
Thanks, Siya123
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
siya123, As bustermu indicated, it is not possible to modify your formula so that for stocks which don't have 260 days of available data, it still scans for stock closing >= 100% taking the minimum of all available data.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |