vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 84
声望: 1

engine = BacktestingEngine()
engine.set_parameters(
vt_symbol="j99.DCE",

#橡胶ru99.CFFEX,焦炭j99.DCE,螺纹钢rb888.SHFE,铜cu888.SHFE,鸡蛋jd99.DCE,铁矿石i99.DCE,豆粕$9.CFFEX,玉米c99.DCE
#郑醇ma99.CZCE,pp99.DCE,pvc99.DCE,pta99.CZCE,al99.SHFE,zn99.SHFE
interval="1m",
start=datetime(2010, 1, 16),
end=datetime(2014, 5, 16),
rate=0.3/10000,
slippage=1,
size=10,
pricetick=0.2,
capital=1_000_000,

)
engine.add_strategy(RBreakStrategy, {})

%%

engine.load_data()
engine.run_backtesting()
df = engine.calculate_result()
engine.calculate_statistics()
engine.show_chart()、

description

Member
avatar
加入于:
帖子: 3027
声望: 174

新手建议用vscode,请不要用pycharm

Member
avatar
加入于:
帖子: 84
声望: 1

我用的Wing,这个和编辑器有关系啊

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号