Improve DynamicSecurityData usability
Adds IRegisteredSecurityDataTypesProvider to track all the data types registered in the algorithm. Using this data, we can detect if it's possible that we'll eventually have a property of a certain type name. For example, consider I wish to use security.Data.TradeBar but we haven't received any trade bars yet. Before this change a KeyNotFoundException would be raised, but since we can determine that we expect to have trade bars, we can detect this and return an empty list when we haven't received any data yet. This also removes the need to constantly do a HasData<T>() check before accessing the dynamic members. Closes #3620
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
<None Include="CustomDataAddDataRegressionAlgorithm.py" />
|
||||
<Content Include="CustomDataAddDataOnSecuritiesChangedRegressionAlgorithm.py" />
|
||||
<Content Include="CustomDataAddDataCoarseSelectionRegressionAlgorithm.py" />
|
||||
<Content Include="DynamicSecurityDataAlgorithm.py" />
|
||||
<Content Include="KerasNeuralNetworkAlgorithm.py" />
|
||||
<None Include="PsychSignalSentimentRegressionAlgorithm.py" />
|
||||
<Content Include="CustomDataUsingMapFileRegressionAlgorithm.py" />
|
||||
|
||||
Reference in New Issue
Block a user