各位大佬好,我最近尝试录制 CTP 行情,在云服务器和家里 PC 同时运行,录制的行情源是 SimNow,录制的目标是 CTP 全行情 1 分钟级别的 Bar 数据。但是我发现它们录制下来的数据有很多对不上,尤其是成交量这一项,都和文华上查到的产生很大差别……
比如以下 m2401 合约在 2023.11.08 10:05 的成交量家里 PC 录制下来是 1468,云服务器录制下来是 1594,但文华上查得 1682(或者前一分钟 3313 或者后一分钟 886),总持仓量和四个价格都是基本一致的;
local data with key "Exchange.DCE.Interval.MINUTE.m2401.20231108100500" does not match remote record
BarData(gateway_name='DB', extra=None, symbol='m2401', exchange=<Exchange.DCE: 'DCE'>, datetime=datetime.datetime(2023, 11, 8, 10, 5, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')), interval=<Interval.MINUTE: '1m'>, volume=1468, turnover=60828380.0, open_interest=1483208.0, open_price=4143.0, high_price=4145.0, low_price=4143.0, close_price=4145.0)
BarData(gateway_name='DB', extra=None, symbol='m2401', exchange=<Exchange.DCE: 'DCE'>, datetime=datetime.datetime(2023, 11, 8, 10, 5, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')), interval=<Interval.MINUTE: '1m'>, volume=1594, turnover=66049890.0, open_interest=1483241.0, open_price=4143.0, high_price=4145.0, low_price=4143.0, close_price=4144.0)
再比如 fu2401 合约在 2023.11.08 13:54:00 家里 PC 录得成交量 559,服务器录得 611,文华查询得 595(或者前一分钟 1456 或者后一分钟 782),总持仓和四个价格照样稳定;
local data with key "Exchange.SHFE.Interval.MINUTE.fu2401.20231108135400" does not match remote record
BarData(gateway_name='DB', extra=None, symbol='fu2401', exchange=<Exchange.SHFE: 'SHFE'>, datetime=datetime.datetime(2023, 11, 8, 13, 54, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')), interval=<Interval.MINUTE: '1m'>, volume=559, turnover=17215820.0, open_interest=300230.0, open_price=3079.0000000000005, high_price=3081.0000000000005, low_price=3079.0000000000005, close_price=3080.0000000000005)
BarData(gateway_name='DB', extra=None, symbol='fu2401', exchange=<Exchange.SHFE: 'SHFE'>, datetime=datetime.datetime(2023, 11, 8, 13, 54, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')), interval=<Interval.MINUTE: '1m'>, volume=611, turnover=18817260.0, open_interest=300238.0, open_price=3079.0000000000005, high_price=3081.0000000000005, low_price=3079.0000000000005, close_price=3080.0000000000005)
请问要如何处理这些情况呢?
1、是 SimNow 不稳定导致的问题吗?
2、由于网络异常在程序运行中是不能忽略的,我该怎么处理或者说能不能处理 Tick 丢失时的成交量以及其它字段?