# Intelligent Dynamic Backlash Agent: A Trading Strategy Based on the Directional Change Framework
## 6 Datasets and Methodology
### Preparing the Rolling Windows  
[PERSON] [19] suggested the adoption of a rolling window approach as being more reliable to test a trading strategy. This approach is usually used for evaluating trading systems and establishes a more rigorous and convincing methodology. This method involves splitting the data into overlapping training-applied sets and, on each cycle, moving each set forward through the time series. This methodology tends to result in more robust models due to more frequent retraining and large out-of-sample datasets (increasing training processing requirements but also resulting in models which adapt more quickly to changing market conditions). In our experiments, we trained and tested IDBA using a monthly-basis rolling window, as we explain next. Our experiments examined six currency pairs, namely AUD/CAD, AUD/USD, GBP/CAD, GBP/NZD, NZD/USD, and EUR/NZD, and considered the minute-by-minute prices of these currency pairs for 24 months: from 1 January 2016 to 31 December 2017. Motivated by the recommendation of [PERSON] [19], we used a rolling window approach (see Figure 9) to evaluate the performance of our proposed trading strategy. Given that the preparation process of the rolling windows for each currency pair is the same, we used the preparation of the rolling windows, explained below, for the currency pairing AUD/CAD as an example to detail our method. Figure 8: Normalized daily exchanges rate of prices of the six selected currency pairs between 1 January 2017 and 31 December 2017. This figure aims to illustrate the divergence of trends within selected currency pairs. To avoid excessive points, we use a daily exchange rate instead of a minute-based exchange rates. As the dataset AUD/CAD covers 24 months, we composed twelve rolling windows--each of which comprises a training window (12 months in length) and an applied window (one month in length). This means that the overall trading period, throughout the twelve rolling windows, is twelve months. The lengths of the training and applied windows are set arbitrarily. The start and end dates of the training and ending period of each rolling window are reported in Table 5. Note that we measured the length of the training and applied windows as a function of months, not as a fixed number of days. For example, based on Table 5, the training period of the second rolling window lasted from 1 February 2016 to 31 January 2017 (i.e., 12 months). The associated applied window lasted from 1 January 2017 00:01:00 to 28 January 2017 23:59:00 (i.e., the month of February 2017). Let _AUDCAD_RW_ represent the set of the twelve rolling windows corresponding to the dataset AUD/CAD. Using the information shown in Table 5, we employed the training window to train IDBA and the trading window to trade with IDBA (as described in Section 5). Similarly, we constructed five sets of rolling windows (one for each of the remaining currency pairs). For example, let _EURNZD_RW_ be the set of the twelve rolling windows corresponding to EUR/NZD and let _AUDIUSD_RW_ be the set of the twelve rolling windows corresponding to AUD/USD and so on. Finally, we obtained the following six sets of rolling windows: _AUDCAD_RW_, _AUDIUSD_RW_, _GBPCAD_RW_, _GBPNZD_RW_, _NZDUSD_RW_, and _EURNZD_RW_. Finally, it is important to note that the decomposition of dataset into training and applied period (as in Figure 9) is controlled by the risk management module (Section 5.3). In other words, the beginning and end of each rolling window can be adjusted according to the rule of maximum drawdown threshold, as described in Section 5.3. In all of our experiment, we used the instantaneous bid-ask prices for all considered currency pairs. The mean and standard deviation of the bid-ask spread of each of the six currency pairs during the aforementioned trading period, sampled minute-by-minute, are shown in Table 6. In Table 6, the column \"Quantile 25\" indicates that 25% of the spreads are below the reported number. The same interpretation holds for the column \"Quantile 75\".