Lean  $LEAN_TAG$
Optimization.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 Newtonsoft.Json;
20 
21 namespace QuantConnect.Api
22 {
23  /// <summary>
24  /// Optimization response packet from the QuantConnect.com API.
25  /// </summary>
27  {
28  /// <summary>
29  /// Snapshot ID of this optimization
30  /// </summary>
31  public int? SnapshotId { get; set; }
32 
33  /// <summary>
34  /// Statistic to be optimized
35  /// </summary>
36  public string OptimizationTarget { get; set; }
37 
38  /// <summary>
39  /// List with grid charts representing the grid layout
40  /// </summary>
41  public List<GridChart> GridLayout { get; set; }
42 
43  /// <summary>
44  /// Runtime banner/updating statistics for the optimization
45  /// </summary>
46  [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
47  public IDictionary<string, string> RuntimeStatistics { get; set; }
48 
49  /// <summary>
50  /// Optimization constraints
51  /// </summary>
52  [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
53  public IReadOnlyList<Constraint> Constraints { get; set; }
54 
55  /// <summary>
56  /// Number of parallel nodes for optimization
57  /// </summary>
58  public int ParallelNodes { get; set; }
59 
60  /// <summary>
61  /// Optimization constraints
62  /// </summary>
63  [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
64  public IDictionary<string, OptimizationBacktest> Backtests { get; set; }
65 
66  /// <summary>
67  /// Optimization strategy
68  /// </summary>
69  public string Strategy { get; set; }
70 
71  /// <summary>
72  /// Optimization requested date and time
73  /// </summary>
74  public DateTime Requested { get; set; }
75  }
76 
77  /// <summary>
78  /// Wrapper class for Optimizations/Read endpoint JSON response
79  /// </summary>
81  {
82  /// <summary>
83  /// Optimization object
84  /// </summary>
85  public Optimization Optimization { get; set; }
86  }
87 
88  /// <summary>
89  /// Collection container for a list of summarized optimizations for a project
90  /// </summary>
92  {
93  /// <summary>
94  /// Collection of summarized optimization objects
95  /// </summary>
96  public List<OptimizationSummary> Optimizations { get; set; }
97  }
98 }