glgene 616 posts msg #126610 - Ignore glgene |
1/6/2016 5:50:23 AM
Is it possible to do multi-period rankings of stocks in a watchlist?
I'm thinking of tracking the performance of a few primary S&P 500 Sector ETFs, based on a performance sorting routine (ROC 1 week), I would like the output to look something like this:
Lastwk, Thiswk, Sym, ROC(5)%
2 ............... 1 ..... XLK....2.35
1.................2 ..... XLP.....2.28
3................ 3...... XLV......2.20
4.................4...... XLI......1.95
6.................5...... XLU.....0.98
And so on (these are made-up numbers above just to show you my concept). As you can see, I sorted on ROC(5), and I included the corresponding ranking number on the "Thiswk" column. But how to show both the "Thiswk" and "Lastwk" corresponding ranking numbers (1 thru 9, for example)? I put the dots there (.) merely as an alignment feature in this write-up; I know the dots would not be present in the final output.
Is this doable in StockFetcher? Sure hope so!
Gene in FL
|
glgene 616 posts msg #126721 - Ignore glgene |
1/14/2016 5:26:03 AM
Kevin,
Since you are the Maestro here (that's a compliment), is my ranking question in this thread doable with StockFetcher scripting, covering "multiple" time periods, such as...
13 wks. ago... 4 wks. ago...2 wks. ago... Last week (past 5 days)
Gene in FL
|
Kevin_in_GA 4,599 posts msg #126725 - Ignore Kevin_in_GA |
1/14/2016 12:01:16 PM
Here is how I code for a ranking of key asset classes (SPY, IWM, AGG, EFA) over a specified time frame. This base code should meet your needs. If you want to look at ranking the previous week, just set up a second set of user defined variables that have "1 week ago" at the end.
|
glgene 616 posts msg #126726 - Ignore glgene |
1/14/2016 1:02:59 PM
Thanks much, Kevin...
The ranking info, incorporated within your script, is precisely what I'm talking about. Great! I need ~4 interval periods, so let me begin work. You have shown me the way. I'll report back with my work-in-progress as I proceed; I'm sure it will need some help along the way. You are the Maestro... I am not.
Gene in FL
|