Lean
$LEAN_TAG$
BaseOptimization.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
Newtonsoft.Json;
18
using
QuantConnect
.
Optimizer
;
19
using
QuantConnect
.
Optimizer
.
Objectives
;
20
using
System.Collections.Generic;
21
using
QuantConnect
.
Optimizer
.
Parameters
;
22
using
QuantConnect
.
Util
;
23
using
Newtonsoft.Json.Converters;
24
using
Newtonsoft.Json.Serialization;
25
26
namespace
QuantConnect.Api
27
{
28
/// <summary>
29
/// BaseOptimization item from the QuantConnect.com API.
30
/// </summary>
31
public
class
BaseOptimization
:
RestResponse
32
{
33
/// <summary>
34
/// Optimization ID
35
/// </summary>
36
public
string
OptimizationId
{
get
;
set
; }
37
38
/// <summary>
39
/// Project ID of the project the optimization belongs to
40
/// </summary>
41
public
int
ProjectId
{
get
;
set
; }
42
43
/// <summary>
44
/// Name of the optimization
45
/// </summary>
46
public
string
Name
{
get
;
set
; }
47
48
/// <summary>
49
/// Status of the optimization
50
/// </summary>
51
[JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(CamelCaseNamingStrategy))]
52
public
OptimizationStatus
Status
{
get
;
set
; }
53
54
/// <summary>
55
/// Optimization node type
56
/// </summary>
57
/// <remarks><see cref="OptimizationNodes"/></remarks>
58
public
string
NodeType
{
get
;
set
; }
59
60
/// <summary>
61
/// Number of days of out of sample days
62
/// </summary>
63
public
int
OutOfSampleDays
{
get
;
set
; }
64
65
/// <summary>
66
/// End date of out of sample data
67
/// </summary>
68
[JsonConverter(typeof(
DateTimeJsonConverter
),
DateFormat
.
UI
)]
69
public
DateTime?
OutOfSampleMaxEndDate
{
get
;
set
; }
70
71
/// <summary>
72
/// Parameters used in this optimization
73
/// </summary>
74
public
List<OptimizationParameter>
Parameters
{
get
;
set
; }
75
76
/// <summary>
77
/// Optimization statistical target
78
/// </summary>
79
public
Target
Criterion
{
get
;
set
; }
80
}
81
82
/// <summary>
83
/// Optimization summary response for creating an optimization
84
/// </summary>
85
public
class
OptimizationSummary
:
BaseOptimization
86
{
87
/// <summary>
88
/// Date when this optimization was created
89
/// </summary>
90
[JsonConverter(typeof(
DateTimeJsonConverter
),
DateFormat
.
UI
)]
91
public
DateTime
Created
{
get
;
set
; }
92
93
/// <summary>
94
/// Price-sales ratio stastic
95
/// </summary>
96
public
decimal?
PSR
{
get
;
set
; }
97
98
/// <summary>
99
/// Sharpe ratio statistic
100
/// </summary>
101
public
decimal?
SharpeRatio
{
get
;
set
; }
102
103
/// <summary>
104
/// Number of trades
105
/// </summary>
106
public
int
?
Trades
{
get
;
set
; }
107
108
/// <summary>
109
/// ID of project, were this current project was originally cloned
110
/// </summary>
111
public
int
?
CloneId
{
get
;
set
; }
112
}
113
}
Common
Api
BaseOptimization.cs
Generated by
1.8.17