随笔分类 -  vnpy

**kwargs用法举例
摘要:def test_kwarges(out : bool = False, **kwargs): a = kwargs.get("a", "test-a") x = kwargs.get("x", "test-x") print(a, x) print(out) kwargs = {"a":1, "b 阅读全文

posted @ 2023-12-08 16:48 金凯旋 阅读(32) 评论(0) 推荐(0) 编辑

多python 目录注意要点
摘要:python 是根据path路径优先级找执行文件的。 pip 是在scripts 下的, 设置 path 优先级时,两个路径最好一起设置 VScode 的prompt 下执行的python 和编辑环境有可能不一致。 执行: python -m pip install xxx 能保证pip 安装的内容 阅读全文

posted @ 2023-11-30 09:11 金凯旋 阅读(5) 评论(0) 推荐(0) 编辑

vnpy 平台普通的发单逻辑规则
摘要:前一根k线出信号( send_order) ,后一根K线开始前计算是否能成交。 用当根K线的开盘价计算,并期望发单会造成实盘与回测不符的现象。 今天对比交易信号时,才发现这个规则,记录一下。 阅读全文

posted @ 2023-06-30 16:51 金凯旋 阅读(14) 评论(0) 推荐(0) 编辑

为 vnpy 回测增加指标显示
摘要:添加一个指标类: from vnpy.trader.ui import QtCore, QtGui from vnpy.trader.object import BarData from vnpy.chart.base import BLACK_COLOR, UP_COLOR, DOWN_COLOR 阅读全文

posted @ 2023-04-26 13:32 金凯旋 阅读(158) 评论(0) 推荐(0) 编辑

VNPY的BacktesterEngine 和 BacktestingEngine
摘要:这两个代码很容易搞混: BacktestingEngine 在 vnpy_ctastrategy.backtesting, 没有继承 负责: 运行策略 调用Bar,Tick 处理交易(包括停止单) 显示表格 BacktesterEngine 在 vnpy_ctabacktester.engine里, 阅读全文

posted @ 2023-03-22 11:05 金凯旋 阅读(91) 评论(0) 推荐(0) 编辑

ctp认证权限
摘要:现象: /sys/firmware/dmi/tables/smbios_entry_point: Permission denied/dev/mem: Permission denied/sys/firmware/dmi/tables/smbios_entry_point: Permission d 阅读全文

posted @ 2023-02-20 11:17 金凯旋 阅读(188) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示