ExtendedDictionary improvements (#8723)
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled

* Make ExtendedDictionary extend IDictionary

* Revert "Make ExtendedDictionary extend IDictionary"

This reverts commit bbbe9c769be682767cb9e487b904480376b53596.

* Make ExtendedDictionary key a type parameter

* Make SecurityPositionGroupModel an ExtendedDictionary

* Add unit tests

* Minor change

* Add more unit tests and other minor changes

* Add Count and ContainsKey to BaseChain

* Update pythonnet version to 2.0.43

* Update some python regression algorithms

* Minor regression algorithms fix

* Make CashBook and ExtendedDictionary

* Minor changes

* Minor changes

* Update pythonnet version to 2.0.44
This commit is contained in:
Jhonathan Abreu
2025-05-02 11:02:06 -04:00
committed by GitHub
parent 4e13189787
commit 053c9a20c4
36 changed files with 468 additions and 393 deletions
@@ -12,7 +12,6 @@
# limitations under the License.
from AlgorithmImports import *
from System.Collections.Generic import List
from QuantConnect.Data.Custom.IconicTypes import *
### <summary>
@@ -28,24 +27,24 @@ class DynamicSecurityDataRegressionAlgorithm(QCAlgorithm):
self._equity = self.add_equity(ticker, Resolution.DAILY)
custom_linked_equity = self.add_data(LinkedData, ticker, Resolution.DAILY)
first_linked_data = LinkedData()
first_linked_data.count = 100
first_linked_data.symbol = custom_linked_equity.symbol
first_linked_data.end_time = self.start_date
second_linked_data = LinkedData()
second_linked_data.count = 100
second_linked_data.symbol = custom_linked_equity.symbol
second_linked_data.end_time = self.start_date
# Adding linked data manually to cache for example purposes, since
# LinkedData is a type used for testing and doesn't point to any real data.
custom_linked_equity_type = list(custom_linked_equity.subscriptions)[0].type
custom_linked_data = List[LinkedData]()
custom_linked_data.add(first_linked_data)
custom_linked_data.add(second_linked_data)
self._equity.cache.add_data_list(custom_linked_data, custom_linked_equity_type, False)
custom_linked_data = list[LinkedData]()
custom_linked_data.append(first_linked_data)
custom_linked_data.append(second_linked_data)
self._equity.cache.add_data_list(custom_linked_data, custom_linked_equity_type, False)
def on_data(self, data):
# The Security object's Data property provides convenient access