Ranking and percentiles

Let us know your likes and dislikes, or what you'd like to see next. We listen!

Ranking and percentiles

Postby taowave » Wed Mar 31, 2010 1:52 pm

Hi ,
I know the topic of ranking and percentiles has been brought up,and i am wondering if that is something that will be added in the near term..

As an example,what I would like to do is purchase the 3 stocks with the largest percentage drop and sell them x periods later.

Any insight appreciated,

Allan
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm

Re: Ranking and percentiles

Postby Overload » Wed Mar 31, 2010 2:24 pm

That's been on the list for a while, and I believe it will be a nice feature when it's added. But you should not expect it in the near future.

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm

Re: Ranking and percentiles

Postby taowave » Fri Apr 02, 2010 5:25 pm

On a related note.Is there a way I could short the 2 highest percent gainer stocks each day and cover them four day later?

I am pretty sure it cant be done,but am just checking.

Thanks,

Allan


Overload wrote:That's been on the list for a while, and I believe it will be a nice feature when it's added. But you should not expect it in the near future.

Pete
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm

Re: Ranking and percentiles

Postby Overload » Fri Apr 02, 2010 6:27 pm

Actually, after looking a little closer, I think both of your requests can be done right now, at least in the simple form that you described them.

For your first request, you could use:

Entry: 1=1
Exit: $daysheld = x
Rank Descending: (ref(close, -1) - close) / ref(close, -1) * 100
Portfolio Size: 3

For your second request, you could use:
Entry: 1=1
Exit: $daysheld = 4
Rank Ascending: (ref(close, -1) - close) / ref(close, -1) * 100
Portfolio Size: 2

To match your second request a little more precisely (2 purchases each day, selling 4 days later), you'd need to incorporate a multi-system. Specifically, your Multi-System would need 4 strategies similar to the above, but would need an additional entry rule so that they would stagger their entries creating a max of 2 per day.

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm

Re: Ranking and percentiles

Postby taowave » Fri Apr 02, 2010 6:57 pm

Hi Pete,
My apologies.I spaced out on the first request and left out the EACH DAY part..That is what is puzzling me.You mentioned an additonal entry rule to stagger the entries.Hmmmmm...





Overload wrote:Actually, after looking a little closer, I think both of your requests can be done right now, at least in the simple form that you described them.

For your first request, you could use:

Entry: 1=1
Exit: $daysheld = x
Rank Descending: (ref(close, -1) - close) / ref(close, -1) * 100
Portfolio Size: 3

For your second request, you could use:
Entry: 1=1
Exit: $daysheld = 4
Rank Ascending: (ref(close, -1) - close) / ref(close, -1) * 100
Portfolio Size: 2

To match your second request a little more precisely (2 purchases each day, selling 4 days later), you'd need to incorporate a multi-system. Specifically, your Multi-System would need 4 strategies similar to the above, but would need an additional entry rule so that they would stagger their entries creating a max of 2 per day.

Pete
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm

Re: Ranking and percentiles

Postby Overload » Sat Apr 03, 2010 9:25 am

You mentioned an additonal entry rule to stagger the entries.Hmmmmm...

What I'd envisioned was something like having each strategy use a Modulus of the BarCount, where each strategy could then only be triggered every 4 days. But I'd forgotten that the BarCount() value is symbol-specific, and therefore wouldn't have the strategy usage syncronized for all stocks in a sector. Thinking about it, a Custom Formula DLL could probably be created to do something like this, but that's more than I can do at the moment. So, for now, it perhaps can't easily be done.

I understand what you're ideally looking for. A formula that could be put in the entry string like:
rank($cursector, (ref(close, -1) - close) / ref(close, -1) * 100, DESCENDING) <= 3

I agree that would be nice. But again, you should not expect it in the near future.

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm

Re: Ranking and percentiles

Postby taowave » Sat Apr 03, 2010 2:01 pm

Hi Pete,
Thinking aloud,is it possible I could use the "dayofweek"function??
I have never used it,but lets say I set up multis with 1=1,the PROC rank (ascending/descending) and a "dayofweek" assigned to each multi as the second rule/filter.Would that work??

Allan



Overload wrote:
You mentioned an additonal entry rule to stagger the entries.Hmmmmm...

What I'd envisioned was something like having each strategy use a Modulus of the BarCount, where each strategy could then only be triggered every 4 days. But I'd forgotten that the BarCount() value is symbol-specific, and therefore wouldn't have the strategy usage syncronized for all stocks in a sector. Thinking about it, a Custom Formula DLL could probably be created to do something like this, but that's more than I can do at the moment. So, for now, it perhaps can't easily be done.

I understand what you're ideally looking for. A formula that could be put in the entry string like:
rank($cursector, (ref(close, -1) - close) / ref(close, -1) * 100, DESCENDING) <= 3

I agree that would be nice. But again, you should not expect it in the near future.

Pete
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm

Re: Ranking and percentiles

Postby Overload » Sat Apr 03, 2010 2:37 pm

That may work. You'd need 5 strategies... one of every day of the week. And I believe that your holding period would need to be 5 or less. Feel free to give it a shot and let me know how it goes.

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm

Re: Ranking and percentiles

Postby taowave » Sat Apr 03, 2010 5:50 pm

Hi Pete,
Played around a bit and it looks like it does exactly what I hoped for.
I used a 4 day hold and 5 strategies with a portfolio size of 2 for each strategy.

And from the results,it looks like another myth is shattered

Overload wrote:That may work. You'd need 5 strategies... one of every day of the week. And I believe that your holding period would need to be 5 or less. Feel free to give it a shot and let me know how it goes.

Pete
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm

Re: Ranking and percentiles

Postby Overload » Mon Apr 05, 2010 10:53 am

Well, I'm at least happy to hear you were able to test the system, even if it didn't turn out to be a winner.

And from the results,it looks like another myth is shattered

To be honest, I'm kind of intrigued that so many traders (including StrataSearch users) continue to have such an interest in manual strategy development. Before StrataSearch, I tried for years to piece together my own trading system, and never once found a system that compares to the quality I've seen come out of the automated search.

This isn't to say that creating one's own trading rules to be used in the automated search doesn't have merit. That actually makes good sense. And tweaking an existing system is fine too. But is manual development of a strategy ever very successful for the average trader? This would actually be an interesting poll for StrataSearch users: has anyone ever created a strategy manually that outperforms what can be found using the automated search?

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm

Re: Ranking and percentiles

Postby wisestocktrader » Thu Apr 08, 2010 5:47 am

Yes, and position sizing makes all the difference. Or maybe 30 days isn't enough to test extensively?
wisestocktrader
 
Posts: 13
Joined: Thu Feb 18, 2010 2:14 am

Re: Ranking and percentiles

Postby Overload » Thu Apr 08, 2010 8:14 am

30 days is definitely not enough to test StataSearch extensively. But congrats on being able to program a winning strategy on your own. I believe that is quite rare.

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm


Return to Comments and Suggestions

cron