Lean  $LEAN_TAG$
QuantConnect.AlgorithmSettings Class Reference

This class includes user settings for the algorithm which can be changed in the IAlgorithm.Initialize method More...

Inheritance diagram for QuantConnect.AlgorithmSettings:
[legend]

Public Member Functions

 AlgorithmSettings ()
 Initializes a new instance of the AlgorithmSettings class More...
 

Properties

bool AutomaticIndicatorWarmUp [get, set]
 Gets whether or not WarmUpIndicator is allowed to warm up indicators More...
 
bool? RebalancePortfolioOnSecurityChanges [get, set]
 True if should rebalance portfolio on security changes. True by default More...
 
bool? RebalancePortfolioOnInsightChanges [get, set]
 True if should rebalance portfolio on new insights or expiration of insights. True by default More...
 
decimal MaxAbsolutePortfolioTargetPercentage [get, set]
 The absolute maximum valid total portfolio value target percentage More...
 
decimal MinAbsolutePortfolioTargetPercentage [get, set]
 The absolute minimum valid total portfolio value target percentage More...
 
decimal MinimumOrderMarginPortfolioPercentage [get, set]
 Configurable minimum order margin portfolio percentage to ignore bad orders, orders with unrealistic small sizes More...
 
int DataSubscriptionLimit = int.MaxValue [get, set]
 Gets/sets the maximum number of concurrent market data subscriptions available More...
 
decimal? FreePortfolioValue [get, set]
 Gets/sets the SetHoldings buffers value. The buffer is used for orders not to be rejected due to volatility when using SetHoldings and CalculateOrderQuantity More...
 
decimal FreePortfolioValuePercentage [get, set]
 Gets/sets the SetHoldings buffers value percentage. This percentage will be used to set the FreePortfolioValue based on the SecurityPortfolioManager.TotalPortfolioValue More...
 
bool LiquidateEnabled [get, set]
 Gets/sets if Liquidate() is enabled More...
 
TimeSpan StalePriceTimeSpan [get, set]
 Gets/sets the minimum time span elapsed to consider a market fill price as stale (defaults to one hour) More...
 
ResolutionWarmupResolution [get, set]
 The warmup resolution to use if any More...
 
ResolutionWarmUpResolution [get, set]
 The warmup resolution to use if any More...
 
int? TradingDaysPerYear [get, set]
 Number of trading days per year for this Algorithm's portfolio statistics. More...
 
bool DailyPreciseEndTime [get, set]
 True if daily strict end times are enabled More...
 
TimeSpan DatabasesRefreshPeriod [get, set]
 Gets the time span used to refresh the market hours and symbol properties databases More...
 
- Properties inherited from QuantConnect.Interfaces.IAlgorithmSettings
bool AutomaticIndicatorWarmUp [get, set]
 Gets whether or not WarmUpIndicator is allowed to warm up indicators More...
 
bool? RebalancePortfolioOnSecurityChanges [get, set]
 True if should rebalance portfolio on security changes. True by default More...
 
bool? RebalancePortfolioOnInsightChanges [get, set]
 True if should rebalance portfolio on new insights or expiration of insights. True by default More...
 
decimal MaxAbsolutePortfolioTargetPercentage [get, set]
 The absolute maximum valid total portfolio value target percentage More...
 
decimal MinAbsolutePortfolioTargetPercentage [get, set]
 The absolute minimum valid total portfolio value target percentage More...
 
decimal MinimumOrderMarginPortfolioPercentage [get, set]
 Configurable minimum order margin portfolio percentage to ignore bad orders, or orders with unrealistic sizes More...
 
decimal? FreePortfolioValue [get, set]
 Gets/sets the SetHoldings buffers value. The buffer is used for orders not to be rejected due to volatility when using SetHoldings and CalculateOrderQuantity More...
 
decimal FreePortfolioValuePercentage [get, set]
 Gets/sets the SetHoldings buffers value percentage. This percentage will be used to set the FreePortfolioValue based on the SecurityPortfolioManager.TotalPortfolioValue More...
 
bool LiquidateEnabled [get, set]
 Gets/sets if Liquidate() is enabled More...
 
bool DailyPreciseEndTime [get, set]
 True if daily strict end times are enabled More...
 
int DataSubscriptionLimit [get, set]
 Gets/sets the maximum number of concurrent market data subscriptions available More...
 
TimeSpan StalePriceTimeSpan [get, set]
 Gets the minimum time span elapsed to consider a market fill price as stale (defaults to one hour) More...
 
ResolutionWarmupResolution [get, set]
 The warmup resolution to use if any More...
 
int? TradingDaysPerYear [get, set]
 Gets or sets the number of trading days per year for this Algorithm's portfolio statistics. More...
 
TimeSpan DatabasesRefreshPeriod [get, set]
 Gets the time span used to refresh the market hours and symbol properties databases More...
 

Detailed Description

This class includes user settings for the algorithm which can be changed in the IAlgorithm.Initialize method

Definition at line 27 of file AlgorithmSettings.cs.

Constructor & Destructor Documentation

◆ AlgorithmSettings()

QuantConnect.AlgorithmSettings.AlgorithmSettings ( )

Initializes a new instance of the AlgorithmSettings class

Definition at line 157 of file AlgorithmSettings.cs.

Property Documentation

◆ AutomaticIndicatorWarmUp

bool QuantConnect.AlgorithmSettings.AutomaticIndicatorWarmUp
getset

Gets whether or not WarmUpIndicator is allowed to warm up indicators

Definition at line 35 of file AlgorithmSettings.cs.

◆ RebalancePortfolioOnSecurityChanges

bool? QuantConnect.AlgorithmSettings.RebalancePortfolioOnSecurityChanges
getset

True if should rebalance portfolio on security changes. True by default

Definition at line 40 of file AlgorithmSettings.cs.

◆ RebalancePortfolioOnInsightChanges

bool? QuantConnect.AlgorithmSettings.RebalancePortfolioOnInsightChanges
getset

True if should rebalance portfolio on new insights or expiration of insights. True by default

Definition at line 45 of file AlgorithmSettings.cs.

◆ MaxAbsolutePortfolioTargetPercentage

decimal QuantConnect.AlgorithmSettings.MaxAbsolutePortfolioTargetPercentage
getset

The absolute maximum valid total portfolio value target percentage

This setting is currently being used to filter out undesired target percent values, caused by the IPortfolioConstructionModel implementation being used. For example rounding errors, math operations

Definition at line 53 of file AlgorithmSettings.cs.

◆ MinAbsolutePortfolioTargetPercentage

decimal QuantConnect.AlgorithmSettings.MinAbsolutePortfolioTargetPercentage
getset

The absolute minimum valid total portfolio value target percentage

This setting is currently being used to filter out undesired target percent values, caused by the IPortfolioConstructionModel implementation being used. For example rounding errors, math operations

Definition at line 61 of file AlgorithmSettings.cs.

◆ MinimumOrderMarginPortfolioPercentage

decimal QuantConnect.AlgorithmSettings.MinimumOrderMarginPortfolioPercentage
getset

Configurable minimum order margin portfolio percentage to ignore bad orders, orders with unrealistic small sizes

Default value is 0.1% of the portfolio value. This setting is useful to avoid small trading noise when using SetHoldings

Definition at line 67 of file AlgorithmSettings.cs.

◆ DataSubscriptionLimit

int QuantConnect.AlgorithmSettings.DataSubscriptionLimit = int.MaxValue
getset

Gets/sets the maximum number of concurrent market data subscriptions available

All securities added with IAlgorithm.AddSecurity are counted as one, with the exception of options and futures where every single contract in a chain counts as one.

Definition at line 77 of file AlgorithmSettings.cs.

◆ FreePortfolioValue

decimal? QuantConnect.AlgorithmSettings.FreePortfolioValue
getset

Gets/sets the SetHoldings buffers value. The buffer is used for orders not to be rejected due to volatility when using SetHoldings and CalculateOrderQuantity

Definition at line 83 of file AlgorithmSettings.cs.

◆ FreePortfolioValuePercentage

decimal QuantConnect.AlgorithmSettings.FreePortfolioValuePercentage
getset

Gets/sets the SetHoldings buffers value percentage. This percentage will be used to set the FreePortfolioValue based on the SecurityPortfolioManager.TotalPortfolioValue

Definition at line 90 of file AlgorithmSettings.cs.

◆ LiquidateEnabled

bool QuantConnect.AlgorithmSettings.LiquidateEnabled
getset

Gets/sets if Liquidate() is enabled

Definition at line 95 of file AlgorithmSettings.cs.

◆ StalePriceTimeSpan

TimeSpan QuantConnect.AlgorithmSettings.StalePriceTimeSpan
getset

Gets/sets the minimum time span elapsed to consider a market fill price as stale (defaults to one hour)

In the default fill models, a warning message will be added to market order fills if this time span (or more) has elapsed since the price was last updated.

See also
FillModel, ImmediateFillModel

Definition at line 106 of file AlgorithmSettings.cs.

◆ WarmupResolution

Resolution? QuantConnect.AlgorithmSettings.WarmupResolution
getset

The warmup resolution to use if any

This allows improving the warmup speed by setting it to a lower resolution than the one added in the algorithm

Definition at line 112 of file AlgorithmSettings.cs.

◆ WarmUpResolution

Resolution? QuantConnect.AlgorithmSettings.WarmUpResolution
getset

The warmup resolution to use if any

This allows improving the warmup speed by setting it to a lower resolution than the one added in the algorithm. Pass through version to be user friendly

Definition at line 120 of file AlgorithmSettings.cs.

◆ TradingDaysPerYear

int? QuantConnect.AlgorithmSettings.TradingDaysPerYear
getset

Number of trading days per year for this Algorithm's portfolio statistics.

Effect on Statistics.PortfolioStatistics.AnnualVariance,

See also
Statistics.PortfolioStatistics.AnnualStandardDeviation, Statistics.PortfolioStatistics.SharpeRatio, Statistics.PortfolioStatistics.SortinoRatio, Statistics.PortfolioStatistics.TrackingError, Statistics.PortfolioStatistics.InformationRatio

, , , , .

Definition at line 142 of file AlgorithmSettings.cs.

◆ DailyPreciseEndTime

bool QuantConnect.AlgorithmSettings.DailyPreciseEndTime
getset

True if daily strict end times are enabled

Definition at line 147 of file AlgorithmSettings.cs.

◆ DatabasesRefreshPeriod

TimeSpan QuantConnect.AlgorithmSettings.DatabasesRefreshPeriod
getset

Gets the time span used to refresh the market hours and symbol properties databases

Definition at line 152 of file AlgorithmSettings.cs.


The documentation for this class was generated from the following file: