Topic: Generate In Sample and validate OOS
I'm using three separate commands in this CMD file.
I'll show them separately.
1. Update the historical data
We update the data first - 20000 bars EURUSD M30
TITLE OOS Workflow - EURUSD M30
REM Fetch EURUSD M30
node .\bin\fetch.js ^
--fx-rates true ^
--symbol EURUSD ^
--period M30 ^
--max-data-bars 20000
2. Generate strategy on the first 75% of the data. ( In Sample )
Here we set "gen" to load 20000 bars of EURUSD M30 and to use from 0% to 75%
--data-start-percent 0
--data-end-percent 75
I'm collecting the first 300 strategies. This is different from the usual practice of running the Generator for some time and getting the collection.
--collection-capacity 300
--max-ascended-strategies 300
I set the Express Generator to update the best strategy on the screen (default behaviour) and not show the top strategies after the generator finishes.
--update-best true
--show-top 0
I set the generator to export the collection to "Coll-In-Sample-EURUSD-M30" file.
Here "--output-replace true" sets the generator to overwrite a previous file with the same name. This is important because I'' load the file for validation in the next section.
node .\bin\gen.js ^
--symbol EURUSD ^
--period M30 ^
--max-data-bars 20000 ^
--data-start-percent 0 ^
--data-end-percent 75 ^
--collection-capacity 300 ^
--max-ascended-strategies 300 ^
--update-best true ^
--show-top 0 ^
--output-replace true ^
--output Coll-In-Sample-EURUSD-M30
3. Validate strategies on 25% OOS and get top 10
Here I set the Generator to load 20000 bars of EURUSD M30 but only use the latest 25%.
--max-data-bars 20000
--data-start-percent 75
--data-end-percent 100
I collect only the top 10 by setting the collection capacity to 10 strategies
--collection-capacity 10
I want strategies with min 10 trades (100 by default)
--min-count-of-trades 10
I don't want to see the best one updated but want to see all the top 10 printed
--update-best false
--show-top 10
I set the generator to work in validation mode by providing "--input" parameter
--input Coll-In-Sample-EURUSD-M3
The program loads the previously generated IN sample collection
node .\bin\gen.js ^
--symbol EURUSD ^
--period M30 ^
--max-data-bars 20000 ^
--data-start-percent 75 ^
--data-end-percent 100 ^
--collection-capacity 10 ^
--min-count-of-trades 10 ^
--update-best false ^
--show-top 10 ^
--input Coll-In-Sample-EURUSD-M30 ^
--output Coll-OOS-EURUSD-M30
This is an example of how we can use several actions to compose a workflow. I'm using the default Acceptance Criteria, but you may modify the code.