StockFetcher Forums · General Discussion · Code for display stocks if SP500 opens up or down?<< >>Post Follow-up
starfox182
24 posts
msg #102862
Ignore starfox182
10/8/2011 6:20:30 AM

Is this even possible? I would like to use backtesting to see how an index open affects stock movements for short and long positions. I have no idea! Hope someone knows!

starfox182
24 posts
msg #102863
Ignore starfox182
modified
10/8/2011 6:23:52 AM

What I mean is lets say your filter gives you a list of 10 symbols. Now, you only want those symbols to appear if the SP 500 opens higher. If it opens lower, you want no symbols to appear.

Likewise, your filter gives you a list of 10 symbols. Now, you only want those symbols to appear if the SP 500 opens lower. If it opens higher, you want no symbols to appear.

Thus, you can see the performance for long and short entries via backtesting.

Kevin_in_GA
4,599 posts
msg #102865
Ignore Kevin_in_GA
10/8/2011 7:13:59 AM

Add the following lines to your filter

Ind(^spx, open) above ind(^spx, close) 1 day ago

but here's the problem ... SF only updates the indices at the end of each day, so at the open of any trading day, you will still be using yesterday's data.

For backtesting this should be OK, but for any actual trading, be aware.

starfox182
24 posts
msg #102868
Ignore starfox182
modified
10/8/2011 7:43:33 AM

Thanks so much! So much simpler than that thread with all the crazy IF OR AND code!

Question: Do ETF's such as SPY get updated at the same time?

Kevin_in_GA
4,599 posts
msg #102870
Ignore Kevin_in_GA
10/8/2011 11:05:26 AM

The SPY data is updated intraday, but there is a 20-30 minute delay in the data.

glgene
613 posts
msg #102874
Ignore glgene
10/9/2011 9:27:42 AM

Besides ^spx (for the SP 500), what other indices does SF track? Is there a reference source for such indices in SF?
Is there one for the Wilshire 5000?

Gene

glgene
613 posts
msg #102875
Ignore glgene
10/9/2011 10:15:48 AM

I found the list of SF-provided indices. But I didn't find the Wilshire? Does it exist, or did I overlook it?

Gene

glgene
613 posts
msg #102876
Ignore glgene
10/9/2011 11:35:49 AM

Found it!

^DJWS
DJ WILSHIRE 5000 TOT



StockFetcher Forums · General Discussion · Code for display stocks if SP500 opens up or down?<< >>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.