1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-17 01:14:35 +08:00

fix bug in Exchange

This commit is contained in:
bxdd
2021-06-22 15:03:05 +08:00
parent 4ac6e6e246
commit ab97e82484
4 changed files with 23 additions and 14 deletions

View File

@@ -174,8 +174,8 @@ class Exchange:
self.quote = quote_dict
def _update_limit(self, buy_limit, sell_limit):
self.quote["limit_buy"] = ~self.quote["$change"].lt(buy_limit)
self.quote["limit_sell"] = ~self.quote["$change"].gt(-sell_limit)
self.quote["limit_buy"] = self.quote["$change"].ge(buy_limit)
self.quote["limit_sell"] = self.quote["$change"].le(-sell_limit)
def check_stock_limit(self, stock_id, start_time, end_time, direction=None):
"""