Lean
$LEAN_TAG$
|
Provides an implementation of IPortfolioConstructionModel that does nothing More...
Public Member Functions | |
override IEnumerable< IPortfolioTarget > | CreateTargets (QCAlgorithm algorithm, Insight[] insights) |
Create Targets; Does nothing in this implementation and returns an empty IEnumerable More... | |
Public Member Functions inherited from QuantConnect.Algorithm.Framework.Portfolio.PortfolioConstructionModel | |
PortfolioConstructionModel (Func< DateTime, DateTime?> rebalancingFunc) | |
Initialize a new instance of PortfolioConstructionModel More... | |
PortfolioConstructionModel (Func< DateTime, DateTime > rebalancingFunc=null) | |
Initialize a new instance of PortfolioConstructionModel More... | |
virtual void | OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes) |
Event fired each time the we add/remove securities from the data feed More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QuantConnect.Algorithm.Framework.Portfolio.PortfolioConstructionModel | |
void | SetPythonWrapper (PortfolioConstructionModelPythonWrapper pythonWrapper) |
Used to set the PortfolioConstructionModelPythonWrapper instance if any More... | |
virtual List< Insight > | GetTargetInsights () |
Gets the target insights to calculate a portfolio target percent for More... | |
virtual bool | ShouldCreateTargetForInsight (Insight insight) |
Method that will determine if the portfolio construction model should create a target for this insight More... | |
virtual Dictionary< Insight, double > | DetermineTargetPercent (List< Insight > activeInsights) |
Will determine the target percent for each insight More... | |
void | SetRebalancingFunc (PyObject rebalance) |
Python helper method to set the rebalancing function. This is required due to a python net limitation not being able to use the base type constructor, and also because when python algorithms use C# portfolio construction models, it can't convert python methods into func nor resolve the correct constructor for the date rules, timespan parameter. For performance we prefer python algorithms using the C# implementation More... | |
virtual bool | IsRebalanceDue (Insight[] insights, DateTime algorithmUtc) |
Determines if the portfolio should be rebalanced base on the provided rebalancing func, if any security change have been taken place or if an insight has expired or a new insight arrived If the rebalancing function has not been provided will return true. More... | |
void | RefreshRebalance (DateTime algorithmUtc) |
Refresh the next rebalance time and clears the security changes flag More... | |
Static Protected Member Functions inherited from QuantConnect.Algorithm.Framework.Portfolio.PortfolioConstructionModel | |
static Insight[] | FilterInvalidInsightMagnitude (IAlgorithm algorithm, Insight[] insights) |
Helper class that can be used by the different IPortfolioConstructionModel implementations to filter Insight instances with an invalid Insight.Magnitude value based on the IAlgorithmSettings More... | |
Protected Attributes inherited from QuantConnect.Algorithm.Framework.Portfolio.PortfolioConstructionModel | |
PortfolioConstructionModelPythonWrapper | PythonWrapper |
This is required due to a limitation in PythonNet to resolved overriden methods. When Python calls a C# method that calls a method that's overriden in python it won't run the python implementation unless the call is performed through python too. More... | |
Properties inherited from QuantConnect.Algorithm.Framework.Portfolio.PortfolioConstructionModel | |
virtual bool | RebalanceOnSecurityChanges = true [get, set] |
True if should rebalance portfolio on security changes. True by default More... | |
virtual bool | RebalanceOnInsightChanges = true [get, set] |
True if should rebalance portfolio on new insights or expiration of insights. True by default More... | |
IAlgorithm | Algorithm [get] |
The algorithm instance More... | |
Provides an implementation of IPortfolioConstructionModel that does nothing
Definition at line 25 of file NullPortfolioConstructionModel.cs.
|
virtual |
Create Targets; Does nothing in this implementation and returns an empty IEnumerable
Reimplemented from QuantConnect.Algorithm.Framework.Portfolio.PortfolioConstructionModel.
Definition at line 31 of file NullPortfolioConstructionModel.cs.