book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

Supported Models

Trading Technologies

Introduction

This page explains the TradingTechnologiesBrokerageModel, including the asset classes it supports, its default security-level models, and its default markets.

Select Language:
self.set_brokerage_model(BrokerageName.TRADING_TECHNOLOGIES, AccountType.CASH)
self.set_brokerage_model(BrokerageName.TRADING_TECHNOLOGIES, AccountType.MARGIN)

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

Asset Classes

The TradingTechnologiesBrokerageModel supports trading Futures.

Orders

The TradingTechnologiesBrokerageModel supports several order types, some TimeInForce order properties, and order updates.

Order Types

The following table describes the available order types for each asset class that the TradingTechnologiesBrokerageModel supports:

Order TypeFutures
Marketgreen check
Limitgreen check
Stop marketgreen check
Stop limitgreen check

The TradingTechnologiesBrokerageModel enforces the following order rules:

  • If you are buying (selling) with a stop_market_order or a stop_limit_order, the stop price of the order must be greater (less) than the current security price.
  • If you are buying (selling) with a stop_limit_order, the limit price of the order must be greater (less) than the stop price.

Time In Force

The TradingTechnologiesBrokerageModel supports the DAY and GOOD_TIL_CANCELED TimeInForce order properties.

Select Language:
def initialize(self) -> None:
    # Set the default order properties
    self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED

def on_data(self, slice: Slice) -> None:
    # Use default order order properties
    self.limit_order(self._symbol, quantity, limit_price)
    
    # Override the default order properties
    order_properties = OrderProperties()
    order_properties.time_in_force = TimeInForce.DAY
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

Updates

The TradingTechnologiesBrokerageModel supports order updates.

Fills

The TradingTechnologiesBrokerageModel uses the FutureFillModel.

Slippage

The TradingTechnologiesBrokerageModel uses the NullSlippageModel.

Fees

The TradingTechnologiesBrokerageModel uses the ConstantFeeModel with zero fees.

Select Language:
security.set_fee_model(ConstantFeeModel(0))

Buying Power

The TradingTechnologiesBrokerageModel uses the FutureMarginModel.

Settlement

The TradingTechnologiesBrokerageModel uses the FutureSettlementModel.

Margin Interest Rate

The TradingTechnologiesBrokerageModel uses the NullMarginInterestRateModel.

Default Markets

The default market of the TradierBrokerageModel is Market.CME.

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: