/*
* 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 QuantConnect.Interfaces;
namespace QuantConnect.Packets
{
///
/// Specifies values used to control algorithm limits
///
public class Controls
{
///
/// The maximum runtime in minutes
///
public int MaximumRuntimeMinutes { get; set; }
///
/// The maximum number of minute symbols
///
public int MinuteLimit { get; set; }
///
/// The maximum number of second symbols
///
public int SecondLimit { get; set; }
///
/// The maximum number of tick symbol
///
public int TickLimit { get; set; }
///
/// Ram allocation for this algorithm in MB
///
public int RamAllocation { get; set; }
///
/// CPU allocation for this algorithm
///
public decimal CpuAllocation { get; set; }
///
/// The user live log limit
///
public int LiveLogLimit { get; set; }
///
/// The user backtesting log limit
///
public int BacktestLogLimit { get; set; }
///
/// The daily log limit of a user
///
public int DailyLogLimit { get; set; }
///
/// The remaining log allowance for a user
///
public int RemainingLogAllowance { get; set; }
///
/// Maximimum number of insights we'll store and score in a single backtest
///
public int BacktestingMaxInsights { get; set; }
///
/// Maximimum number of orders we'll allow in a backtest.
///
public int BacktestingMaxOrders { get; set; }
///
/// Limits the amount of data points per chart series. Applies only for backtesting
///
public int MaximumDataPointsPerChartSeries { get; set; }
///
/// Limits the amount of chart series. Applies only for backtesting
///
public int MaximumChartSeries { get; set; }
///
/// The amount seconds used for timeout limits
///
public int SecondTimeOut { get; set; }
///
/// Sets parameters used for determining the behavior of the leaky bucket algorithm that
/// controls how much time is available for an algorithm to use the training feature.
///
public LeakyBucketControlParameters TrainingLimits { get; set; }
///
/// Limits the total size of storage used by
///
public long StorageLimit { get; set; }
///
/// Limits the number of files to be held under the
///
public int StorageFileCount { get; set; }
///
/// Holds the permissions for the object store
///
public StoragePermissions StorageAccess { get; set; }
///
/// The interval over which the will persistence the contents of
/// the object store
///
public int PersistenceIntervalSeconds { get; set; }
///
/// The cost associated with running this job
///
public decimal CreditCost { get; set; }
///
/// Initializes a new default instance of the class
///
public Controls()
{
MinuteLimit = 500;
SecondLimit = 100;
TickLimit = 30;
RamAllocation = 1024;
BacktestLogLimit = 10000;
BacktestingMaxOrders = int.MaxValue;
DailyLogLimit = 3000000;
RemainingLogAllowance = 10000;
MaximumRuntimeMinutes = 60 * 24 * 100; // 100 days default
BacktestingMaxInsights = 10000;
MaximumChartSeries = 10;
MaximumDataPointsPerChartSeries = 4000;
SecondTimeOut = 300;
StorageLimit = 10737418240;
StorageFileCount = 10000;
PersistenceIntervalSeconds = 5;
StorageAccess = new StoragePermissions();
// initialize to default leaky bucket values in case they're not specified
TrainingLimits = new LeakyBucketControlParameters();
}
}
}