/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using Newtonsoft.Json; using QuantConnect.Optimizer; using QuantConnect.Optimizer.Objectives; using System.Collections.Generic; using QuantConnect.Optimizer.Parameters; using QuantConnect.Util; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; namespace QuantConnect.Api { /// /// BaseOptimization item from the QuantConnect.com API. /// public class BaseOptimization : RestResponse { /// /// Optimization ID /// public string OptimizationId { get; set; } /// /// Project ID of the project the optimization belongs to /// public int ProjectId { get; set; } /// /// Name of the optimization /// public string Name { get; set; } /// /// Status of the optimization /// [JsonConverter(typeof(StringEnumConverter), converterParameters: typeof(CamelCaseNamingStrategy))] public OptimizationStatus Status { get; set; } /// /// Optimization node type /// /// public string NodeType { get; set; } /// /// Number of days of out of sample days /// public int OutOfSampleDays { get; set; } /// /// End date of out of sample data /// [JsonConverter(typeof(DateTimeJsonConverter), DateFormat.UI)] public DateTime? OutOfSampleMaxEndDate { get; set; } /// /// Parameters used in this optimization /// public List Parameters { get; set; } /// /// Optimization statistical target /// public Target Criterion { get; set; } } /// /// Optimization summary response for creating an optimization /// public class OptimizationSummary: BaseOptimization { /// /// Date when this optimization was created /// [JsonConverter(typeof(DateTimeJsonConverter), DateFormat.UI)] public DateTime Created { get; set; } /// /// Price-sales ratio stastic /// public decimal? PSR { get; set; } /// /// Sharpe ratio statistic /// public decimal? SharpeRatio { get; set; } /// /// Number of trades /// public int? Trades { get; set; } /// /// ID of project, were this current project was originally cloned /// public int? CloneId { get; set; } } }