Supported Models

QuantConnect Paper Trading

Introduction

This page explains the default security-level models and markets of the DefaultBrokerageModel.

SetBrokerageModel(BrokerageName.QuantConnectBrokerage, AccountType.Cash);
SetBrokerageModel(BrokerageName.QuantConnectBrokerage, AccountType.Margin); // Overrides the default account type
self.SetBrokerageModel(BrokerageName.QuantConnectBrokerage) # Defaults to margin account
self.SetBrokerageModel(BrokerageName.QuantConnectBrokerage, AccountType.Margin) # Overrides the default account type

To view the implementation of this model, see the LEAN GitHub repository.

Fills

The following table shows the fill model that the DefaultBrokerageModel uses for each SecurityType:

SecurityTypeFill Model
EquityEquityFillModel
FutureFutureFillModel
FutureOptionFutureOptionFillModel
Remaining SecurityType valuesImmediateFillModel

Slippage

The DefaultBrokerageModel uses the ConstantSlippageModel with zero slippage.

Fees

The DefaultBrokerageModel uses the ConstantFeeModel with no fees for Forex, CFD, and Crypto assets and the InteractiveBrokersFeeModel for the remaining asset classes.

Buying Power

The DefaultBrokerageModel uses sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

Asset ClassModel
Equity OptionsOptionMarginModel
FuturesFutureMarginModel
Future OptionsFuturesOptionsMarginModel
Index OptionsOptionMarginModel
CryptoCashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
ForexCashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
OtherSecurityMarginModel

If you have a margin account, the DefaultBrokerageModel allows 2x leverage for Equities, 50x leverage for Forex and CFDs, and 1x leverage for the remaining asset classes.

Settlement

The DefaultBrokerageModel uses the ImmediateSettlementModel in most cases. If you trade US Equities or Equity Options with a cash account, it uses the DelayedSettlementModel.

Default Markets

The following table describes the default markets of each SecurityType for the DefaultBrokerageModel:

SecurityTypeMarket
EquityUSA
OptionUSA
FutureCME
FutureOptionCME
IndexUSA
IndexOptionUSA
ForexOanda
CfdOanda
CryptoGDAX

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: