MappingContractFactorRow
QuantConnect.Data.Auxiliary.MappingContractFactorRow
MappingContractFactorRow()
Bases: Object, IFactorRow
Collection of factors for continuous contracts and their back months contracts for a specific mapping mode data_mapping_mode and date
Empty constructor for json converter
date
date: datetime
Gets the date associated with this data
backwards_ratio_scale
backwards_ratio_scale: Sequence[float]
Backwards ratio price scaling factors for the front month
backwards_panama_canal_scale
backwards_panama_canal_scale: Sequence[float]
Backwards Panama Canal price scaling factors for the front month
forward_panama_canal_scale
forward_panama_canal_scale: Sequence[float]
Forward Panama Canal price scaling factors for the front month
data_mapping_mode
data_mapping_mode: Optional[DataMappingMode]
Allows the consumer to specify a desired mapping mode
get_file_format
get_file_format(source: str = None) -> str
Writes factor file row into it's file format
parse
parse(
lines: List[str],
factor_file_minimum_date: Optional[Optional[datetime]],
) -> Tuple[
List[MappingContractFactorRow], Optional[datetime]
]
Parses the lines as factor files rows while properly handling inf entries
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lines
|
List[str]
|
The lines from the factor file to be parsed |
required |
factor_file_minimum_date
|
Optional[Optional[datetime]]
|
The minimum date from the factor file |
required |
Returns:
| Type | Description |
|---|---|
Tuple[List[MappingContractFactorRow], Optional[datetime]]
|
An enumerable of factor file rows. |