/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using System.Collections.Generic; using QuantConnect.Data; using QuantConnect.Data.UniverseSelection; using QuantConnect.Interfaces; namespace QuantConnect.Lean.Engine.DataFeeds { /// /// Represents a grouping of data emitted at a certain time. /// public class TimeSlice { /// /// Gets the count of data points in this /// public int DataPointCount { get; } /// /// Gets the UTC time this data was emitted /// public DateTime Time { get; } /// /// Gets the data in the time slice /// public List Data { get; } /// /// Gets the that will be used as input for the algorithm /// public Slice Slice { get; } /// /// Gets the data used to update securities /// public List> SecuritiesUpdateData { get; } /// /// Gets the data used to update the consolidators /// public List> ConsolidatorUpdateData { get; } /// /// Gets all the custom data in this /// public List> CustomData { get; } /// /// Gets the changes to the data subscriptions as a result of universe selection /// public SecurityChanges SecurityChanges { get; } /// /// Gets the universe data generated this time step. /// public Dictionary UniverseData { get; } /// /// True indicates this time slice is a time pulse for the algorithm containing no data /// public bool IsTimePulse { get; } /// /// Initializes a new containing the specified data /// public TimeSlice(DateTime time, int dataPointCount, Slice slice, List data, List> securitiesUpdateData, List> consolidatorUpdateData, List> customData, SecurityChanges securityChanges, Dictionary universeData, bool isTimePulse = false) { Time = time; Data = data; Slice = slice; CustomData = customData; DataPointCount = dataPointCount; SecuritiesUpdateData = securitiesUpdateData; ConsolidatorUpdateData = consolidatorUpdateData; SecurityChanges = securityChanges; UniverseData = universeData; IsTimePulse = isTimePulse; } } }