mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 04:06:08 +08:00
BUG: Return from can_trade in same order as input.
This matches the behavior of history and data.current.
This commit is contained in:
@@ -480,12 +480,13 @@ cdef class BarData:
|
||||
assets, dt, adjusted_dt, data_portal
|
||||
)
|
||||
else:
|
||||
return pd.Series(data={
|
||||
asset: self._can_trade_for_asset(
|
||||
tradeable = [
|
||||
self._can_trade_for_asset(
|
||||
asset, dt, adjusted_dt, data_portal
|
||||
)
|
||||
for asset in assets
|
||||
})
|
||||
]
|
||||
return pd.Series(data=tradeable, index=assets)
|
||||
|
||||
cdef bool _can_trade_for_asset(self, asset, dt, adjusted_dt, data_portal):
|
||||
cdef object session_label
|
||||
|
||||
Reference in New Issue
Block a user