/*
* 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;
namespace QuantConnect.Optimizer
{
public class OptimizationEstimate
{
///
/// Total number of backtests, approximately
///
[JsonProperty("totalBacktest")]
public int TotalBacktest { get; set; }
///
/// Number of completed backtests
///
[JsonProperty("completedBacktest")]
public int CompletedBacktest { get; set; }
///
/// Number of failed backtests
///
[JsonProperty("failedBacktest")]
public int FailedBacktest { get; set; }
///
/// Number of running backtests
///
[JsonProperty("runningBacktest")]
public int RunningBacktest { get; set; }
///
/// Number of backtests in queue
///
[JsonProperty("inQueueBacktest")]
public int InQueueBacktest { get; set; }
///
/// Indicates backtest average duration; (start - now) / CompletedBacktest
///
[JsonProperty("averageBacktest")]
public TimeSpan AverageBacktest { get; set; }
///
/// The run time of this optimization
///
[JsonProperty(PropertyName = "totalRuntime")]
public TimeSpan TotalRuntime { get; set; }
///
/// Pretty representation of an optimization estimate
///
public override string ToString()
{
return $"TotalBacktest: {TotalBacktest}. CompletedBacktest: {CompletedBacktest}. FailedBacktest: {FailedBacktest}." +
$" RunningBacktest: {RunningBacktest}. InQueueBacktest: {InQueueBacktest}. TotalRuntime {TotalRuntime}. AverageBacktest: {AverageBacktest}";
}
}
}