MultiPeriodFieldLong
QuantConnect.Data.Fundamental.MultiPeriodFieldLong
MultiPeriodFieldLong()
MultiPeriodFieldLong(
time_provider: ITimeProvider,
security_identifier: SecurityIdentifier,
)
Bases: MultiPeriodField[int]
Abstract class for multi-period fields long
Signature descriptions:
-
Creates an empty instance
-
Creates a new instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_provider
|
Optional[ITimeProvider]
|
|
None
|
security_identifier
|
Optional[SecurityIdentifier]
|
|
None
|
NO_VALUE
NO_VALUE: QuantConnect_Data_Fundamental_MultiPeriodField_T
No Value
time_provider
time_provider: ITimeProvider
The time provider instance to use
This codeEntityType is protected.
default_period
default_period: str
The default period
This codeEntityType is protected.
security_identifier
security_identifier: SecurityIdentifier
The target security identifier
This codeEntityType is protected.
has_value
has_value: bool
Returns true if the field contains a value for the default period
value
value: QuantConnect_Data_Fundamental_MultiPeriodField_T
Returns the default value for the field
convert_period
convert_period(period: str) -> str
Returns a string that represents the current object.
This codeEntityType is protected.
get_period_names
get_period_names() -> Iterable[str]
Gets the list of available period names for the field
get_period_value
get_period_value(
period: str,
) -> QuantConnect_Data_Fundamental_MultiPeriodField_T
Gets the value of the field for the requested period
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
str
|
The requested period |
required |
Returns:
| Type | Description |
|---|---|
QuantConnect_Data_Fundamental_MultiPeriodField_T
|
The value for the period. |
get_period_values
get_period_values() -> IReadOnlyDictionary[
str,
QuantConnect_Data_Fundamental_MultiPeriodField_T,
]
Gets a dictionary of period names and values for the field
has_period_value
has_period_value(period: str) -> bool
Returns true if the field contains a value for the requested period
Returns:
| Type | Description |
|---|---|
bool
|
True if the field contains a value for the requested period. |
has_values
has_values() -> bool
Returns true if the field has at least one value for one period
to_string
to_string() -> str
Returns a string that represents the current object.