i want to peek
Author: ss161
Creation Date: 5/13/2009 11:52 AM
profile picture

ss161

#1
i have a system that is giving fairly good results based on daily data. it is a symbol rotation style of strategy and every day looks for the top buy or sell candidate and enters the trade on the close. The problem I have is in my initial design I've intentionally used the data through the closing price on the bar that I'm trading to generate the trading signal and then trade based on that data.

As I move towards implementing this script, what I'd like to do is test the following:
for every day but the current "bar" date, take the closing price in my signal calculation, for the current bar date, dont take the close (since that would be peeking), but instead take the "close" at 3:50pm and pretend that that is the eod close for my signal calculation, generate my trading signal for each symbol in the dataset, sort it, and output my security to buy in time to place my MarketAtClose buy order.

Any design thoughts on how to incorporate this into my system? I can think of some ugly ways that would grind the system to a halt (using 1minute bars).
profile picture

Cone

#2
If you want the close at 3:50, then you need only 10minute bars, not 1-minute.

Or, subscribe to TeleChart and update all daily data near the close (takes about 1 minute for 7000 stocks).
profile picture

Eugene

#3
Or alternatively, query Yahoo (specs) at around 3:50 PM from your Strategy for the current price?
profile picture

ss161

#4
i only want the data at 3:50 for the current bar -- both in backtests and when trading live. i guess your saying maintain the daily closing price series and a 10minute bar price series and for each bar, replace the current bar's close with the 3:50 price data from the 10 minute series, calculate the indicator, then put the proper closing data back in the current bar, and execute my trade market on close using the correct closing price.

i'll give that a try; i'm trying to see if/ how much a difference it makes in the results.

of course the other issue is that i only have about 5 years of intraday data vs 15 years of daily data.