def __init_tradeDay(self,start:datetime,end:datetime): code = TRAY_DAY_SIMBOL db_bar_start = database_manager.get_oldest_bar_data(code,Exchange.SSE,Interval.DAILY) db_bar_end = database_manager.get_newest_bar_data(code,Exchange.SSE,Interval.DAILY) print(f"StrategyBridage: __init_tradeDay(), start={start},end={end}") if((not db_bar_start is None ) and (not db_bar_end is None)): if(start >= db_bar_start.datetime and end <= db_bar_end.datetime): return print(f"StrategyBridage: __init_tradeDay(), update tradeDay!!!!") database_manager.delete_bar_data(code,Exchange.SSE,Interval.DAILY) start = start - timedelta(days=15) end = end + timedelta(days=15) save_tradeday_from_jqdata(start,end)
def delete_bar_data( self, symbol: str, exchange: Exchange, interval: Interval ) -> int: """""" count = database_manager.delete_bar_data( symbol, exchange, interval ) return count