Lean
$LEAN_TAG$
IOptimizationStrategy.cs
1
/*
2
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
using
System;
17
using
System.Collections.Generic;
18
using
QuantConnect
.
Optimizer
.
Objectives
;
19
using
QuantConnect
.
Optimizer
.
Parameters
;
20
21
namespace
QuantConnect.Optimizer.Strategies
22
{
23
/// <summary>
24
/// Defines the optimization settings, direction, solution and exit, i.e. optimization strategy
25
/// </summary>
26
public
interface
IOptimizationStrategy
27
{
28
/// <summary>
29
/// Fires when new parameter set is retrieved
30
/// </summary>
31
event
EventHandler<ParameterSet>
NewParameterSet
;
32
33
/// <summary>
34
/// Best found solution, its value and parameter set
35
/// </summary>
36
OptimizationResult
Solution
{
get
; }
37
38
/// <summary>
39
/// Initializes the strategy using generator, extremum settings and optimization parameters
40
/// </summary>
41
/// <param name="target">The optimization target</param>
42
/// <param name="constraints">The optimization constraints to apply on backtest results</param>
43
/// <param name="parameters">optimization parameters</param>
44
/// <param name="settings">optimization strategy advanced settings</param>
45
void
Initialize
(
Target
target, IReadOnlyList<Constraint> constraints, HashSet<OptimizationParameter> parameters,
OptimizationStrategySettings
settings);
46
47
/// <summary>
48
/// Callback when lean compute job completed.
49
/// </summary>
50
/// <param name="result">Lean compute job result and corresponding parameter set</param>
51
void
PushNewResults
(
OptimizationResult
result);
52
53
/// <summary>
54
/// Estimates amount of parameter sets that can be run
55
/// </summary>
56
int
GetTotalBacktestEstimate
();
57
}
58
}
Optimizer
Strategies
IOptimizationStrategy.cs
Generated by
1.8.17