Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager Class Reference

Encapsulates the storage of insights. More...

Inheritance diagram for QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager:
[legend]

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...
 
- Public Member Functions inherited from QuantConnect.Algorithm.Framework.Alphas.InsightCollection
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< InsightGetEnumerator ()
 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< InsightGetActiveInsights (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< InsightRemoveExpiredInsights (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< InsightGetInsights (Func< Insight, bool > filter=null)
 Will return insights from the complete insight collection More...
 
List< InsightGetInsights (PyObject filter)
 Will return insights from the complete insight collection More...
 

Additional Inherited Members

- Properties inherited from QuantConnect.Algorithm.Framework.Alphas.InsightCollection
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...
 

Detailed Description

Encapsulates the storage of insights.

Definition at line 26 of file InsightManager.cs.

Constructor & Destructor Documentation

◆ InsightManager()

QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.InsightManager ( IAlgorithm  algorithm)

Creates a new instance

Parameters
algorithmThe associated algorithm instance

Definition at line 35 of file InsightManager.cs.

Member Function Documentation

◆ Step()

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Step ( DateTime  utcNow)

Process a new time step handling insights scoring

Parameters
utcNowThe current utc time

Definition at line 44 of file InsightManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetInsightScoreFunction() [1/2]

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.SetInsightScoreFunction ( IInsightScoreFunction  insightScoreFunction)

Sets the insight score function to use

Parameters
insightScoreFunctionModel that scores insights

Definition at line 53 of file InsightManager.cs.

Here is the caller graph for this function:

◆ SetInsightScoreFunction() [2/2]

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.SetInsightScoreFunction ( PyObject  insightScoreFunction)

Sets the insight score function to use

Parameters
insightScoreFunctionModel that scores insights

Definition at line 62 of file InsightManager.cs.

Here is the call graph for this function:

◆ Expire() [1/2]

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Expire ( IEnumerable< Symbol symbols)

Expire the insights of the given symbols

Parameters
symbolsSymbol we want to expire insights for

Definition at line 79 of file InsightManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cancel() [1/2]

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Cancel ( IEnumerable< Symbol symbols)

Cancel the insights of the given symbols

Parameters
symbolsSymbol we want to cancel insights for

Definition at line 99 of file InsightManager.cs.

Here is the call graph for this function:

◆ Expire() [2/2]

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Expire ( IEnumerable< Insight insights)

Expire the given insights

Parameters
insightsInsights to expire

Definition at line 108 of file InsightManager.cs.

◆ Cancel() [2/2]

void QuantConnect.Algorithm.Framework.Alphas.Analysis.InsightManager.Cancel ( IEnumerable< Insight insights)

Cancel the given insights

Parameters
insightsInsights to cancel

Definition at line 126 of file InsightManager.cs.

Here is the call graph for this function:

The documentation for this class was generated from the following file: