def recreate_all_codes(self, codes, create_start_date, end): DB_CLIENT.remove_all_from(self.repo_name()) DB_CLIENT.create_index_for_collection_with_date_and_code( self.repo_name()) start = date_time_utils.Date.from_str(create_start_date) end = date_time_utils.Date.from_str(end) executor.execute_tasks(codes, self.update_for_single_code, start.as_str(), end.as_str())
def recreate_all_codes(self, start_date, end): DB_CLIENT.remove_all_from(self.repo_name_for_backtest()) DB_CLIENT.remove_all_from(self.repo_name_for_trade()) DB_CLIENT.create_index_for_collection_with_date_and_code(self.repo_name_for_backtest()) DB_CLIENT.create_index_for_collection_with_date_and_code(self.repo_name_for_trade()) code_list = SECURITY_DATA_READ_SERVICE.read_security_codes() start = date_time_utils.Date.from_str(start_date) end = date_time_utils.Date.from_str(end) executor.execute_tasks(code_list, self.update_for_single_code, start.as_str(), end.as_str())
def init_qfq_repo(): DB_CLIENT.create_index_for_collection_with_date_and_code(DAY_QFQ_REPO)