Price curve oversampling

Backtests become more accurate with more data and more trades. Since price data is always in short supply, oversampling is a method to get more trades out of it. It requires price data in higher resolution than a bar period, which is normally the case with M1 data and bar periods of 1 or 4 hours. Oversampling generates several slightly different price curves from the price data, any time with a different bar offset and thus slightly different bars. The backtest or training is then executed with all price curve variants, thus generating a multiple of the trades. 


Oversampling factor of the simulation (default = 0 = no oversampling). When NumSampleCycles is set to a number n > 1, the simulation is repeated n times, and every time the bars are resampled with different BarOffset values. This generates a slightly different price curve for every cycle, while maintaining the trend, spectrum, and most other characteristics of the curve. The performance result is then calculated from the average of all cycles. This way more data for test and training is generated and a more accurate result can be achieved.


The number of the current cycle from 1 to NumSampleCycles. Automatically set by NumSampleCycles.





NumSampleCycles = 4; // 4 times oversampling

See also:

bar, BarOffset, NumWFOCycles, NumOptCycles, NumTotalCycles, ALLCYCLES


► latest version online