top of page

Synchronizing your Trading Systems with Early Holiday Closes

This is an original post from 2016 that we continue to update.

As traders, holiday’s can be bitter sweet since there are early closings and synchronizing your trading systems can be challenging. We never know for sure the exact future holiday schedule for the exchanges. The CME does offer a holiday calendar for the current year and includes the most recent holidays that are listed and planned.

We do not know how those “holiday dates” may change as each holiday approaches or what future holiday dates may come up. An example of new dates added to the DontTradeIfHoliday function are:

  1. In 2012 was when the exchange was closed for Hurricane Sandy

  2. In 2018 was when the exchange closed for George H W. Bush’s funeral.

For this reason, we adapt as we find out by checking the calendar a few days before each holiday. There are holidays when the the futures trade but the stock market is closed and there are other holidays where the stock market and futures markets close early.

In general, we do not trade on holidays (days the stock market is close) or half days (days the stock market closes early) for our day trade strategies. Swing trade strategies won’t take new entries on the dates listed in the DontTradeIfHoliday function but we do  hold swing trade positions and exit based on the exit signal, even if it is on a holiday.

The futures markets can be open on days the stock market is closed. For example, on Thanksgiving, the futures traded until 1:00 pm EST and on Friday, the day after Thanksgiving, the market traded until 1:15 pm EST. Typically the stock index futures close 15 minutes after the stock market closes. This is the reason that the stock index futures closed at 1:15 pm EST on Friday, November 26, 2016 (since the stock market closed at 1:00 pm EST).

It is not always as easy as just turning automation to Off. If you develop a trading system that typically exits a trade at 4:00 pm EST, for example, or anytime after 1:15 pm EST, you may run into synchronization issues if you have a trade signal during the day during a holiday shortened session that still shows a trade signal after the close. You would come into Monday’s trade with a strategy that has an open position. This was not the intent of your day trade system (or swing strategies that would have an exit time at the end of a trading day or on a Friday for example).

There are three methods that that we can use to manage this:

1.) The easiest way is to use the Close At End of Day strategy in Tradestation. The signal with an open position will exit at the close of the last bar of the day so that your trading signals do not have any open positions when the next trading session starts. This method is great for back testing as it will show exits on any trading sessions that end before your exit time. The downside of this method is that it can interfere with future trades if you keep this strategy Status to On.

For example, if you have a trade that exits at 4:05 pm EST and you have the Close At End of Day status set to On, the strategy can send an exit signal between 4:00 pm and 4:05 pm, especially if you have a secondary data series such as NYSE TICK, NYSE ADV, NYSE DECL and the end of those sessions occur earlier than your exit time. It won’t back test that way, but it will do that during automation (exit at 4:02 or 4:03 pm EST based on our experience). If your Exit Time is before or at 4:00 pm EST, then this is it is not usually issue. For this reason, we prefer not to use this method except during backtesting. It can still be used successfully for strategies that exit at 4:00 pm EST or earlier or if you wait for your first trading signal of the day after the holidays, and then turn the status to Off for Close At End of Day.

2.) The second option is to use the DontTradeOnHolidays function. You simply add the line of code to your entry:

and DontTradeOnHolidays=1

and the list of dates in the DontTradeOnHolidays will be a list of dates that the strategy does not trade on.

3.) You could create a custom strategy that would exit at the right time for each new holiday. You could then add this strategy to your existing strategy as a second strategy within Tradestation. Using the example of the 1:15 pm EST close for November 26, 2016, the day after Thanksgiving, the code would look like this:

If Date=ELDate(11,26,2016) and Time=1314 Then Sell next Bar at market; If date=ELDate(11,26,2016) and Time=1314 Then Buy to Cover Next Bar at market;

This would allow you to trade and exit at the correct time, one minute before the close (the open of the last bar). The first line of code would exit long trades while the second line of code would exit short trades.

This would only work on one minute bars. If you were using 5 minute bars, for example, the Time would be 1310. If you were using 15 minute bars, the time would be 1300.

This article has focused on Tradestation methods. Similar methods could be used for other platforms and languages as well.

27 views0 comments


bottom of page