API documentation for tradeexecutor.backtest.grid_search.prepare_grid_combinations Python function.

prepare_grid_combinations(parameters, result_path, clear_cached_results=False, marker_file='')[source]#

Get iterable search matrix of all parameter combinations.

  • Make sure we preverse the original order of the grid search parameters.

  • Set up the folder to store the results

  • parameters (Dict[str, List[Any]]) – A grid of parameters we will search.

  • result_path (Path) – A folder where resulting state files will be stored.

  • clear_cached_results

    Clear any existing result files from the saved result cache.

    You need to do this if you change the strategy logic outside the given combination parameters, as the framework will otherwise serve you the old cached results.

  • marker_file – Safety to prevent novice users to nuke their hard disk with this command.


List of all combinations we need to search through

Return type: