Fixes EqualWeightingPortfolioConstructionModel logic

`EqualEeightingPortfolioConstructionModel` (C# and Python) allocates all cash to the stocks who have insights in universe.
- Fixes regression tests to reflect the model logic change
- Fixes imports in python algorithms to use python models when available
This commit is contained in:
AlexCatarino
2018-05-21 19:39:05 +01:00
parent ee4a548dfe
commit 595700e340
6 changed files with 103 additions and 73 deletions
@@ -21,9 +21,9 @@ from QuantConnect import *
from QuantConnect.Orders import *
from QuantConnect.Algorithm import *
from QuantConnect.Algorithm.Framework import *
from QuantConnect.Algorithm.Framework.Portfolio import *
from QuantConnect.Algorithm.Framework.Selection import *
from Alphas.RsiAlphaModel import RsiAlphaModel
from Portfolio.EqualWeightingPortfolioConstructionModel import EqualWeightingPortfolioConstructionModel
from Execution.StandardDeviationExecutionModel import StandardDeviationExecutionModel
from datetime import timedelta
@@ -62,4 +62,4 @@ class StandardDeviationExecutionModelRegressionAlgorithm(QCAlgorithmFramework):
self.SetExecution(StandardDeviationExecutionModel())
def OnOrderEvent(self, orderEvent):
self.Log("{}: {}".format(self.Time, orderEvent))
self.Log(f"{self.Time}: {orderEvent}")