Files
quantconnect--lean/Common/Algorithm/Framework/Alphas/IInsightManagerExtension.cs
Michael Handschuh 6b239674e2 Renames Alpha -> Insight
The term 'alpha' is used to describe the entire algorithm. Therefore, 'alpha'
produces insights. From this we have things like IAlphaModel, which is the model
defining how insights are produced. We have IAlphaHandler, which defines how the
insights from a single 'alpha' (the algorithm) are managed, analyzed, and stored.
Types closer to the individual prediction level, such as InsightDirection, or
InsightScore relate directly to exactly 1 insight. The distinction between the
two became more clear as we developed the insights API, and from that effort it
was decided to harmonize alpha/insight terminology across the various QC systems.
2018-03-09 16:12:56 -05:00

45 lines
2.0 KiB
C#

using System;
using QuantConnect.Algorithm.Framework.Alphas.Analysis;
using QuantConnect.Interfaces;
namespace QuantConnect.Algorithm.Framework.Alphas
{
/// <summary>
/// Abstraction point to handle the various concerns from a common api.
/// At the time of writing, these concerns are charting, scoring, perisistence and messaging.
/// </summary>
public interface IInsightManagerExtension
{
/// <summary>
/// Invokes the manager at the end of the time step.
/// </summary>
/// <param name="frontierTimeUtc">The current frontier time utc</param>
void Step(DateTime frontierTimeUtc);
/// <summary>
/// Allows the extension to initialize itself over the expected range
/// </summary>
/// <param name="algorithmStartDate">The start date of the algorithm</param>
/// <param name="algorithmEndDate">The end date of the algorithm</param>
/// <param name="algorithmUtcTime">The algorithm's current utc time</param>
void InitializeForRange(DateTime algorithmStartDate, DateTime algorithmEndDate, DateTime algorithmUtcTime);
/// <summary>
/// Invoked when the insight manager first received a generated insight from the algorithm
/// </summary>
/// <param name="context">Context whose insight has just generated</param>
void OnInsightGenerated(InsightAnalysisContext context);
/// <summary>
/// Invoked when the insight manager detects that an insight has closed (frontier has passed insight period)
/// </summary>
/// <param name="context">Context whose insight has just closed</param>
void OnInsightClosed(InsightAnalysisContext context);
/// <summary>
/// Invoked when the insight manager has completed analysis on an insight
/// </summary>
/// <param name="context">Context whose insight has just completed analysis</param>
void OnInsightAnalysisCompleted(InsightAnalysisContext context);
}
}