...
“Way of the Turtle”, Curtis Faith
“Building Winning Algorithmic Trading Systems”, Kevin J. Davey
ESA Workflow
For each iteration
Process all signals on the chart
For each signal, based on the settings, simulate a trade execution and calculate the results for that trade (i.e., the PnL, MFE/MAE for that trade)
Once all signals on the chart are processed, tally the results and post aggregated results to the summary table
Defining Iterations
Trade Simulation
For each signal on the chart a trade is simulated and the results summarized.
...
If the trade hits the target before the 10th bar, then the trade ends at that point and the results calculated accordingly.
Holding Time and Iterations
The ESA does X iterations where the number of iterations is determined by the “Holding Time” settings.
The holding time is the max number of bars to stay in the trade before exiting. For example, if the holding time is 10 bars, each every trade will exit after 10 bars (unless it hits the stop or target before 10 bars in which case it will exit earlier).
Users set the range of holding time values to test for. There are 3 settings that control this
Holding Time Start (in Bars)
Holding Time Step (in Bars)
Holding Time End (in Bars)
Example1
Start is 2 bars
Step is 2 bars
End is 10 bars
This translates to running 5 iterations with 5 holding periods, namely 2,4,6,8,10
In other words, ESA will run 5 backtests, one for each holding period.
In this example, the summary table will show 5 rows, 1 row per iteration
...
Example2
Looking at another example
Start: 10
Step: 10
End: 100
This will create 10 iterations, 10, 20, 30….100
ESA Workflow
For each iteration
Process all signals on the chart
For each signal, based on the settings, simulate a trade execution and calculate the results for that trade (i.e., the PnL, MFE/MAE for that trade)
Once all signals on the chart are processed, tally the results and post aggregated results to the summary table
Signal References
The study requires a long signal reference and a short signal reference.
...
You can reference studies and subgraphs that you create yourself or you receive from someone else.
...
Viewing
...
Trades For a Specific Iteration
...
Exporting Trades for a Specific Iteration
The summary table displays the results for each simulation. To export the trades of that simulation, right click the row and “Export Trades”. This will save the list of trades in csv format.
...