Lean
$LEAN_TAG$
|
Provides a collection for managing insights. This type provides collection access semantics as well as dictionary access semantics through TryGetValue, ContainsKey, and this[symbol] More...
Public Member Functions | |
void | Add (Insight item) |
Adds an item to the T:System.Collections.Generic.ICollection`1. More... | |
void | AddRange (IEnumerable< Insight > insights) |
Adds each item in the specified enumerable of insights to this collection More... | |
bool | Contains (Insight item) |
Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value. More... | |
bool | ContainsKey (Symbol symbol) |
Determines whether insights exist in this collection for the specified symbol More... | |
bool | Remove (Insight item) |
Removes the first occurrence of a specific object from the T:System.Collections.Generic.ICollection`1. More... | |
bool | TryGetValue (Symbol symbol, out List< Insight > insights) |
Attempts to get the list of insights with the specified symbol key More... | |
IEnumerator< Insight > | GetEnumerator () |
Returns an enumerator that iterates through the collection. More... | |
void | Clear (Symbol[] symbols) |
Removes the symbol and its insights More... | |
DateTime? | GetNextExpiryTime () |
Gets the next expiry time UTC More... | |
ICollection< Insight > | GetActiveInsights (DateTime utcTime) |
Gets the last generated active insight More... | |
bool | HasActiveInsights (Symbol symbol, DateTime utcTime) |
Returns true if there are active insights for a given symbol and time More... | |
ICollection< Insight > | RemoveExpiredInsights (DateTime utcTime) |
Remove all expired insights from the collection and retuns them More... | |
void | RemoveInsights (Func< Insight, bool > filter) |
Will remove insights from the complete insight collection More... | |
List< Insight > | GetInsights (Func< Insight, bool > filter=null) |
Will return insights from the complete insight collection More... | |
List< Insight > | GetInsights (PyObject filter) |
Will return insights from the complete insight collection More... | |
Properties | |
int | Count [get] |
The open insight count More... | |
int | TotalCount [get] |
The total insight count More... | |
List< Insight >???? | this[Symbol symbol] [get, set] |
Dictionary accessor returns a list of insights for the specified symbol More... | |
Provides a collection for managing insights. This type provides collection access semantics as well as dictionary access semantics through TryGetValue, ContainsKey, and this[symbol]
Definition at line 28 of file InsightCollection.cs.
void QuantConnect.Algorithm.Framework.Alphas.InsightCollection.Add | ( | Insight | item | ) |
Adds an item to the T:System.Collections.Generic.ICollection`1.
item | The object to add to the T:System.Collections.Generic.ICollection`1. |
T:System.NotSupportedException | The T:System.Collections.Generic.ICollection`1 is read-only. |
Definition at line 66 of file InsightCollection.cs.
void QuantConnect.Algorithm.Framework.Alphas.InsightCollection.AddRange | ( | IEnumerable< Insight > | insights | ) |
Adds each item in the specified enumerable of insights to this collection
insights | The insights to add to this collection |
Definition at line 87 of file InsightCollection.cs.
bool QuantConnect.Algorithm.Framework.Alphas.InsightCollection.Contains | ( | Insight | item | ) |
Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value.
item | The object to locate in the T:System.Collections.Generic.ICollection`1. |
Definition at line 98 of file InsightCollection.cs.
bool QuantConnect.Algorithm.Framework.Alphas.InsightCollection.ContainsKey | ( | Symbol | symbol | ) |
Determines whether insights exist in this collection for the specified symbol
symbol | The symbol key |
Definition at line 112 of file InsightCollection.cs.
bool QuantConnect.Algorithm.Framework.Alphas.InsightCollection.Remove | ( | Insight | item | ) |
Removes the first occurrence of a specific object from the T:System.Collections.Generic.ICollection`1.
item | The object to remove from the T:System.Collections.Generic.ICollection`1. |
T:System.NotSupportedException | The T:System.Collections.Generic.ICollection`1 is read-only. |
Definition at line 125 of file InsightCollection.cs.
bool QuantConnect.Algorithm.Framework.Alphas.InsightCollection.TryGetValue | ( | Symbol | symbol, |
out List< Insight > | insights | ||
) |
Attempts to get the list of insights with the specified symbol key
symbol | The symbol key |
insights | The insights for the specified symbol, or null if not found |
Definition at line 187 of file InsightCollection.cs.
IEnumerator<Insight> QuantConnect.Algorithm.Framework.Alphas.InsightCollection.GetEnumerator | ( | ) |
Returns an enumerator that iterates through the collection.
<filterpriority>1</filterpriority>
Definition at line 204 of file InsightCollection.cs.
void QuantConnect.Algorithm.Framework.Alphas.InsightCollection.Clear | ( | Symbol[] | symbols | ) |
Removes the symbol and its insights
symbols | List of symbols that will be removed |
Definition at line 224 of file InsightCollection.cs.
DateTime? QuantConnect.Algorithm.Framework.Alphas.InsightCollection.GetNextExpiryTime | ( | ) |
Gets the next expiry time UTC
Definition at line 241 of file InsightCollection.cs.
ICollection<Insight> QuantConnect.Algorithm.Framework.Alphas.InsightCollection.GetActiveInsights | ( | DateTime | utcTime | ) |
Gets the last generated active insight
Definition at line 259 of file InsightCollection.cs.
bool QuantConnect.Algorithm.Framework.Alphas.InsightCollection.HasActiveInsights | ( | Symbol | symbol, |
DateTime | utcTime | ||
) |
Returns true if there are active insights for a given symbol and time
symbol | The symbol key |
utcTime | Time that determines whether the insight has expired |
Definition at line 284 of file InsightCollection.cs.
ICollection<Insight> QuantConnect.Algorithm.Framework.Alphas.InsightCollection.RemoveExpiredInsights | ( | DateTime | utcTime | ) |
Remove all expired insights from the collection and retuns them
utcTime | Time that determines whether the insight has expired |
Definition at line 301 of file InsightCollection.cs.
void QuantConnect.Algorithm.Framework.Alphas.InsightCollection.RemoveInsights | ( | Func< Insight, bool > | filter | ) |
Will remove insights from the complete insight collection
filter | The function that will determine which insight to remove |
Definition at line 328 of file InsightCollection.cs.
List<Insight> QuantConnect.Algorithm.Framework.Alphas.InsightCollection.GetInsights | ( | Func< Insight, bool > | filter = null | ) |
Will return insights from the complete insight collection
filter | The function that will determine which insight to return |
Definition at line 362 of file InsightCollection.cs.
List<Insight> QuantConnect.Algorithm.Framework.Alphas.InsightCollection.GetInsights | ( | PyObject | filter | ) |
Will return insights from the complete insight collection
filter | The function that will determine which insight to return |
Definition at line 379 of file InsightCollection.cs.
|
get |
The open insight count
Definition at line 39 of file InsightCollection.cs.
|
get |
The total insight count
Definition at line 53 of file InsightCollection.cs.
|
getset |
Dictionary accessor returns a list of insights for the specified symbol
symbol | The symbol key |
Definition at line 154 of file InsightCollection.cs.