You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
or a function that accepts this series object and returns a number;
113
106
the higher the better. By default, the method maximizes
114
107
Van Tharp's <ahref="https://google.com/search?q=System+Quality+Number">System Quality Number</a>.</p>
108
+
<p><code>method</code> is the optimization method. Currently two methods are supported:</p>
109
+
<ul>
110
+
<li><code>"grid"</code> which does an exhaustive (or randomized) search over the
111
+
cartesian product of parameter combinations, and</li>
112
+
<li><code>"skopt"</code> which finds close-to-optimal strategy parameters using
113
+
<ahref="https://scikit-optimize.github.io/stable/auto_examples/bayesian-optimization.html">model-based optimization</a>, making at most <code>max_tries</code> evaluations.</li>
114
+
</ul>
115
+
<p><code>max_tries</code> is the maximal number of strategy runs to perform.
116
+
If <code>method="grid"</code>, this results in randomized grid search.
117
+
If <code>max_tries</code> is a floating value between (0, 1], this sets the
118
+
number of runs to approximately that fraction of full grid space.
119
+
Alternatively, if integer, it denotes the absolute maximum number
120
+
of evaluations. If unspecified (default), grid search is exhaustive,
121
+
whereas for <code>method="skopt"</code>, <code>max_tries</code> is set to 200.</p>
115
122
<p><code>constraint</code> is a function that accepts a dict-like object of
116
123
parameters (with values) and returns <code>True</code> when the combination
117
124
is admissible to test with. By default, any parameters combination
@@ -121,6 +128,13 @@ <h3>Methods</h3>
121
128
of all admissible parameter combinations, which can be further
122
129
inspected or projected onto 2D to plot a heatmap
123
130
(see <code><atitle="backtesting.lib.plot_heatmaps" href="lib.html#backtesting.lib.plot_heatmaps">plot_heatmaps()</a></code>).</p>
131
+
<p>If <code>return_optimization</code> is True and <code>method = 'skopt'</code>,
132
+
in addition to result series (and maybe heatmap), return raw
133
+
<ahref="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.OptimizeResult.html"><code>scipy.optimize.OptimizeResult</code></a> for further
134
+
inspection, e.g. with <ahref="https://scikit-optimize.github.io">scikit-optimize</a>
0 commit comments