SpectralTickFlowSignalUniverse
QuantConnect.DataSource.SpectralTickFlowSignalUniverse
SpectralTickFlowSignalUniverse(
time: Union[datetime, date],
symbol: Union[Symbol, str, BaseContract, Security],
data: List[BaseData] = None,
)
SpectralTickFlowSignalUniverse(
time: Union[datetime, date],
end_time: Union[datetime, date],
symbol: Union[Symbol, str, BaseContract, Security],
data: List[BaseData] = None,
underlying: BaseData = None,
filtered_contracts: HashSet[Symbol] = None,
)
SpectralTickFlowSignalUniverse(
time: Union[datetime, date],
end_time: Union[datetime, date],
symbol: Union[Symbol, str, BaseContract, Security],
data: List[BaseData],
underlying: BaseData,
filtered_contracts: HashSet[Symbol],
)
SpectralTickFlowSignalUniverse(
time: Union[datetime, date],
end_time: Union[datetime, date],
symbol: Union[Symbol, str, BaseContract, Security],
underlying: BaseData,
filtered_contracts: HashSet[Symbol],
)
SpectralTickFlowSignalUniverse()
SpectralTickFlowSignalUniverse(other: BaseDataCollection)
Bases: BaseDataCollection
Universe-selection data for the Spectral Tick-Flow Signal dataset: one row per covered security per trading day. Files are keyed by publication date so each daily cross-section becomes selectable only after the signal observation period is complete.
Signature descriptions:
-
Initializes a new instance of the BaseDataCollection class
-
Helper method to create an instance without setting the data list
-
Initializes a new default instance of the BaseDataCollection c;ass
-
Copy constructor for BaseDataCollection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
Optional[Union[datetime, date]]
|
The time of this data |
None
|
symbol
|
Optional[Union[Symbol, str, BaseContract, Security]]
|
A common identifier for all data in this packet |
None
|
data
|
Optional[List[BaseData]]
|
The data to add to this collection |
None
|
end_time
|
Optional[Union[datetime, date]]
|
The end time of this data |
None
|
underlying
|
Optional[BaseData]
|
The associated underlying price data if any |
None
|
filtered_contracts
|
Optional[HashSet[Symbol]]
|
The contracts selected by the universe |
None
|
other
|
Optional[BaseDataCollection]
|
The base data collection being copied |
None
|
trade_count
trade_count: Optional[int]
Regular-trading-hours trade count for the security that day. Beyond gauging how active the tape was, it is the sample size behind every other field: the execution detector only runs on days with at least 3,000 trades, and small counts make all the statistics noisier. Also useful as a liquidity floor when selecting the universe.
volume_variance_explained
volume_variance_explained: Optional[float]
Share of the day's seasonally adjusted volume variation that pulsed at canonical execution intervals (10-300 seconds). Near zero means volume arrived without rhythm; higher values mean a clock-like volume pulse consistent with scheduled (TWAP-style) order slicing, so the field ranks names by how mechanical their volume flow was. Zero is also reported when the ticker lacks the few prior sessions needed to build its seasonal volume profile.
volume_dominant_period_seconds
volume_dominant_period_seconds: Optional[int]
The canonical interval (10, 15, 20, 30, 60 or 300 seconds) carrying the strongest periodic volume pulse - the cadence of the suspected slicing schedule, e.g. 60 means volume surged roughly once per minute. Zero when no periodic volume signal was detected.
execution_score
execution_score: float
Headline evidence that an execution algorithm was working the name: the size-specificity of the most periodic trade-size bucket multiplied by its phase coherence. Dimensionless and unbounded - single digits are unremarkable, tens and above indicate a clearly phase-locked, size-specific trade stream - and comparable across symbols, so it suits ranking the daily cross-section. Zero means the day had too few trades to analyze. Exposed through BaseData.value.
execution_period_seconds
execution_period_seconds: Optional[float]
Seconds between the periodic trade arrivals behind execution_score - the child-order spacing of the suspected execution schedule (3-300 second band). Zero when no candidate was found.
execution_size
execution_size: Optional[int]
Trade size, in shares, of the bucket where the periodicity was found - the likely child-order size the suspected algorithm was printing on the tape. Zero when no candidate was found.
execution_signed
execution_signed: Optional[bool]
True when the periodicity is strongest in tick-rule signed (net directional) flow rather than raw trade counts: the periodic prints lean one way, suggesting a one-sided parent order rather than direction-neutral activity - typically the more actionable case.
execution_rayleigh
execution_rayleigh: Optional[float]
Rayleigh phase-coherence statistic of the strongest signal - how precisely its trades stick to their clock. Values near 1 are consistent with random arrival times; 4 or more is the dataset's confirmation threshold, and the statistic keeps growing with regularity and trade count, so larger is stronger.
signature_count
signature_count: Optional[int]
Number of distinct trade-size candidates that passed every confirmation gate (spectral peak, size specificity and phase coherence) - roughly how many execution algorithms appeared to run simultaneously that day. Zero means nothing met the confirmation bar; the other fields then still describe the best unconfirmed candidate.
end_time
end_time: datetime
The time the universe row becomes available (the file's publication date). The Reader sets Time to the prior calendar day so EndTime, one calendar day later, lands on the publication date the file is keyed by. EndTime has no setter, so it can never overwrite Time.
data_type
data_type: MarketDataType
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
time
time: datetime
Current time marker of this data packet.
value
value: float
Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.
price
price: float
As this is a backtesting platform we'll provide an alias of value as price.
ALL_RESOLUTIONS
ALL_RESOLUTIONS: List[Resolution] = ...
A list of all Resolution
This Field is protected.
DAILY_RESOLUTION
DAILY_RESOLUTION: List[Resolution] = ...
A list of Resolution.DAILY
This Field is protected.
MINUTE_RESOLUTION
MINUTE_RESOLUTION: List[Resolution] = ...
A list of Resolution.MINUTE
This Field is protected.
HIGH_RESOLUTION
HIGH_RESOLUTION: List[Resolution] = ...
A list of high Resolution, including minute, second, and tick.
This Field is protected.
OPTION_RESOLUTIONS
OPTION_RESOLUTIONS: List[Resolution] = ...
A list of resolutions support by Options
This Field is protected.
is_fill_forward
is_fill_forward: bool
True if this is a fill forward piece of data
filtered_contracts
filtered_contracts: HashSet[Symbol]
Gets or sets the contracts selected by the universe
data_time_zone
data_time_zone() -> Any
Must match the main data model: America/New_York.
get_source
get_source(
config: SubscriptionDataConfig,
date: datetime,
is_live_mode: bool,
) -> SubscriptionDataSource
Locates the date-keyed universe file. Uses FoldingCollection so LEAN calls Reader once per line and folds the rows into the cross-section passed to the universe-selection function.
is_sparse_data
is_sparse_data() -> bool
Not every date has a universe file, so the data is sparse.
reader
reader(
config: SubscriptionDataConfig,
line: str,
date: datetime,
is_live_mode: bool,
) -> BaseData
Parses one universe row. Column 0 is the security identifier, column 1 the point-in-time ticker.
requires_mapping
requires_mapping() -> bool
Linked to US equities, which rename through time, so mapping is required.
to_string
to_string() -> str
Human-readable representation for debugging.
deserialize_message
deserialize_message(serialized: str) -> Sequence[BaseData]
Deserialize the message from the data server
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
serialized
|
str
|
The data server's message |
required |
Returns:
| Type | Description |
|---|---|
Sequence[BaseData]
|
An enumerable of base data, if unsuccessful, returns an empty enumerable. |
should_cache_to_security
should_cache_to_security() -> bool
Indicates whether this contains data that should be stored in the security cache
Returns:
| Type | Description |
|---|---|
bool
|
Whether this contains data that should be stored in the security cache. |
update
update(
last_trade: float,
bid_price: float,
ask_price: float,
volume: float,
bid_size: float,
ask_size: float,
) -> None
Update routine to build a bar/tick from a data update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
last_trade
|
float
|
The last trade price |
required |
bid_price
|
float
|
Current bid price |
required |
ask_price
|
float
|
Current asking price |
required |
volume
|
float
|
Volume of this trade |
required |
bid_size
|
float
|
The size of the current bid, if available |
required |
ask_size
|
float
|
The size of the current ask, if available |
required |
update_ask
update_ask(ask_price: float, ask_size: float) -> None
Updates this base data with the new quote ask information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ask_price
|
float
|
The current ask price |
required |
ask_size
|
float
|
The current ask size |
required |
update_bid
update_bid(bid_price: float, bid_size: float) -> None
Updates this base data with the new quote bid information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bid_price
|
float
|
The current bid price |
required |
bid_size
|
float
|
The current bid size |
required |
update_quote
update_quote(
bid_price: float,
bid_size: float,
ask_price: float,
ask_size: float,
) -> None
Updates this base data with new quote information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bid_price
|
float
|
The current bid price |
required |
bid_size
|
float
|
The current bid size |
required |
ask_price
|
float
|
The current ask price |
required |
ask_size
|
float
|
The current ask size |
required |
update_trade
update_trade(last_trade: float, trade_size: float) -> None
Updates this base data with a new trade
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
last_trade
|
float
|
The price of the last trade |
required |
trade_size
|
float
|
The quantity traded |
required |
add
add(new_data_point: BaseData) -> None
Adds a new data point to this collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_data_point
|
BaseData
|
The new data point to add |
required |
add_range
add_range(new_data_points: List[BaseData]) -> None
Adds a new data points to this collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_data_points
|
List[BaseData]
|
The new data points to add |
required |
get_enumerator
get_enumerator() -> IEnumerator[BaseData]
Returns an IEnumerator for this enumerable Object. The enumerator provides a simple way to access all the contents of a collection.