Trading Blox can optimizes how historical stepped testing is performed. It is able to reduce the time of stepped testing because it enables to use of threads that are capable of getting more performance from most computers.
Historically stepped testing was performed in a serial fashion. This means that each step of a multiple step test had to be completed before the next step could be tested. Trading Blox allows more steps of a multiple step test to be performed in parallel. It can do this using its Thread Count Global Parameter.
Previous testing with older computers didn't allow more than one task to be performed at the same time. Today's computers with multiple processing cores allows two test to be performed for each of the cores available in the computer.
By default Trading Blox is enabled to create two steps in a multiple stepped test to be processed at the same time. If your computer has more than a single core, you will be able to enable more threads as an option. Each thread can test 1-step at a time, and multiple threads can multiple test in that same test period. With 2-threads always available in Trading Blox version 4 the time it takes to perform an optimization is about half the amount of time it took in version 3.x.
Reducing Optimization Time provides a lot more information about how threads can be used to reduce stepped testing.
Simulation Parameter - Thread Count:
Each thread in a multiple thread stepped test contains an entire copy of the Suite’s systems, blox, and data files. This also means that a copy of all the variables and scripts in a suite is contained in each thread.
Simulation scoped variables are often used to control a step in a test, and or create output. With each thread having a complete copy of the suite in each thread care should be used to determine when a simulation scoped variable can be updated, trigger output, or change how a test is performed.
All variables in a multiple thread test have an entire copy of all the Suite’s system, blox, files and variables in each of the threads. This means that simulation Scoped variables in a stepped test with multiple threads require careful consideration of when those variables are updated and when they are allowed to create output or influence a system test.
It is also important to know that none of the Simulation scope variables in a thread can be accessed from any other thread. Changing a value of a Simulation scoped variable in one thread doesn’t change that same variables value in any other thread. This means all threads running at the same time in a test anywhere in a Suite is changed, that change will be unknown to that same variable in any of the other threads steps.
An example of this can be seen in how the script sequencing in each of the steps in a "Walk Forward 2” block creates a stitched equity curve. In this test example the blox is using Trading Blox Basic functions SetRegistryKey, GetRegistryKey, the object FileManager, and other functions to control, track, record and chart the progress of a Walk Forward multiple step optimization test.
Test Object Thread Properties: test.threadCount test.threadIndex
Example: Trading Blox Basic Test-Object Parameters are used in a simple script control filter to limit when a simulation scoped variable is updated.
PARAMETER: iThreadNum Type: Integer
When using Simulation Scoped variables consider whether their access and influence needs to be controlled to prevent unintended changes when exporting data to files, or when using Registry values, or generating reports and charts. This means variable control is needed use ideas shown in the script example here. Trading Blox Basic Test-Object Parameters are used in a simple script control filter to limit when a simulation scoped variable is updated.
Whatever method you use be sure to check the output in a small test sample to make sure what is expected is what happens. |