Table of Contents

Data Horizon

Data Horizon controls which part of the loaded market data is used for Generator calculations.

Use this section to:

This is one of the key sections for building an in-sample and out-of-sample workflow.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data Horizon             ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
max_data_bars  = 100000

; Use these parameters to set the data range between "data_start" and "data_end".
; Set from where the actual trading starts with "trade_start".
; Text: "2023-05-25 00:00 UTC", "2023-05-25 00:00", "2023-05-25" or "25 May 2023 00:00 UTC"
; Negative number: number of days before the current date: -365, -30, -7
 
use_data_start  = false
data_start      = "01 Jan 2020 00:00 UTC"
 
use_data_end    = false
data_end        = "30 Jun 2023 00:00 UTC"
 
use_trade_start = false
trade_start     = "01 Jun 2023 00:00 UTC"

What each option does

How ''data_end'' limits data

When use_data_end = true, Generator stops the dataset at data_end. Bars after that timestamp are excluded from calculations in that run.

Practical effect:

OOS workflow with recalculation on full data

You can use data_end to create a clear split between historical training data and newer unseen data.

Typical 2-step process:

In Step 2, the bars that were excluded by Step 1 become your practical out-of-sample segment. This lets you check how strategies behave on data that was not included during the capped run.

Example profile

Build collection only up to 30 Jun 2023:

use_data_end = true
data_end     = "30 Jun 2023 00:00 UTC"

Then validate the same collection on full history:

use_data_end = false

Notes