BacktestingBrokerageFactory
QuantConnect.Brokerages.Backtesting.BacktestingBrokerageFactory
BacktestingBrokerageFactory()
Bases: BrokerageFactory
Factory type for the BacktestingBrokerage
Initializes a new instance of the BacktestingBrokerageFactory class
brokerage_data
brokerage_data: Dictionary[str, str]
Gets the brokerage data required to run the IB brokerage from configuration
brokerage_type
brokerage_type: Type
Gets the type of brokerage produced by this factory
create_brokerage
create_brokerage(
job: LiveNodePacket, algorithm: IAlgorithm
) -> IBrokerage
Creates a new IBrokerage instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job
|
LiveNodePacket
|
The job packet to create the brokerage for |
required |
algorithm
|
IAlgorithm
|
The algorithm instance |
required |
Returns:
| Type | Description |
|---|---|
IBrokerage
|
A new brokerage instance. |
dispose
dispose() -> None
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
get_brokerage_model
get_brokerage_model(
order_provider: IOrderProvider,
) -> IBrokerageModel
Gets a new instance of the InteractiveBrokersBrokerageModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_provider
|
IOrderProvider
|
The order provider |
required |
create_brokerage_message_handler
create_brokerage_message_handler(
algorithm: IAlgorithm,
job: AlgorithmNodePacket,
api: IApi,
) -> IBrokerageMessageHandler
Gets a brokerage message handler