AlgorithmUtils
QuantConnect.AlgorithmUtils
Bases: Object
Provides utility methods for or related to algorithms
seed_currency_conversion_rates
seed_currency_conversion_rates(
algorithm: IAlgorithm,
currencies_to_update_white_list: Sequence[str] = None,
) -> None
Seeds an initial conversion rate for the cashbook currencies that don't have one yet, so they are non-zero right away instead of waiting for the first conversion pair bar to arrive
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
algorithm
|
IAlgorithm
|
The algorithm instance |
required |
currencies_to_update_white_list
|
Sequence[str]
|
If passed, only the currencies in the CashBook contained in this list will be updated. By default, if not passed (null), all currencies in the cashbook without a properly set up currency conversion will be updated. |
None
|
seed_securities
seed_securities(
securities: Sequence[Security], algorithm: IAlgorithm
) -> None
Seeds the provided securities with their last known prices from the algorithm
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
securities
|
Sequence[Security]
|
The securities to seed |
required |
algorithm
|
IAlgorithm
|
The algorithm instance |
required |