Skip to content

AlgorithmConfiguration

QuantConnect.AlgorithmConfiguration

AlgorithmConfiguration(
    name: str,
    tags: ISet[str],
    account_currency: str,
    brokerage_name: BrokerageName,
    account_type: AccountType,
    parameters: IReadOnlyDictionary[str, str],
    start_date: Union[datetime, date],
    end_date: Union[datetime, date],
    out_of_sample_max_end_date: Optional[datetime],
    out_of_sample_days: int = 0,
    trading_days_per_year: int = 0,
)
AlgorithmConfiguration()

Bases: Object

This class includes algorithm configuration settings and parameters. This is used to include configuration parameters in the result packet to be used for report generation.

Signature descriptions:

  • Initializes a new instance of the AlgorithmConfiguration class

  • Initializes a new empty instance of the AlgorithmConfiguration class

name

name: str

The algorithm's name

tags

tags: ISet[str]

List of tags associated with the algorithm

account_currency

account_currency: str

The algorithm's account currency

brokerage

brokerage: BrokerageName

The algorithm's brokerage model

account_type

account_type: AccountType

The algorithm's account type

parameters

parameters: IReadOnlyDictionary[str, str]

The parameters used by the algorithm

out_of_sample_max_end_date

out_of_sample_max_end_date: Optional[datetime]

Backtest maximum end date

out_of_sample_days

out_of_sample_days: int

The backtest out of sample day count

start_date

start_date: datetime

The backtest start date

end_date

end_date: datetime

The backtest end date

trading_days_per_year

trading_days_per_year: int

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

create

create(
    algorithm: IAlgorithm,
    backtest_node_packet: BacktestNodePacket,
) -> AlgorithmConfiguration

Provides a convenience method for creating a AlgorithmConfiguration for a given algorithm.

Parameters:

Name Type Description Default
algorithm IAlgorithm

Algorithm for which the configuration object is being created

required
backtest_node_packet BacktestNodePacket

The associated backtest node packet if any

required

Returns:

Type Description
AlgorithmConfiguration

A new AlgorithmConfiguration object for the specified algorithm.