Skip to content
All library documents

Selecting Trading Parameters Across Market Regimes and Time Buckets

Article Quant Q&A · Author: Amir Sani

Summary

The document considers whether bootstrap resampling can create useful alternate histories for tuning trading-system parameters such as moving-average windows and entry or exit thresholds. Its answer emphasizes controlling overfitting through structured evaluation rather than endorsing a particular bootstrap method.

It recommends separating data into training and final test portions, identifying clusters that represent different market dynamics, and optimizing across a group of assets instead of fitting each one separately. It also proposes dividing history into time buckets, optimizing within each bucket, and testing whether selected parameters and strategy outcomes remain stable across buckets. Statistical tests and data not used in optimization should inform the final assessment. The response does not compare block-bootstrap variants or specify a resampling design for dependent, nonstationary series, so it leaves the original methodological question partly unanswered.

Key ideas

  • Parameter tuning should account for distinct market regimes.
  • Optimize across a set of assets to reduce asset-specific overfitting.
  • Keep a final test sample separate from the data used for parameter selection.
  • Compare parameter choices and strategy outcomes across time buckets for stability.
  • The response offers no specific bootstrap method for dependent nonstationary data.

Tags

Full text
# Blackbox Optimization + Bootstrapping = Parameter Selection?


# Blackbox Optimization + Bootstrapping = Parameter Selection?












Most automated trading systems have a number of embedded parameters such as the lookback periods, entry and exit thresholds, etc. This is like the moving average crossover system or any of the systems that rely on some kind of data window for calculations. For example, if I use a fast and slow exponential filter for an MA crossover system, then I need to figure out the best time values for each of these filters.

Finding these parameters can be difficult because there's only one history from the traded security. A single currency might have 200 million ticks or 2 million 1 minute data points. This is only one scenario of what could have happened and represents multiple trends and turning points in an evolving series. If I want to really pick parameters that would be best, it seems like I would want to use multiple samples to reduce overfitting. It's possible to use hold out data, but it seems like it would be better to use bootstrapping to get additional histories to optimize on.

Is there a problem using block, moving block or other bootstrap methods to find the optimal trading parameters or blackbox parameters? Seems like a good idea. What are the most effective bootstrap methods for nonstationary, evolving dependent time series?

Thanks in advance

## Answer by Matt Wolf (score 2, accepted)

https://quant.stackexchange.com/a/8123

Amirsani,

Here couple points how I would proceed:

- I would first look to divide your time series into different clusters, enough so that different market dynamics fall into different clusters.

- I guess you will not be trading a single asset and thus you will not just optimize over a single stock or options contract. I would strongly try to discourage from optimizing parameters over each individual asset but instead over a set of assets. Do not derive an optimized parameter set for Google and another for MS, for example because most likely will you overfit.

- I would start with first splitting the data into training data and then data you test your optimizations on in the end.

- Then I would proceed with bucketing time series by dates (months, years or whatever you chose) and then optimize each bucket separately and then run statistical tests on the stability of your optimized parameters across buckets.

- Also compare your strategy results between buckets with one parameter set and derive how stable the outcomes are. In the end you should run statistical tests over the data not used for optimizations.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.