数据库中已经预留了这一字段,但没有数据,请问需要在哪个文件中修改?谢谢
数据库中已经预留了这一字段,但没有数据,请问需要在哪个文件中修改?谢谢
找到更改的地方了, 看回测模块文档。
只需要修改rqdata.py中的下面这段代码:
df = rqdata_get_price(
rq_symbol,
frequency=rq_interval,
fields=["open", "high", "low", "close", "volume","open_interest"],
start_date=start,
end_date=end,
adjust_type="none"
)
data: List[BarData] = []
if df is not None:
for ix, row in df.iterrows():
bar = BarData(
symbol=symbol,
exchange=exchange,
interval=interval,
datetime=row.name.to_pydatetime() - adjustment,
open_price=row["open"],
high_price=row["high"],
low_price=row["low"],
close_price=row["close"],
volume=row["volume"],
open_interest=row["open_interest"],
gateway_name="RQ"
)