When executing a CBT, I understand that the available bars are based on the Equity array. On a test run on daily periodicity without using Pad & Align, Bar 0 of the CBT corresponds to the first date in the back test date range, and Bar [BarCount-1] corresponds to the last date in the range.
Based on previous experience, I thought the individual bars available in the CBT would be a superset of the data bars available for each of the watchlist symbols. Therefore, if at least one symbol had data for date X, then the CBT would include a bar for date X as well. If no symbols include data for date Y, then the CBT would not include a bar for date Y either.
However, I now have a case where I am working with individual futures contracts, and Pad & Align is turned off. None of the symbols in my watchlist contain data for 29-May-2017 (US Memorial Day holiday), and yet my CBT does include a bar for this date. However, other market holiday dates such as 2-Jan-2017 are not present in the CBT.
My question is, how does AB determine which bars (dates) to include in the CBT / Equity Array?
Generally, if at least one of symbols under test (not Filtered by Apply To Filter or Exclude statement) has data for date X it will be also included in Equity array. Equity array will start with first bar under test ("From" date) and end with last bar under test ("To date").
Perhaps I'm missing something, because you seem to be describing exactly the way I thought things worked. However, my Apply To Filter is a single "Include" watchlist named Copper Contracts, which consists of individual futures contracts. There is nothing on the "Exclude" tab of the Apply To Filter window, nor do I use an "Exclude" statement in my AFL. None of the symbols in the Copper Contracts watchlist has data for 29-May-2017, but my Equity Array does have a bar for that date. I'm just trying to figure out why, because I would prefer that the Equity array not have a bar for that date.
@Tomasz when I run your exploration against my Copper Contracts watchlist, there is no output at all. Similarly, if I run my exploration like this:
Filter = True;
AddColumn(C,"Close");
I see data from multiple symbols for 26-May-2017 and 30-May-2017, but nothing for 29-May-2017.
@codejunkie this is an EOD database in MetaStock format, so I don't believe the Time Shift would be relevant. However, I did verify that the Time Shift is set to 0 in the Intraday Settings for the database. Thanks for that suggestion.
I discovered my error: I was running with the Artificial Future Bar (AFB) turned on. Since the last day of valid data for one of the copper contracts was 26-May-2017, the AFB that AmiBroker added for that contract was the next non-weekend day of 29-May-2017. Since AFB applies only to Backtests and not to Explorations, this explains why I couldn't find any data for 29-May using an Exploration.