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:
Michael Handschuh
2019-09-29 23:58:20 -04:00
parent 8c1867193b
commit 362826988f
93 changed files with 987 additions and 365 deletions
@@ -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" />