StockFetcher Forums · Filter Exchange · Dollar and Percentage Changes Over A Specific Period<< >>Post Follow-up
gruender
101 posts
msg #41787
Ignore gruender
3/6/2006 3:02:07 PM

Could someone please help with this filter? I cannot find the "help" on how to use a specific date in lieu of using "xx days ago" which I am currently using but this is a real pain.

The intent of this filter is to see what is the dollar change and what is the percentage change for all ETFs since the beginning of 2006 (01/03/2006). I prefer to have the ability to use a specific date so that I can run this filter based on any date that I choose.

Fetcher[set{mygain,close - close 41 days ago}
set{temp,mygain / close 41 days ago}
set{mypct,temp * 100}

symbol is etf

add column mygain
add column mypct
add column close 41 days ago {01/03/2006}

sort column 6 descending
]



Thanks, Newcyber7


WALLSTREETGENIUS
983 posts
msg #41788
Ignore WALLSTREETGENIUS
modified
3/6/2006 3:36:25 PM

Fetcher[set{mygain,close - close 41 days ago}
set{temp,mygain / close 41 days ago}
set{mypct,temp * 100}

symbol is etf

add column mygain
add column mypct
add column close 41 days ago {01/03/2006}

sort column 6 descending

date offset is 41 days
]










gruender
101 posts
msg #41789
Ignore gruender
3/6/2006 3:49:05 PM

Thank you Genius for the speedy reply. However, I believe that the way the filter is currently constructed, tomorrow, I must change all 3 locations that specify "41" to read "42" in order for the filter to calculate going back to 01/03/2006. Is that correct? Instead of having to change(update) the filter every time that I use it, I would rather like to use the specific date (01/03/2006) in the filter so that whenever I use this filter, I would not have to change anything, but just run the filter to see what is the dollar change and what is the percentage change from 01/03/2006. I'm not lazy, but I don't want to waste my time calculating how many days ago is 01/03/2006 before I can run the filter. Any suggestions?

Thanks again, Newcyber7


WALLSTREETGENIUS
983 posts
msg #41790
Ignore WALLSTREETGENIUS
3/6/2006 3:59:00 PM

newcyber7 -

As it stands, thats the only way to do it. But welcome to the site.


RIGGS.


nikoschopen
2,824 posts
msg #41791
Ignore nikoschopen
3/6/2006 4:29:45 PM

Not so, un-Genius,
You may use dates as the date-offset param. Compare the two filters below and see for ureself

Fetcher[
set{mygain,close - close 41 days ago}
set{temp,mygain / close 41 days ago}
set{mypct,temp * 100}

symbol is etf

add column mygain
add column mypct
add column close 41 days ago {01/03/2006}

sort column 6 descending

date offset 03/03/2006
]



Fetcher[
set{mygain,close - close 41 days ago}
set{temp,mygain / close 41 days ago}
set{mypct,temp * 100}

symbol is etf

add column mygain
add column mypct
add column close 41 days ago {01/03/2006}

sort column 6 descending

date offset 1
]

Be sure to run the filter before SF goes on a spin cycle.


gruender
101 posts
msg #41792
Ignore gruender
3/6/2006 5:41:09 PM

Thank you gentlemen, it is indeed an honor for me to get advice from both of you super users, the best of the best on StockFetcher!

There are three other places in this filter that refer to "41 days ago." Do you think that this filter will continue to work correctly if I insert "close date offset 01/03/2006" in place of "41 days ago"? I will have to give this a try alittle later today to see if it works correctly. If it does, that is what I need.

Thanks again, Newcyber7


nikoschopen
2,824 posts
msg #41795
Ignore nikoschopen
3/6/2006 8:13:48 PM

The whole point behind the "date offset" feature is, in my opinion, to forgo the very trouble of needlessly adding things like "41 days ago". With date offset, SF reports the cumulative gain/loss for the length of days you specified anyway, hence "days ago" qualifier isn't necessary (unless you absolutely must sort their gains/losses in descending order):

Fetcher[
date offset 01/03/2006
symbol is etf
]





gruender
101 posts
msg #41797
Ignore gruender
3/6/2006 8:58:38 PM

Thank you Niko for your previous suggestion. Your recommendation will get me the close price for each EFT on 01/03/2006 which is part of the information that I was seeking. Now how do I compute the difference between each close price on 01/03/2006 and the close price today? I need these dollar "differences" so that I can then calculate the percentage change between 01/03/06 and today for each ETF. I want to know who are the momentum leaders!

Perhaps you are wondering why do I need this? An effective (and profitable) ETF momentum trading strategy is to ride the leaders and then switch geese (EFTs) when others take the lead. Reminds me of the geese flying overhead, when the leader at the point of the "V" gets tired, another will take the lead until it gets tired and then a new leader will step up and lead the flock. This works great unless you are "standing" under this formation and the geese start dropping stuff on your head! lol

I currently do these calculations with excel, but it would sure be nice to let this powerful StockFetcher software do all of the work while I count the profits.

Suggestions regarding this filter?

Thanks, Newcyber7


nikoschopen
2,824 posts
msg #41806
Ignore nikoschopen
modified
3/7/2006 5:29:14 AM

This problem wouldn't even be an issue if SF merely allowed the sorting of the "Performance" column as with any other columns. But, no, such option should remain out of reach for the naive users. At any rate, largely to ure dismay, you will have to resort to using the offset variables in order to achieve the desired goal as you initially have done (e.g. date offset "x").

On a side note, I would much rather use a fixed period (e.g. 1-month, 3-month, 6-month, etc.) rather than 01/03/2006 (ya I know, it's the beginning of the year). That way, you can bypass the need of manually updating the offset values.

Fetcher[
/* 1 month = approx. 22 days*/
date offset 22
set{mygain,close - close 22 days ago}
set{temp,mygain / close 22 days ago}
set{mypct,temp * 100}

symbol is etf

add column mygain
add column mypct
sort column 6 descending
]

On the other hand, what I like to do is to compare the gains made within different periods, say, 1-month, 2-month & 3-month, and graph the exponential moving average of the three on the chart. For example, the following filter measures the position of the close in respect to the high & low of the range for each of the previous 3 months. As such, it will enable you to see which ETFs have moved up in the ranking table, as it were.

Fetcher[
/*close position within a 1-month price "range"*/
set{hi1mo,high 1 month high}
set{lo1mo,low 1 month low}
set{cllo1mo,close - lo1mo}
set{hilo1mo,hi1mo - lo1mo}
set{diff1,cllo1mo / hilo1mo}
set{%gain1mo,diff1 * 100}

/*close position within a 2-month price "range"*/
set{hi2mo,high 1 month high 1 month ago}
set{lo2mo,low 1 month low 1 month ago}
set{cllo2mo,close 1 month ago - lo2mo}
set{hilo2mo,hi2mo - lo2mo}
set{diff2,cllo2mo / hilo2mo}
set{%gain2mo,diff2 * 100}

/*close position within a 3-month price "range"*/
set{hi3mo,high 1 month high 2 month ago}
set{lo3mo,low 1 month low 2 month ago}
set{cllo3mo,close 2 months ago - lo3mo}
set{hilo3mo,hi3mo - lo3mo}
set{diff3,cllo3mo / hilo3mo}
set{%gain3mo,diff3 * 100}

/*EMA calc.*/
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}

symbol is etf

add column return{Avg Return}
add column %gain1mo{%This Month%}
add column %gain2mo{%Last Month%}
add column %gain3mo{%2-Months Ago%}
sort column 5 descending
draw return
]

FYI: as it's readily apparent from the chart, buy entry is initiated when the "return" crosses above 70.




gruender
101 posts
msg #41857
Ignore gruender
3/9/2006 1:19:34 AM

Thank you Niko, your filters should be good ways for me to compute percentage change for different periods. You make it look so easy!

Thanks again, Newcyber7


StockFetcher Forums · Filter Exchange · Dollar and Percentage Changes Over A Specific Period<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.