StockFetcher Forums · Filter Exchange · Year to Date Return<< 1 2 3 >>Post Follow-up
jay.hayes1
1 posts
msg #110079
Ignore jay.hayes1
1/11/2013 9:28:44 AM

How do I calculate a year to date return using ROC (x) without having to adjust the day count (x) each day? Or is there a better way to get it? Is there a function that will return the number of days since the beginning of the year? Thanks.

guru_trader
485 posts
msg #110308
Ignore guru_trader
1/18/2013 2:41:03 AM

Could you describe a little more what you are trying to do? Give some example scenarios, etc.?

Kevin_in_GA
4,553 posts
msg #110312
Ignore Kevin_in_GA
1/18/2013 7:08:30 AM

Not really. But you could simply add "offset 12/13/2012" at the end of your filter. That will give you a new column that shows you the percent change since that date (but any indicator values are for 12/31 and NOT for today ... sadly). This is why I have been asking for a DATE() function from SF for a while now.

guru_trader
485 posts
msg #110339
Ignore guru_trader
1/18/2013 3:47:53 PM

SF staff (in response to a recent post of mine): the "date()" function is an example of (it seems) a reasonable feature request ... in addition to a formal "if..then..else" statement and "set" statements that accept more than 2 values.

stockfetcher
963 posts
msg #110340
1/18/2013 4:24:26 PM

Thanks for the great feedback!

If possible can you provide more details concerning the "date()" function you are looking for? For example, is this a "backtesting" related feature? Or are you wanting to reference a specific value from a particular date in the past? If you can provide a couple pseudo-examples of how this would work within the StockFetcher syntax that would help us fully assess this feature request.

Concerning the "if-then-else", due to the complexity this can create within filter syntax, as well as the support issues we encounter when debugging such functionality, we do not have plans on introducing this construct in the primary StockFetcher syntax.

As far as multiple mathematical operations within a "set{}" statement, this is something we will certainly look into.

StockFetcher Support


Kevin_in_GA
4,553 posts
msg #110341
Ignore Kevin_in_GA
1/18/2013 4:40:26 PM

Sure - it would be very helpful to be able to reference a prior date in calculations (e.g., close or RSI(2) on 1/2/2012). Perhaps something that would look like this:

set{change, close - date(1/2/2012,close)}

With this type of syntax one would be able to get TODAY's indicator data as well as use an offset within a user-defined function to get prior data. The current "offset" function returns only that day's data and the change in price since then.

I personally would also like to see one or two other functions added -

1) a hadalert function wherein you could require that two or more conditions were met on the same day. This would allow for much simpler coding for AND statements than what we are forced to do now

2) a valuewhen() function that would reference a value such as price when a set of conditions was met. This would allow for triggers based on a specific type of indicator change that was tied to an event rather than a date.



stockfetcher
963 posts
msg #110342
1/18/2013 5:02:36 PM

Thank you for the details and additional feature ideas. We will look into the advanced features that you mention. Additionally, we will post an update if we have any questions or have any update on progress with the features.

StockFetcher Support


Kevin_in_GA
4,553 posts
msg #111820
Ignore Kevin_in_GA
2/27/2013 11:15:55 AM

OK. It's been about six weeks since you said you would look into this - any update? I do not want to simply let these requests go without any discussion or resolution, even if the answer is that it will not be implemented.

These functions already exist in other software that I use, so it should be doable. If not just let us know.

stockfetcher
963 posts
msg #111822
2/27/2013 11:25:02 AM

Unfortunately, we do not have any additional updates on this feature request at this time.

StockFetcher Support



Kevin_in_GA
4,553 posts
msg #111877
Ignore Kevin_in_GA
2/28/2013 1:09:16 PM

Not sure which feature request you are referring to - the DATE function, the hadalert suggestion, or the valuewhen suggestion? Or all of them?

StockFetcher Forums · Filter Exchange · Year to Date Return<< 1 2 3 >>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 2016 - 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