quantconnect-stubs 17841__py3-none-any.whl → 17842__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- QuantConnect/Data/Consolidators/__init__.pyi +201 -0
- QuantConnect/Util/__init__.pyi +13 -0
- {quantconnect_stubs-17841.dist-info → quantconnect_stubs-17842.dist-info}/METADATA +1 -1
- {quantconnect_stubs-17841.dist-info → quantconnect_stubs-17842.dist-info}/RECORD +6 -8
- QuantConnect/Data/Common/__init__.py +0 -32
- QuantConnect/Data/Common/__init__.pyi +0 -197
- {quantconnect_stubs-17841.dist-info → quantconnect_stubs-17842.dist-info}/WHEEL +0 -0
- {quantconnect_stubs-17841.dist-info → quantconnect_stubs-17842.dist-info}/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ import QuantConnect.Data
|
|
|
9
9
|
import QuantConnect.Data.Consolidators
|
|
10
10
|
import QuantConnect.Data.Market
|
|
11
11
|
import QuantConnect.Python
|
|
12
|
+
import QuantConnect.Securities
|
|
12
13
|
import System
|
|
13
14
|
|
|
14
15
|
QuantConnect_Data_Consolidators_ClassicRenkoConsolidator = typing.Any
|
|
@@ -1975,6 +1976,206 @@ class Calendar(System.Object):
|
|
|
1975
1976
|
"""Computes the start of year (1st of the current year) of given date/time"""
|
|
1976
1977
|
|
|
1977
1978
|
|
|
1979
|
+
class MarketHourAwareConsolidator(System.Object, QuantConnect.Data.Consolidators.IDataConsolidator):
|
|
1980
|
+
"""Consolidator for open markets bar only, extended hours bar are not consolidated."""
|
|
1981
|
+
|
|
1982
|
+
@property
|
|
1983
|
+
def period(self) -> datetime.timedelta:
|
|
1984
|
+
"""
|
|
1985
|
+
The consolidation period requested
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
This Property is protected.
|
|
1989
|
+
"""
|
|
1990
|
+
...
|
|
1991
|
+
|
|
1992
|
+
@property
|
|
1993
|
+
def consolidator(self) -> QuantConnect.Data.Consolidators.IDataConsolidator:
|
|
1994
|
+
"""
|
|
1995
|
+
The consolidator instance
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
This Property is protected.
|
|
1999
|
+
"""
|
|
2000
|
+
...
|
|
2001
|
+
|
|
2002
|
+
@property
|
|
2003
|
+
def exchange_hours(self) -> QuantConnect.Securities.SecurityExchangeHours:
|
|
2004
|
+
"""
|
|
2005
|
+
The associated security exchange hours instance
|
|
2006
|
+
|
|
2007
|
+
|
|
2008
|
+
This Property is protected.
|
|
2009
|
+
"""
|
|
2010
|
+
...
|
|
2011
|
+
|
|
2012
|
+
@exchange_hours.setter
|
|
2013
|
+
def exchange_hours(self, value: QuantConnect.Securities.SecurityExchangeHours) -> None:
|
|
2014
|
+
...
|
|
2015
|
+
|
|
2016
|
+
@property
|
|
2017
|
+
def data_time_zone(self) -> typing.Any:
|
|
2018
|
+
"""
|
|
2019
|
+
The associated data time zone
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
This Property is protected.
|
|
2023
|
+
"""
|
|
2024
|
+
...
|
|
2025
|
+
|
|
2026
|
+
@data_time_zone.setter
|
|
2027
|
+
def data_time_zone(self, value: typing.Any) -> None:
|
|
2028
|
+
...
|
|
2029
|
+
|
|
2030
|
+
@property
|
|
2031
|
+
def consolidated(self) -> QuantConnect.Data.IBaseData:
|
|
2032
|
+
"""
|
|
2033
|
+
Gets the most recently consolidated piece of data. This will be null if this consolidator
|
|
2034
|
+
has not produced any data yet.
|
|
2035
|
+
"""
|
|
2036
|
+
...
|
|
2037
|
+
|
|
2038
|
+
@property
|
|
2039
|
+
def input_type(self) -> typing.Type:
|
|
2040
|
+
"""Gets the type consumed by this consolidator"""
|
|
2041
|
+
...
|
|
2042
|
+
|
|
2043
|
+
@property
|
|
2044
|
+
def working_data(self) -> QuantConnect.Data.IBaseData:
|
|
2045
|
+
"""Gets a clone of the data being currently consolidated"""
|
|
2046
|
+
...
|
|
2047
|
+
|
|
2048
|
+
@property
|
|
2049
|
+
def output_type(self) -> typing.Type:
|
|
2050
|
+
"""Gets the type produced by this consolidator"""
|
|
2051
|
+
...
|
|
2052
|
+
|
|
2053
|
+
@property
|
|
2054
|
+
def data_consolidated(self) -> _EventContainer[typing.Callable[[System.Object, QuantConnect.Data.IBaseData], typing.Any], typing.Any]:
|
|
2055
|
+
"""Event handler that fires when a new piece of data is produced"""
|
|
2056
|
+
...
|
|
2057
|
+
|
|
2058
|
+
@data_consolidated.setter
|
|
2059
|
+
def data_consolidated(self, value: _EventContainer[typing.Callable[[System.Object, QuantConnect.Data.IBaseData], typing.Any], typing.Any]) -> None:
|
|
2060
|
+
...
|
|
2061
|
+
|
|
2062
|
+
@overload
|
|
2063
|
+
def __init__(self, daily_strict_end_time_enabled: bool, resolution: QuantConnect.Resolution, data_type: typing.Type, tick_type: QuantConnect.TickType, extended_market_hours: bool) -> None:
|
|
2064
|
+
"""
|
|
2065
|
+
Initializes a new instance of the MarketHourAwareConsolidator class.
|
|
2066
|
+
|
|
2067
|
+
:param resolution: The resolution.
|
|
2068
|
+
:param data_type: The target data type
|
|
2069
|
+
:param tick_type: The target tick type
|
|
2070
|
+
:param extended_market_hours: True if extended market hours should be consolidated
|
|
2071
|
+
"""
|
|
2072
|
+
...
|
|
2073
|
+
|
|
2074
|
+
@overload
|
|
2075
|
+
def __init__(self, daily_strict_end_time_enabled: bool, period: datetime.timedelta, data_type: typing.Type, tick_type: QuantConnect.TickType, extended_market_hours: bool) -> None:
|
|
2076
|
+
"""
|
|
2077
|
+
Initializes a new instance of the MarketHourAwareConsolidator class for an arbitrary period.
|
|
2078
|
+
Intraday periods are anchored to the market open without extending past the close.
|
|
2079
|
+
|
|
2080
|
+
:param daily_strict_end_time_enabled: True if daily strict end times should be enabled
|
|
2081
|
+
:param period: The consolidation period
|
|
2082
|
+
:param data_type: The target data type
|
|
2083
|
+
:param tick_type: The target tick type
|
|
2084
|
+
:param extended_market_hours: True if extended market hours should be consolidated
|
|
2085
|
+
"""
|
|
2086
|
+
...
|
|
2087
|
+
|
|
2088
|
+
@overload
|
|
2089
|
+
def create_consolidator(self, resolution: QuantConnect.Resolution, data_type: typing.Type, tick_type: QuantConnect.TickType) -> QuantConnect.Data.Consolidators.IDataConsolidator:
|
|
2090
|
+
"""
|
|
2091
|
+
Creates the inner consolidator that produces the requested data_type output.
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
This Class is protected.
|
|
2095
|
+
"""
|
|
2096
|
+
...
|
|
2097
|
+
|
|
2098
|
+
@overload
|
|
2099
|
+
def create_consolidator(self, calendar: typing.Callable[[datetime.datetime], QuantConnect.Data.Consolidators.CalendarInfo], data_type: typing.Type, tick_type: QuantConnect.TickType) -> QuantConnect.Data.Consolidators.IDataConsolidator:
|
|
2100
|
+
"""
|
|
2101
|
+
Creates the underlying calendar based consolidator for the given data type, used for arbitrary periods
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
This Class is protected.
|
|
2105
|
+
"""
|
|
2106
|
+
...
|
|
2107
|
+
|
|
2108
|
+
def daily_strict_end_time(self, date_time: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Data.Consolidators.CalendarInfo:
|
|
2109
|
+
"""
|
|
2110
|
+
Determines a bar start time and period
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
This Class is protected.
|
|
2114
|
+
"""
|
|
2115
|
+
...
|
|
2116
|
+
|
|
2117
|
+
def dispose(self) -> None:
|
|
2118
|
+
"""Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources."""
|
|
2119
|
+
...
|
|
2120
|
+
|
|
2121
|
+
def forward_consolidated_bar(self, sender: typing.Any, consolidated: QuantConnect.Data.IBaseData) -> None:
|
|
2122
|
+
"""
|
|
2123
|
+
Will forward the underlying consolidated bar to consumers on this object
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
This Class is protected.
|
|
2127
|
+
"""
|
|
2128
|
+
...
|
|
2129
|
+
|
|
2130
|
+
def initialize(self, data: QuantConnect.Data.IBaseData) -> None:
|
|
2131
|
+
"""
|
|
2132
|
+
Perform late initialization based on the datas symbol
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
This Class is protected.
|
|
2136
|
+
"""
|
|
2137
|
+
...
|
|
2138
|
+
|
|
2139
|
+
def intraday_calendar(self, date_time: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Data.Consolidators.CalendarInfo:
|
|
2140
|
+
"""
|
|
2141
|
+
Determines a bar start time and period for intraday consolidation, anchored to the market open
|
|
2142
|
+
without extending past the market close so a bar never spans across closed market hours
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
This Class is protected.
|
|
2146
|
+
"""
|
|
2147
|
+
...
|
|
2148
|
+
|
|
2149
|
+
def reset(self) -> None:
|
|
2150
|
+
"""Resets the consolidator"""
|
|
2151
|
+
...
|
|
2152
|
+
|
|
2153
|
+
def scan(self, current_local_time: typing.Union[datetime.datetime, datetime.date]) -> None:
|
|
2154
|
+
"""
|
|
2155
|
+
Scans this consolidator to see if it should emit a bar due to time passing
|
|
2156
|
+
|
|
2157
|
+
:param current_local_time: The current time in the local time zone (same as QuantConnect.Data.BaseData.Time)
|
|
2158
|
+
"""
|
|
2159
|
+
...
|
|
2160
|
+
|
|
2161
|
+
def update(self, data: QuantConnect.Data.IBaseData) -> None:
|
|
2162
|
+
"""
|
|
2163
|
+
Updates this consolidator with the specified data
|
|
2164
|
+
|
|
2165
|
+
:param data: The new data for the consolidator
|
|
2166
|
+
"""
|
|
2167
|
+
...
|
|
2168
|
+
|
|
2169
|
+
def use_strict_end_time(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> bool:
|
|
2170
|
+
"""
|
|
2171
|
+
Useful for testing
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
This Class is protected.
|
|
2175
|
+
"""
|
|
2176
|
+
...
|
|
2177
|
+
|
|
2178
|
+
|
|
1978
2179
|
class DynamicDataConsolidator(QuantConnect.Data.Consolidators.TradeBarConsolidatorBase[QuantConnect.Data.DynamicData]):
|
|
1979
2180
|
"""
|
|
1980
2181
|
A data csolidator that can make trade bars from DynamicData derived types. This is useful for
|
QuantConnect/Util/__init__.pyi
CHANGED
|
@@ -687,6 +687,19 @@ class LeanData(System.Object):
|
|
|
687
687
|
"""
|
|
688
688
|
...
|
|
689
689
|
|
|
690
|
+
@staticmethod
|
|
691
|
+
def get_intraday_calendar(exchange_time_zone_date: typing.Union[datetime.datetime, datetime.date], period: datetime.timedelta, exchange_hours: QuantConnect.Securities.SecurityExchangeHours, extended_market_hours: bool) -> QuantConnect.Data.Consolidators.CalendarInfo:
|
|
692
|
+
"""
|
|
693
|
+
Helper method to return the intraday bar start time and period, anchored to the market open, without extending past the close
|
|
694
|
+
|
|
695
|
+
:param exchange_time_zone_date: The point in time we want to get the bar information about
|
|
696
|
+
:param period: The intraday consolidation period
|
|
697
|
+
:param exchange_hours: The associated exchange hours
|
|
698
|
+
:param extended_market_hours: True if extended market hours should be taken into consideration
|
|
699
|
+
:returns: The calendar information that holds a start time and a period.
|
|
700
|
+
"""
|
|
701
|
+
...
|
|
702
|
+
|
|
690
703
|
@staticmethod
|
|
691
704
|
def get_next_daily_end_time(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], exchange_time_zone_date: typing.Union[datetime.datetime, datetime.date], exchange_hours: QuantConnect.Securities.SecurityExchangeHours) -> datetime.datetime:
|
|
692
705
|
"""Helper method to get the next daily end time, taking into account strict end times if appropriate"""
|
|
@@ -84,10 +84,8 @@ QuantConnect/Data/__init__.py,sha256=_g-rTzKe1VE0t4E5V9NgBKm6aovBnzV7Xy4RvU5jLkI
|
|
|
84
84
|
QuantConnect/Data/__init__.pyi,sha256=GHEZZnGosGx8qwFm1qahvkjflhSk7d1mGbASO9Z1WhY,130270
|
|
85
85
|
QuantConnect/Data/Auxiliary/__init__.py,sha256=9Cv0Bpnkcqga8TBXTl7vi4A8X67R_waUxXr24FOr7wg,1238
|
|
86
86
|
QuantConnect/Data/Auxiliary/__init__.pyi,sha256=YBZua74fYi4aVltwIJ79JR87XZzGapHqN04Dez6_8CA,55575
|
|
87
|
-
QuantConnect/Data/Common/__init__.py,sha256=CXPneDeSjrRxUguJGLZYCWjSyoVKXPOAQCnN8wZnhgk,1229
|
|
88
|
-
QuantConnect/Data/Common/__init__.pyi,sha256=6e32yAIhBa_CSRrewGm8i7FNUg6X-5O4F-QkStF54dw,6352
|
|
89
87
|
QuantConnect/Data/Consolidators/__init__.py,sha256=2ebxMwcGQCehjLFBZtGArL5hO-uGBtK39mRmqaaSLUs,1250
|
|
90
|
-
QuantConnect/Data/Consolidators/__init__.pyi,sha256=
|
|
88
|
+
QuantConnect/Data/Consolidators/__init__.pyi,sha256=l_vyXeTmjeaG7L8dcQPTbuwuKNry2IQH-TxcTafQcKA,83474
|
|
91
89
|
QuantConnect/Data/Custom/__init__.py,sha256=I1CClrHbWH7V2nBo_uk2NtFYtgaKq_XhuoTDaIatSqw,1229
|
|
92
90
|
QuantConnect/Data/Custom/__init__.pyi,sha256=aT8HTBH0Q-kX4RngtE8xTJLKVaZhLIEL9f4dRvIpFzA,2556
|
|
93
91
|
QuantConnect/Data/Custom/AlphaStreams/__init__.py,sha256=Aert83WBaQZAZhVNdIxhxSjMksWUVXaU7nE3SCB2InQ,1268
|
|
@@ -269,7 +267,7 @@ QuantConnect/Statistics/__init__.pyi,sha256=X7LpYvqgbi3H9pqYFI-WrVp7zVldmTpu2S61
|
|
|
269
267
|
QuantConnect/Storage/__init__.py,sha256=ycFDXSbQIVczsqFPWM0GNZuvxG28tiNFKRfOnHlmZDs,1217
|
|
270
268
|
QuantConnect/Storage/__init__.pyi,sha256=vPYtlj0BihTFUl1T2NZP3gU3X851g5fsMmvs5loRAMo,10973
|
|
271
269
|
QuantConnect/Util/__init__.py,sha256=FVfQYsRSqnOqvSsSdFd-oZ9PZqDVtIB-FUQ8hyfCXSE,1208
|
|
272
|
-
QuantConnect/Util/__init__.pyi,sha256=
|
|
270
|
+
QuantConnect/Util/__init__.pyi,sha256=gn8JDh4sqno-spTojNezcl3WOuSgp4_mudPEWNaoOO0,148468
|
|
273
271
|
QuantConnect/Util/RateLimit/__init__.py,sha256=_7bQ-8H-H1U158oAGyyV3m55AGLlgQb0OtFP6SY3iHM,1238
|
|
274
272
|
QuantConnect/Util/RateLimit/__init__.pyi,sha256=tLCI4KOfVEwnIJ1oPve0lrW8pXETbHSh6yYm9cdJ-no,9160
|
|
275
273
|
System/__init__.py,sha256=UOn_xefVV33RQ2aRTs0Za_LJKJn75shsI0U2nW4Eexo,1169
|
|
@@ -434,7 +432,7 @@ WasiPollWorld/wit/Imports/wasi/io/__init__.py,sha256=UHVnSx2PBkueGKn0ygTUkuvWIMG
|
|
|
434
432
|
WasiPollWorld/wit/Imports/wasi/io/v0_2_8/__init__.py,sha256=7gR2WzosGAhse1cSnYDdmswzm6OUdBvJQy_eKVXgPfA,1278
|
|
435
433
|
clr/__init__.pyi,sha256=21MB2O5_ACzDS7l56ETyFFH9c0TOSGov39Xs1a1r6ik,418
|
|
436
434
|
clr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
437
|
-
quantconnect_stubs-
|
|
438
|
-
quantconnect_stubs-
|
|
439
|
-
quantconnect_stubs-
|
|
440
|
-
quantconnect_stubs-
|
|
435
|
+
quantconnect_stubs-17842.dist-info/METADATA,sha256=cLg_UC2Ngx88EPa1xFZUmc0WKBRQ0HNzv741PRVgsfw,1504
|
|
436
|
+
quantconnect_stubs-17842.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
437
|
+
quantconnect_stubs-17842.dist-info/top_level.txt,sha256=dnLvN9aPYmCyGsxHctGYxOvwtHwWv2qLtsQnKDmqq-U,92
|
|
438
|
+
quantconnect_stubs-17842.dist-info/RECORD,,
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
# If quantconnect-stubs is installed via pip and Lean is ran locally,
|
|
5
|
-
# importing anything from the current namespace makes the Python
|
|
6
|
-
# interpreter look in the quantconnect-stubs package for the implementation.
|
|
7
|
-
#
|
|
8
|
-
# The desired behavior is for the interpreter to use the implementation
|
|
9
|
-
# provided by the AddReference() call from Python.NET.
|
|
10
|
-
#
|
|
11
|
-
# To fix this, we temporarily remove the directory containing the
|
|
12
|
-
# quantconnect-stubs package from sys.path and re-import the current namespace
|
|
13
|
-
# so the relevant C# namespace is used when running Lean locally.
|
|
14
|
-
|
|
15
|
-
# Find the directory containing quantconnect-stubs (usually site-packages)
|
|
16
|
-
current_path = os.path.dirname(__file__)
|
|
17
|
-
while os.path.basename(current_path) != "QuantConnect":
|
|
18
|
-
current_path = os.path.dirname(current_path)
|
|
19
|
-
current_path = os.path.dirname(current_path)
|
|
20
|
-
|
|
21
|
-
# Temporarily remove the directory containing quantconnect-stubs from sys.path
|
|
22
|
-
original_path = sys.path[:]
|
|
23
|
-
sys.path.remove(current_path)
|
|
24
|
-
|
|
25
|
-
# Import the C# version of the current namespace
|
|
26
|
-
del sys.modules["QuantConnect.Data.Common"]
|
|
27
|
-
from clr import AddReference
|
|
28
|
-
AddReference("QuantConnect.Data.Common")
|
|
29
|
-
from QuantConnect.Data.Common import *
|
|
30
|
-
|
|
31
|
-
# Restore sys.path
|
|
32
|
-
sys.path = original_path
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
from typing import overload
|
|
2
|
-
from enum import IntEnum
|
|
3
|
-
import datetime
|
|
4
|
-
import typing
|
|
5
|
-
|
|
6
|
-
import QuantConnect
|
|
7
|
-
import QuantConnect.Data
|
|
8
|
-
import QuantConnect.Data.Common
|
|
9
|
-
import QuantConnect.Data.Consolidators
|
|
10
|
-
import QuantConnect.Data.Market
|
|
11
|
-
import QuantConnect.Securities
|
|
12
|
-
import System
|
|
13
|
-
|
|
14
|
-
QuantConnect_Data_Common__EventContainer_Callable = typing.TypeVar("QuantConnect_Data_Common__EventContainer_Callable")
|
|
15
|
-
QuantConnect_Data_Common__EventContainer_ReturnType = typing.TypeVar("QuantConnect_Data_Common__EventContainer_ReturnType")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class MarketHourAwareConsolidator(System.Object, QuantConnect.Data.Consolidators.IDataConsolidator):
|
|
19
|
-
"""Consolidator for open markets bar only, extended hours bar are not consolidated."""
|
|
20
|
-
|
|
21
|
-
@property
|
|
22
|
-
def period(self) -> datetime.timedelta:
|
|
23
|
-
"""
|
|
24
|
-
The consolidation period requested
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
This Property is protected.
|
|
28
|
-
"""
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
@property
|
|
32
|
-
def consolidator(self) -> QuantConnect.Data.Consolidators.IDataConsolidator:
|
|
33
|
-
"""
|
|
34
|
-
The consolidator instance
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
This Property is protected.
|
|
38
|
-
"""
|
|
39
|
-
...
|
|
40
|
-
|
|
41
|
-
@property
|
|
42
|
-
def exchange_hours(self) -> QuantConnect.Securities.SecurityExchangeHours:
|
|
43
|
-
"""
|
|
44
|
-
The associated security exchange hours instance
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
This Property is protected.
|
|
48
|
-
"""
|
|
49
|
-
...
|
|
50
|
-
|
|
51
|
-
@exchange_hours.setter
|
|
52
|
-
def exchange_hours(self, value: QuantConnect.Securities.SecurityExchangeHours) -> None:
|
|
53
|
-
...
|
|
54
|
-
|
|
55
|
-
@property
|
|
56
|
-
def data_time_zone(self) -> typing.Any:
|
|
57
|
-
"""
|
|
58
|
-
The associated data time zone
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
This Property is protected.
|
|
62
|
-
"""
|
|
63
|
-
...
|
|
64
|
-
|
|
65
|
-
@data_time_zone.setter
|
|
66
|
-
def data_time_zone(self, value: typing.Any) -> None:
|
|
67
|
-
...
|
|
68
|
-
|
|
69
|
-
@property
|
|
70
|
-
def consolidated(self) -> QuantConnect.Data.IBaseData:
|
|
71
|
-
"""
|
|
72
|
-
Gets the most recently consolidated piece of data. This will be null if this consolidator
|
|
73
|
-
has not produced any data yet.
|
|
74
|
-
"""
|
|
75
|
-
...
|
|
76
|
-
|
|
77
|
-
@property
|
|
78
|
-
def input_type(self) -> typing.Type:
|
|
79
|
-
"""Gets the type consumed by this consolidator"""
|
|
80
|
-
...
|
|
81
|
-
|
|
82
|
-
@property
|
|
83
|
-
def working_data(self) -> QuantConnect.Data.IBaseData:
|
|
84
|
-
"""Gets a clone of the data being currently consolidated"""
|
|
85
|
-
...
|
|
86
|
-
|
|
87
|
-
@property
|
|
88
|
-
def output_type(self) -> typing.Type:
|
|
89
|
-
"""Gets the type produced by this consolidator"""
|
|
90
|
-
...
|
|
91
|
-
|
|
92
|
-
@property
|
|
93
|
-
def data_consolidated(self) -> _EventContainer[typing.Callable[[System.Object, QuantConnect.Data.IBaseData], typing.Any], typing.Any]:
|
|
94
|
-
"""Event handler that fires when a new piece of data is produced"""
|
|
95
|
-
...
|
|
96
|
-
|
|
97
|
-
@data_consolidated.setter
|
|
98
|
-
def data_consolidated(self, value: _EventContainer[typing.Callable[[System.Object, QuantConnect.Data.IBaseData], typing.Any], typing.Any]) -> None:
|
|
99
|
-
...
|
|
100
|
-
|
|
101
|
-
def __init__(self, daily_strict_end_time_enabled: bool, resolution: QuantConnect.Resolution, data_type: typing.Type, tick_type: QuantConnect.TickType, extended_market_hours: bool) -> None:
|
|
102
|
-
"""
|
|
103
|
-
Initializes a new instance of the MarketHourAwareConsolidator class.
|
|
104
|
-
|
|
105
|
-
:param resolution: The resolution.
|
|
106
|
-
:param data_type: The target data type
|
|
107
|
-
:param tick_type: The target tick type
|
|
108
|
-
:param extended_market_hours: True if extended market hours should be consolidated
|
|
109
|
-
"""
|
|
110
|
-
...
|
|
111
|
-
|
|
112
|
-
def create_consolidator(self, resolution: QuantConnect.Resolution, data_type: typing.Type, tick_type: QuantConnect.TickType) -> QuantConnect.Data.Consolidators.IDataConsolidator:
|
|
113
|
-
"""
|
|
114
|
-
Creates the inner consolidator that produces the requested data_type output.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
This Class is protected.
|
|
118
|
-
"""
|
|
119
|
-
...
|
|
120
|
-
|
|
121
|
-
def daily_strict_end_time(self, date_time: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Data.Consolidators.CalendarInfo:
|
|
122
|
-
"""
|
|
123
|
-
Determines a bar start time and period
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
This Class is protected.
|
|
127
|
-
"""
|
|
128
|
-
...
|
|
129
|
-
|
|
130
|
-
def dispose(self) -> None:
|
|
131
|
-
"""Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources."""
|
|
132
|
-
...
|
|
133
|
-
|
|
134
|
-
def forward_consolidated_bar(self, sender: typing.Any, consolidated: QuantConnect.Data.IBaseData) -> None:
|
|
135
|
-
"""
|
|
136
|
-
Will forward the underlying consolidated bar to consumers on this object
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
This Class is protected.
|
|
140
|
-
"""
|
|
141
|
-
...
|
|
142
|
-
|
|
143
|
-
def initialize(self, data: QuantConnect.Data.IBaseData) -> None:
|
|
144
|
-
"""
|
|
145
|
-
Perform late initialization based on the datas symbol
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
This Class is protected.
|
|
149
|
-
"""
|
|
150
|
-
...
|
|
151
|
-
|
|
152
|
-
def reset(self) -> None:
|
|
153
|
-
"""Resets the consolidator"""
|
|
154
|
-
...
|
|
155
|
-
|
|
156
|
-
def scan(self, current_local_time: typing.Union[datetime.datetime, datetime.date]) -> None:
|
|
157
|
-
"""
|
|
158
|
-
Scans this consolidator to see if it should emit a bar due to time passing
|
|
159
|
-
|
|
160
|
-
:param current_local_time: The current time in the local time zone (same as QuantConnect.Data.BaseData.Time)
|
|
161
|
-
"""
|
|
162
|
-
...
|
|
163
|
-
|
|
164
|
-
def update(self, data: QuantConnect.Data.IBaseData) -> None:
|
|
165
|
-
"""
|
|
166
|
-
Updates this consolidator with the specified data
|
|
167
|
-
|
|
168
|
-
:param data: The new data for the consolidator
|
|
169
|
-
"""
|
|
170
|
-
...
|
|
171
|
-
|
|
172
|
-
def use_strict_end_time(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> bool:
|
|
173
|
-
"""
|
|
174
|
-
Useful for testing
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
This Class is protected.
|
|
178
|
-
"""
|
|
179
|
-
...
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
class _EventContainer(typing.Generic[QuantConnect_Data_Common__EventContainer_Callable, QuantConnect_Data_Common__EventContainer_ReturnType]):
|
|
183
|
-
"""This class is used to provide accurate autocomplete on events and cannot be imported."""
|
|
184
|
-
|
|
185
|
-
def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> QuantConnect_Data_Common__EventContainer_ReturnType:
|
|
186
|
-
"""Fires the event."""
|
|
187
|
-
...
|
|
188
|
-
|
|
189
|
-
def __iadd__(self, item: QuantConnect_Data_Common__EventContainer_Callable) -> typing.Self:
|
|
190
|
-
"""Registers an event handler."""
|
|
191
|
-
...
|
|
192
|
-
|
|
193
|
-
def __isub__(self, item: QuantConnect_Data_Common__EventContainer_Callable) -> typing.Self:
|
|
194
|
-
"""Unregisters an event handler."""
|
|
195
|
-
...
|
|
196
|
-
|
|
197
|
-
|
|
File without changes
|
|
File without changes
|