SearchResult¶
Defined in fynance.models.tuning
- class SearchResult(table, params, best_params, best_model, n_trials)[source]
Bases:
objectResult of
walk_forward_search.- Attributes:
- tablenumpy.ndarray
Out-of-sample scores, shape
(n_configs, n_folds)– rowi, columnjis the score ofparams[i]on foldj.- paramslist of dict
Parameter dict tried for each row of
table(same order).- best_paramsdict
The configuration with the highest mean OOS score (mean over folds).
- best_modelAny
factory(**best_params)refit on the last (most recent) train window – the model to actually deploy.- n_trialsint
Number of configurations tried (
== len(params) == table.shape[0]). Feed this intofynance.research.guards.deflated_sharpe_ratioasn_trialsso the winning configuration’s Sharpe ratio is deflated by the number of configurations the search tried, rather than reported at face value.