354 浏览
0

如今天(2014-1-19-Fri)  使用 api.get_quote(DCE.eb2408) 获取数据,很多值都是nan,请问  什么意思,或字符。 需要过滤掉这些字段, 请问如何解决?

{‘datetime’: ‘2024-01-19 14:59:59.999500’, ‘ask_price1’: 8780, ‘ask_volume1’: 1, ‘bid_price1’: 8390, ‘bid_volume1’: 1, ‘ask_price2’: nan, ‘ask_volume2’: 0, ‘bid_price2’: nan, ‘bid_volume2’: 0, ‘ask_price3’: nan, ‘ask_volume3’: 0, ‘bid_price3’: nan, ‘bid_volume3’: 0, ‘ask_price4’: nan, ‘ask_volume4’: 0, ‘bid_price4’: nan, ‘bid_volume4’: 0, ‘ask_price5’: nan, ‘ask_volume5’: 0, ‘bid_price5’: nan, ‘bid_volume5’: 0, ‘last_price’: 8505, ‘highest’: nan, ‘lowest’: nan, ‘open’: nan, ‘close’: 8505, ‘average’: nan, ‘volume’: 0, ‘amount’: 0, ‘open_interest’: 967, ‘settlement’: 8505, ‘upper_limit’: 9100, ‘lower_limit’: 7910, ‘pre_open_interest’: 967, ‘pre_settlement’: 8505, ‘pre_close’: 8549, ‘price_tick’: 1.0, ‘price_decs’: 0, ‘volume_multiple’: 5.0, ‘max_limit_order_volume’: 1000, ‘max_market_order_volume’: 1000, ‘min_limit_order_volume’: 0, ‘min_market_order_volume’: 0, ‘underlying_symbol’: ”, ‘strike_price’: nan, ‘ins_class’: ‘FUTURE’, ‘instrument_id’: ‘DCE.eb2408’, ‘instrument_name’: ‘苯乙烯2408’, ‘exchange_id’: ‘DCE’, ‘expired’: False, ‘trading_time’: {“day”: [[“09:00:00”, “10:15:00”], [“10:30:00”, “11:30:00”], [“13:30:00”, “15:00:00”]], “night”: [[“21:00:00”, “23:00:00″]]}, ‘expire_datetime’: 1724742000.0, ‘delivery_year’: 2024, ‘delivery_month’: 8, ‘last_exercise_datetime’: nan, ‘exercise_year’: 0, ‘exercise_month’: 0, ‘option_class’: ”, ‘exercise_type’: ”, ‘product_id’: ‘eb’, ‘iopv’: nan, ‘public_float_share_quantity’: 0, ‘stock_dividend_ratio’: [], ‘cash_dividend_ratio’: [], ‘expire_rest_days’: 221, ‘commission’: 6.0, ‘margin’: 2126.25}

李思恒 已回答的问题 2024年1月23日
0

回测吧,回测的话很多字段是没有的。https://doc.shinnytech.com/tqsdk/latest/reference/tqsdk.backtest.html?highlight=%E5%9B%9E%E6%B5%8B

李思恒 已回答的问题 2024年1月23日
您正在查看1个答案中的1个,单击此处查看所有答案。