Skip to content

IContinuousContractModel

QuantConnect.Securities.Interfaces.IContinuousContractModel

Continuous contract model interface. Interfaces is implemented by different classes realizing various methods for modeling continuous security series. Primarily, modeling of continuous futures. Continuous contracts are used in backtesting of otherwise expiring derivative contracts. Continuous contracts are not traded, and are not products traded on exchanges.

adjustment_type

adjustment_type: AdjustmentType

Adjustment type, implemented by the model

input_series

input_series: IEnumerator[BaseData]

List of current and historical data series for one root symbol. e.g. 6BH16, 6BM16, 6BU16, 6BZ16

get_continuous_data

get_continuous_data(
    date_time: Union[datetime, date],
) -> IEnumerator[BaseData]

Method returns continuous prices from the list of current and historical data series for one root symbol. It returns enumerator of stitched continuous quotes, produced by the model. e.g. 6BH15, 6BM15, 6BU15, 6BZ15 will result in one 6B continuous historical series for 2015

Returns:

Type Description
IEnumerator[BaseData]

Continuous prices.

get_current_symbol

get_current_symbol(
    date_time: Union[datetime, date],
) -> Symbol

Returns current symbol name that corresponds to the current continuous model, or null if none.

Returns:

Type Description
Symbol

Current symbol name.

get_roll_dates

get_roll_dates() -> IEnumerator[datetime]

Returns the list of roll dates for the contract.

Returns:

Type Description
IEnumerator[datetime]

The list of roll dates.