CHEN Chi Wei

Data Missing

Programming


I was testing my strategy for the algo challenge, but I saw for one moment the WTIUSD has data missing in 2022-01-17 while it should not. Is this a bug from market data feed?

Code:
 
Bella
What's your backtest setup? 
Just tried on 1-day dataset, 2022-01-17 data is available. 

from AlgoAPI import AlgoAPIUtil, AlgoAPI_Backtest

class AlgoEvent:
    def __init__(self):
        pass
        
    def start(self, mEvt):
        self.evt = AlgoAPI_Backtest.AlgoEvtHandler(self, mEvt)
        self.evt.start()
        
    def on_marketdatafeed(self, md, ab):
        self.evt.consoleLog(vars(md))


[2022-01-16 00:00:00] {'instrument': 'WTIUSD', 'timestamp': datetime.datetime(2022, 1, 16, 0, 0), 'askPrice': 84.409, 'bidPrice': 84.379, 'midPrice': 84.394, 'openPrice': 81.858, 'highPrice': 84.481, 'lowPrice': 81.166, 'lastPrice': 84.394, 'volume': 19084.0, 'bidSize': 1, 'askSize': 1, 'bidOrderBook': [], 'askOrderBook': [], 'producttype': 'SPOT', 'minTick': 0.001, 'expiry': '', 'strike': 0, 'right': '', 'symbol': 'WTIUSD', 'underlyingBid': -1, 'underlyingAsk': -1, 'greeks': {}, 'market': 'ENERGY', 'session': 0}

[2022-01-17 00:00:00] {'instrument': 'WTIUSD', 'timestamp': datetime.datetime(2022, 1, 17, 0, 0), 'askPrice': 84.355, 'bidPrice': 84.325, 'midPrice': 84.34, 'openPrice': 84.34, 'highPrice': 84.34, 'lowPrice': 84.34, 'lastPrice': 84.34, 'volume': 1.0, 'bidSize': 1, 'askSize': 1, 'bidOrderBook': [], 'askOrderBook': [], 'producttype': 'SPOT', 'minTick': 0.001, 'expiry': '', 'strike': 0, 'right': '', 'symbol': 'WTIUSD', 'underlyingBid': -1, 'underlyingAsk': -1, 'greeks': {}, 'market': 'ENERGY', 'session': 0}

[2022-01-18 00:00:00] {'instrument': 'WTIUSD', 'timestamp': datetime.datetime(2022, 1, 18, 0, 0), 'askPrice': 84.355, 'bidPrice': 84.32, 'midPrice': 84.3375, 'openPrice': 84.394, 'highPrice': 84.623, 'lowPrice': 82.959, 'lastPrice': 84.3375, 'volume': 15793.0, 'bidSize': 1, 'askSize': 1, 'bidOrderBook': [], 'askOrderBook': [], 'producttype': 'SPOT', 'minTick': 0.001, 'expiry': '', 'strike': 0, 'right': '', 'symbol': 'WTIUSD', 'underlyingBid': -1, 'underlyingAsk': -1, 'greeks': {}, 'market': 'ENERGY', 'session': 0}


 
CHEN Chi Wei
Original Posted by - Bella:
What's your backtest setup? 
Just tried on 1-day dataset, 2022-01-17 data is available. 

from AlgoAPI import AlgoAPIUtil, AlgoAPI_Backtest

class AlgoEvent:
    def __init__(self):
        pass
        
    def start(self, mEvt):
        self.evt = AlgoAPI_Backtest.AlgoEvtHandler(self, mEvt)
        self.evt.start()
        
    def on_marketdatafeed(self, md, ab):
        self.evt.consoleLog(vars(md))


[2022-01-16 00:00:00] {'instrument': 'WTIUSD', 'timestamp': datetime.datetime(2022, 1, 16, 0, 0), 'askPrice': 84.409, 'bidPrice': 84.379, 'midPrice': 84.394, 'openPrice': 81.858, 'highPrice': 84.481, 'lowPrice': 81.166, 'lastPrice': 84.394, 'volume': 19084.0, 'bidSize': 1, 'askSize': 1, 'bidOrderBook': [], 'askOrderBook': [], 'producttype': 'SPOT', 'minTick': 0.001, 'expiry': '', 'strike': 0, 'right': '', 'symbol': 'WTIUSD', 'underlyingBid': -1, 'underlyingAsk': -1, 'greeks': {}, 'market': 'ENERGY', 'session': 0}

[2022-01-17 00:00:00] {'instrument': 'WTIUSD', 'timestamp': datetime.datetime(2022, 1, 17, 0, 0), 'askPrice': 84.355, 'bidPrice': 84.325, 'midPrice': 84.34, 'openPrice': 84.34, 'highPrice': 84.34, 'lowPrice': 84.34, 'lastPrice': 84.34, 'volume': 1.0, 'bidSize': 1, 'askSize': 1, 'bidOrderBook': [], 'askOrderBook': [], 'producttype': 'SPOT', 'minTick': 0.001, 'expiry': '', 'strike': 0, 'right': '', 'symbol': 'WTIUSD', 'underlyingBid': -1, 'underlyingAsk': -1, 'greeks': {}, 'market': 'ENERGY', 'session': 0}

[2022-01-18 00:00:00] {'instrument': 'WTIUSD', 'timestamp': datetime.datetime(2022, 1, 18, 0, 0), 'askPrice': 84.355, 'bidPrice': 84.32, 'midPrice': 84.3375, 'openPrice': 84.394, 'highPrice': 84.623, 'lowPrice': 82.959, 'lastPrice': 84.3375, 'volume': 15793.0, 'bidSize': 1, 'askSize': 1, 'bidOrderBook': [], 'askOrderBook': [], 'producttype': 'SPOT', 'minTick': 0.001, 'expiry': '', 'strike': 0, 'right': '', 'symbol': 'WTIUSD', 'underlyingBid': -1, 'underlyingAsk': -1, 'greeks': {}, 'market': 'ENERGY', 'session': 0}


I'm using 1min dataset. You can see from the log I provided, 2022-02-17 data did exist. But the issue is we're missing time between 19~23. I'm actually seeing this in many dates not only 2022 but also previous years.