mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 00:06:58 +08:00
fix data format bug & twap peeking strategy
This commit is contained in:
@@ -63,11 +63,11 @@ class TWAPStrategy(BaseStrategy):
|
||||
trade_start_time, trade_end_time = self.trade_calendar.get_step_time(trade_step)
|
||||
order_list = []
|
||||
for order in self.outer_trade_decision.get_decision():
|
||||
# if not tradable, continue
|
||||
if not self.trade_exchange.is_stock_tradable(
|
||||
stock_id=order.stock_id, start_time=trade_start_time, end_time=trade_end_time
|
||||
):
|
||||
continue
|
||||
# Don't peek the future information
|
||||
# if not self.trade_exchange.is_stock_tradable(
|
||||
# stock_id=order.stock_id, start_time=trade_start_time, end_time=trade_end_time
|
||||
# ):
|
||||
# continue
|
||||
_amount_trade_unit = self.trade_exchange.get_amount_of_trade_unit(
|
||||
stock_id=order.stock_id, start_time=order.start_time, end_time=order.end_time
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user