Lean
$LEAN_TAG$
|
Encapsulates the storage of insights. More...
Public Member Functions | |
InsightManager (IAlgorithm algorithm) | |
Creates a new instance More... | |
void | Step (DateTime utcNow) |
Process a new time step handling insights scoring More... | |
void | SetInsightScoreFunction (IInsightScoreFunction insightScoreFunction) |
Sets the insight score function to use More... | |
void | SetInsightScoreFunction (PyObject insightScoreFunction) |
Sets the insight score function to use More... | |
void | Expire (IEnumerable< Symbol > symbols) |
Expire the insights of the given symbols More... | |
void | Cancel (IEnumerable< Symbol > symbols) |
Cancel the insights of the given symbols More... | |
void | Expire (IEnumerable< Insight > insights) |
Expire the given insights More... | |
void | Cancel (IEnumerable< Insight > insights) |
Cancel the given insights More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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... | |
Encapsulates the storage of insights.
Definition at line 26 of file InsightManager.cs.
QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.InsightManager | ( | IAlgorithm | algorithm | ) |
Creates a new instance
algorithm | The associated algorithm instance |
Definition at line 35 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Step | ( | DateTime | utcNow | ) |
Process a new time step handling insights scoring
utcNow | The current utc time |
Definition at line 44 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.SetInsightScoreFunction | ( | IInsightScoreFunction | insightScoreFunction | ) |
Sets the insight score function to use
insightScoreFunction | Model that scores insights |
Definition at line 53 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.SetInsightScoreFunction | ( | PyObject | insightScoreFunction | ) |
Sets the insight score function to use
insightScoreFunction | Model that scores insights |
Definition at line 62 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Expire | ( | IEnumerable< Symbol > | symbols | ) |
Expire the insights of the given symbols
symbols | Symbol we want to expire insights for |
Definition at line 79 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Cancel | ( | IEnumerable< Symbol > | symbols | ) |
Cancel the insights of the given symbols
symbols | Symbol we want to cancel insights for |
Definition at line 99 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Expire | ( | IEnumerable< Insight > | insights | ) |
Expire the given insights
insights | Insights to expire |
Definition at line 108 of file InsightManager.cs.
void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Cancel | ( | IEnumerable< Insight > | insights | ) |
Cancel the given insights
insights | Insights to cancel |
Definition at line 126 of file InsightManager.cs.