From 4b87b63e80e8f9ada905a72385f9c3fe03db0583 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Wed, 15 May 2019 11:14:35 +0800 Subject: [PATCH] [Mod] update index.md --- docs/index.md | 126 +++++++++++++-------------------------------- docs/quickstart.md | 45 ++-------------- 2 files changed, 40 insertions(+), 131 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4c6aa988..408c479f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,103 +1,47 @@ # vn.py文档 -* 快速入门 - * [项目简介](https://www.vnpy.com/docs/cn/introduction.html#introduction) - * [安装指南](https://www.vnpy.com/docs/cn/install.html#an-zhuang-zhi-nan) - * [Windows安装](https://www.vnpy.com/docs/cn/install.html#windows) - * [使用VNConda](https://www.vnpy.com/docs/cn/install.html#shi-yong-vnconda) - * [下载VNConda](https://www.vnpy.com/docs/cn/install.html#xia-zai-vnconda-python-3-7-64-wei) - * [安装VNConda](https://www.vnpy.com/docs/cn/install.html#an-zhuang-vnconda) - * [登陆VNStation](https://www.vnpy.com/docs/cn/install.html#deng-lu-vnstation) - * [使用VNStation](https://www.vnpy.com/docs/cn/install.html#shi-yong-vnstation) - * [更新VNStation](https://www.vnpy.com/docs/cn/install.html#geng-xin-vnstation) - * [手动安装](https://www.vnpy.com/docs/cn/install.html#shou-dong-an-zhuang) - * [下载并安装最新版Anaconda3.7 64位](https://www.vnpy.com/docs/cn/install.html#xia-zai-bing-an-zhuang-zui-xin-ban-anaconda3-7-64-wei) - * [下载并解压vnpy](https://www.vnpy.com/docs/cn/install.html#xia-zai-bing-jie-ya-vnpy) - * [安装vnpy](https://www.vnpy.com/docs/cn/install.html#an-zhuang-vnpy) - * [启动VN Trader](https://www.vnpy.com/docs/cn/install.html#qi-dong-vn-trader) - * [Ubuntu安装](https://www.vnpy.com/docs/cn/install.html#ubuntu) - * [下载并安装最新版本的Anaconda或者Miniconda](https://www.vnpy.com/docs/cn/install.html#xia-zai-bing-an-zhuang-zui-xin-ban-ben-de-anaconda-huo-zhe-miniconda-python-3-7-64-wei) - * [下载并解压vnpy](https://www.vnpy.com/docs/cn/install.html#xia-zai-bing-jie-ya-vnpy1) - * [安装vnpy](https://www.vnpy.com/docs/cn/install.html#an-zhuang-vnpy1) - * [启动VN Trader](https://www.vnpy.com/docs/cn/install.html#qi-dong-vn-trader1) - * [基本使用](https://www.vnpy.com/docs/cn/quickstart.html#ji-ben-shi-yong) - * [启动VN Trader](https://www.vnpy.com/docs/cn/quickstart.html#qi-dong-vntrader) - * [VN Station模式](https://www.vnpy.com/docs/cn/quickstart.html#vn-station-mo-shi) - * [脚本模式](https://www.vnpy.com/docs/cn/quickstart.html#jiao-ben-mo-shi) - - * [连接接口](https://www.vnpy.com/docs/cn/quickstart.html#lian-jie-jie-kou) - * [订阅行情](https://www.vnpy.com/docs/cn/quickstart.html#ding-yue-xing-qing) - * [委托交易](https://www.vnpy.com/docs/cn/quickstart.html#wei-tuo-jiao-yi) - * [数据监控](https://www.vnpy.com/docs/cn/quickstart.html#shu-ju-jian-kong) - * [行情组件](https://www.vnpy.com/docs/cn/quickstart.html#xing-qing-zu-jian) - * [活动组件](https://www.vnpy.com/docs/cn/quickstart.html#id8) - * [成交组件](https://www.vnpy.com/docs/cn/quickstart.html#cheng-jiao-zu-jian) - * [委托组件](https://www.vnpy.com/docs/cn/quickstart.html#wei-tuo-zu-jian) - * [持仓组件](https://www.vnpy.com/docs/cn/quickstart.html#chi-cang-zu-jian) - * [资金组件](https://www.vnpy.com/docs/cn/quickstart.html#zi-jin-zu-jian) - * [日志组件](https://www.vnpy.com/docs/cn/quickstart.html#ri-zhi-zu-jian) - - * [应用模块](https://www.vnpy.com/docs/cn/quickstart.html#ying-yong-mo-kuai) - * [CTA策略](https://www.vnpy.com/docs/cn/quickstart.html#cta-ce-lue) - * [CSV载入](https://www.vnpy.com/docs/cn/quickstart.html#csv-zai-ru) - * [CTA回测]() - * [行情记录]() - * [算法交易]() -* 应用模块 - * [CSV载入](https://www.vnpy.com/docs/cn/csv_loader.html#csv-zai-ru-mo-kuai) - * [初始化配置](https://www.vnpy.com/docs/cn/csv_loader.html#chu-shi-hua-pei-zhi) - * [数据载入](https://www.vnpy.com/docs/cn/csv_loader.html#shu-ju-zai-ru) +* [项目简介](introduction.md) - * [CTA策略](https://www.vnpy.com/docs/cn/cta_strategy.html#cta-ce-lue-mo-kuai) - * [模块构成](https://www.vnpy.com/docs/cn/cta_strategy.html#mo-kuai-gou-cheng) - * [历史数据](https://www.vnpy.com/docs/cn/cta_strategy.html#li-shi-shu-ju) - * [回测历史数据](https://www.vnpy.com/docs/cn/cta_strategy.html#hui-ce-li-shi-shu-ju) - * [实盘历史数据](https://www.vnpy.com/docs/cn/cta_strategy.html#shi-pan-li-shi-shu-ju) +* [安装指南](install.md) + * [Windows](install.md#Windows) + * [使用VNConda](install.md#使用VNConda) + * [手动安装](install.md#手动安装) + * [Ubuntu](install.md#Ubuntu) - * [策略开发](https://www.vnpy.com/docs/cn/cta_strategy.html#ce-lue-kai-fa) - * [参数设置](https://www.vnpy.com/docs/cn/cta_strategy.html#can-shu-she-zhi) - * [类的初始化](https://www.vnpy.com/docs/cn/cta_strategy.html#lei-de-chu-shi-hua) - * [策略的初始化、启动、停止](https://www.vnpy.com/docs/cn/cta_strategy.html#ce-lue-de-chu-shi-hua-qi-dong-ting-zhi) - * [Tick数据回报](https://www.vnpy.com/docs/cn/cta_strategy.html#tick-shu-ju-hui-bao) - * [K线数据回报](https://www.vnpy.com/docs/cn/cta_strategy.html#k-xian-shu-ju-hui-bao) - * [15分钟K线数据回报](https://www.vnpy.com/docs/cn/cta_strategy.html#fen-zhong-k-xian-shu-ju-hui-bao) - * [委托回报、成交回报、停止单回报](https://www.vnpy.com/docs/cn/cta_strategy.html#wei-tuo-hui-bao-cheng-jiao-hui-bao-ting-zhi-dan-hui-bao) +* [基本使用](quickstart.md) + * [启动程序](quickstart.md#启动程序) + * [图形模式](quickstart.md#图形模式) + * [脚本模式](quickstart.md#脚本模式) + * [连接接口](quickstart.md#连接接口) + * [订阅行情](quickstart.md#订阅行情) + * [委托交易](quickstart.md#委托交易) + * [数据监控](quickstart.md#数据监控) + * [应用模块](quickstart.md#应用模块) - * [回测研究](https://www.vnpy.com/docs/cn/cta_strategy.html#hui-ce-yan-jiu) - * [加载策略](https://www.vnpy.com/docs/cn/cta_strategy.html#jia-zai-ce-lue) - * [载入历史数据](https://www.vnpy.com/docs/cn/cta_strategy.html#zai-ru-li-shi-shu-ju) - * [撮合成交](https://www.vnpy.com/docs/cn/cta_strategy.html#cuo-he-cheng-jiao) - * [计算策略盈亏情况](https://www.vnpy.com/docs/cn/cta_strategy.html#ji-suan-ce-lue-ying-yu-qing-kuang) - * [计算策略统计指标](https://www.vnpy.com/docs/cn/cta_strategy.html#ji-suan-ce-lue-tong-ji-zhi-biao) - * [统计指标绘图](https://www.vnpy.com/docs/cn/cta_strategy.html#tong-ji-zhi-biao-hui-tu) - * [回测引擎使用示例](https://www.vnpy.com/docs/cn/cta_strategy.html#hui-ce-yin-qing-shi-yong-shi-li) +* [CSV载入](csv_loader.md) + * [初始化配置](csv_loader.md#初始化配置) + * [数据载入](csv_loader.md#数据载入) + +* [CTA策略](cta_strategy.md) + * [模块构成](cta_strategy.md#模块构成) + * [历史数据](cta_strategy.md#历史数据) + * [策略开发](cta_strategy.md#策略开发) + * [回测研究](cta_strategy.md#回测研究) + * [参数优化](cta_strategy.md#参数优化) + * [实盘运行](cta_strategy.md#实盘运行) - * [参数优化](https://www.vnpy.com/docs/cn/cta_strategy.html#can-shu-you-hua) - * [参数设置](https://www.vnpy.com/docs/cn/cta_strategy.html#can-shu-she-zhi1) - * [参数对组合回测](https://www.vnpy.com/docs/cn/cta_strategy.html#can-shu-dui-zu-he-hui-ce) - * [多进程优化](https://www.vnpy.com/docs/cn/cta_strategy.html#duo-jin-cheng-you-hua) - - * [实盘运行](https://www.vnpy.com/docs/cn/cta_strategy.html#shi-pan-yun-xing) - * [创建策略实例](https://www.vnpy.com/docs/cn/cta_strategy.html#chuang-jian-ce-lue-shi-li) - * [初始化策略](https://www.vnpy.com/docs/cn/cta_strategy.html#chu-shi-hua-ce-lue) - * [启动策略](https://www.vnpy.com/docs/cn/cta_strategy.html#qi-dong-ce-lue) - * [停止策略](https://www.vnpy.com/docs/cn/cta_strategy.html#ting-zhi-ce-lue) - * [编辑策略](https://www.vnpy.com/docs/cn/cta_strategy.html#bian-ji-ce-lue) - * [移除策略](https://www.vnpy.com/docs/cn/cta_strategy.html#yi-chu-ce-lue) - - - * [CTA回测](https://www.vnpy.com/docs/cn/cta_backtester.html#cta-hui-ce-mo-kuai) - * [加载启动](https://www.vnpy.com/docs/cn/cta_backtester.html#jia-zai-qi-dong) - * [下载数据](https://www.vnpy.com/docs/cn/cta_backtester.html#xia-zai-shu-ju) - * [策略回测](https://www.vnpy.com/docs/cn/cta_backtester.html#ce-lue-hui-ce) - * [统计数据](https://www.vnpy.com/docs/cn/cta_backtester.html#tong-ji-shu-ju) - * [图表分析](https://www.vnpy.com/docs/cn/cta_backtester.html#tu-biao-fen-xi) - * [参数优化](https://www.vnpy.com/docs/cn/cta_backtester.html#can-shu-you-hua) - * [穷举算法](https://www.vnpy.com/docs/cn/cta_backtester.html#qiong-ju-suan-fa) - * [遗传算法](https://www.vnpy.com/docs/cn/cta_backtester.html#yi-chuan-suan-fa) +* [CTA回测](cta_backtester.md) + * [加载启动](cta_backtester.md#加载启动) + * [下载数据](cta_backtester.md#下载数据) + * [策略回测](cta_backtester.md#策略回测) + * [统计数据](cta_backtester.md#统计数据) + * [图表分析](cta_backtester.md#图表分析) + * [参数优化](cta_backtester.md#参数优化) + * [穷举算法](cta_backtester.md#穷举算法) + * [遗传算法](cta_backtester.md#遗传算法) * [交易接口](gateway.md) diff --git a/docs/quickstart.md b/docs/quickstart.md index 5e499429..c69c3e43 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,8 +1,9 @@ # 基本使用 -## 启动VNTrader -### VN Station模式 +## 启动程序 + +### 图形模式 登陆VN Station后,点击VN Trade Lite快速进入VN Trader(只有CTP接口);或者点击VN Trader Pro先选择如下图的底层接口和上层应用,再进入VN Trader。 ![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/VnTrader_Pro.png "enter image title here") @@ -132,44 +133,8 @@ python run.py   ## 应用模块 -vnpy官方目前提供2个应用模块组件,分别是用于自动交易的“CTA策略”组件;把第三方数据文件导入到数据库的“CSV载入”组件。在菜单栏中点击“功能”,即显示应用模块,如下图: + +vn.py官方提供了开箱即用的量化交易应用模块,在菜单栏中点击“功能”,即显示应用模块,如下图: ![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/application.png "enter image title here") -### CTA策略 -CTA策略组件默认使用RQData的数据进行自动交易,故需要配置好RQData相关数据。 - -1) 在用户目录下.vntrader文件夹找到vt_setting.json,输入RQData的账号和密码,保存退出后启动CTA策略组件,会显示“RQData数据接口初始化成功”,如图: - -![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/RQData.png "enter image title here") - - -2)在左上方的菜单栏选择策略,如“AtrRsiStrategy”,然后点击右边的“添加策略”按钮,用于策略实例创建,选择策略适用品种和修改该测试示例的参数,如图: - -![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/trader_2.PNG "enter image title here") - - -3)每一个策略示例都有其“初始化”、“启动”、“停止”、“编辑”、“移除”按钮。注意在启动策略前必须先初始化,移除策略前需要先停止策略。右上方菜单栏有批量处理功能,方便用户快速启动、停止策略,如图: - -![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/turtle_strategy.png "enter image title here") - - -  - - -### CSV载入 -CSV文件是用户最主要的历史数据来源之一,用户只需根据CSV文件中的表头字段,以及时间格式灵活配置,即可实现一键载入历史数据。 - -CSV载入操作分为3步: - -1)打开CSV文件,查看表头字段以及时间格式,如图: - -![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/csv_format.png "enter image title here") - -2)点击菜单栏的“功能”->“CSV载入”,进入界面后选择要载入的CSV文件,并且修改相关表头字段和时间格式(若有需要的话)。如下图: - -![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/csv_loader.png "enter image title here") - -3)点击“载入数据”后,成功界面如下图所示。 - -![](https://vnpy-community.oss-cn-shanghai.aliyuncs.com/forum_experience/yazhang/quick_start/exito_csv_load.png "enter image title here")