Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
relevant_symbols = set(ConfigManager.get_symbols(self.config))
# parse files
for file in self.config[CONFIG_BACKTESTING][CONFIG_BACKTESTING_DATA_FILES]:
exchange_name, symbol, timestamp, data_type = interpret_file_name(file)
if symbol is not None and symbol in relevant_symbols:
if exchange_name is not None and timestamp is not None and data_type is not None:
# check if symbol data already in symbols
# TODO check exchanges ?
if symbol not in symbols_appended:
symbols_appended[symbol] = 0
if symbols_appended[symbol] < int(timestamp):
symbols_appended[symbol] = int(timestamp)
self.symbols.append(symbol)
data = DataCollectorParser.parse(file)
self.data[symbol] = self.fix_timestamps(data)