Address reviews
Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Remove IAlphaHandler, move insight storage responsability to IResultHandler and centralizing insight collection on the QCAlgorithm.Insights to be reused by the framework models - Fix portfolio turnover single day backtests and duplicate time sampling handling. Updating regression algorithms
This commit is contained in:
@@ -33,7 +33,7 @@ class InsightScoringRegressionAlgorithm(QCAlgorithm):
|
||||
self.SetRiskManagement(MaximumDrawdownPercentPerSecurity(0.01))
|
||||
|
||||
# we specify a custom insight evaluator
|
||||
self.SetInsightEvaluator(CustomInsightEvaluatorPy(self.Securities))
|
||||
self.Insights.SetInsightScoreFunction(CustomInsightScoreFunction(self.Securities))
|
||||
|
||||
def OnEndOfAlgorithm(self):
|
||||
allInsights = self.InsightManager.GetInsights()
|
||||
@@ -47,7 +47,7 @@ class InsightScoringRegressionAlgorithm(QCAlgorithm):
|
||||
if sum(1 for insight in allInsights if insight.Score.IsFinalScore) < 99:
|
||||
raise ValueError(f'Insights not finalized!')
|
||||
|
||||
class CustomInsightEvaluatorPy():
|
||||
class CustomInsightScoreFunction():
|
||||
|
||||
def __init__(self, securities):
|
||||
self._securities = securities
|
||||
@@ -70,6 +70,7 @@ class CustomInsightEvaluatorPy():
|
||||
openInsight.EstimatedValue = score * 100
|
||||
|
||||
if openInsight.IsExpired(utcTime):
|
||||
openInsight.Score.Finalize(utcTime)
|
||||
toRemove.append(openInsight)
|
||||
|
||||
# clean up
|
||||
|
||||
Reference in New Issue
Block a user