diff --git a/zipline/history/history_container.py b/zipline/history/history_container.py index 35860d2311..8fc19b62c5 100644 --- a/zipline/history/history_container.py +++ b/zipline/history/history_container.py @@ -535,7 +535,7 @@ def add_sids(self, to_add): Add new sids to the container. """ self.sids = pd.Index( - sorted(self.sids + _ensure_index(to_add)), + sorted(self.sids.union(_ensure_index(to_add))), ) self._realign_sids() @@ -544,7 +544,7 @@ def drop_sids(self, to_drop): Remove sids from the container. """ self.sids = pd.Index( - sorted(self.sids - _ensure_index(to_drop)), + sorted(self.sids.difference(_ensure_index(to_drop))), ) self._realign_sids()