{"id":29335,"date":"2025-01-25T15:35:57","date_gmt":"2025-01-25T07:35:57","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=29335"},"modified":"2025-03-25T15:38:00","modified_gmt":"2025-03-25T07:38:00","slug":"veighna","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/veighna\/","title":{"rendered":"VeighNa\uff1a\u56fd\u5185\u6d41\u884c\u7684\u5f00\u6e90\u91cf\u5316\u4ea4\u6613\u6846\u67b6"},"content":{"rendered":"<p>VeighNa \u662f\u4e00\u4e2a\u57fa\u4e8e Python \u7684\u5f00\u6e90\u91cf\u5316\u4ea4\u6613\u5e73\u53f0\uff0c\u6700\u521d\u7531\u56fd\u5185\u79c1\u52df\u4ea4\u6613\u5458\u5f00\u53d1\uff0c2015 \u5e74\u6b63\u5f0f\u542f\u52a8\u3002\u5b83\u4ece\u7b80\u5355\u7684\u4ea4\u6613\u63a5\u53e3\u5c01\u88c5\uff0c\u53d1\u5c55\u6210\u4e86\u4e00\u4e2a\u529f\u80fd\u5168\u9762\u7684\u4ea4\u6613\u5f00\u53d1\u6846\u67b6\u3002\u7528\u6237\u5305\u62ec\u79c1\u52df\u57fa\u91d1\u3001\u8bc1\u5238\u516c\u53f8\u3001\u671f\u8d27\u516c\u53f8\u3001\u9ad8\u6821\u7814\u7a76\u673a\u6784\u548c\u4e2a\u4eba\u6295\u8d44\u8005\u3002VeighNa \u652f\u6301\u80a1\u7968\u3001\u671f\u8d27\u3001\u671f\u6743\u3001\u5916\u6c47\u7b49\u591a\u79cd\u91d1\u878d\u4ea7\u54c1\uff0c\u63d0\u4f9b\u4e30\u5bcc\u7684\u4ea4\u6613\u63a5\u53e3\u548c\u6570\u636e API\u3002\u5b83\u4f7f\u7528\u4e8b\u4ef6\u9a71\u52a8\u5f15\u64ce\uff0c\u64cd\u4f5c\u7b80\u5355\uff0c\u793e\u533a\u6d3b\u8dc3\uff0c\u4ee3\u7801\u6258\u7ba1\u5728 GitHub \u4e0a\uff0c\u9075\u5faa MIT \u5f00\u6e90\u534f\u8bae\uff0c\u514d\u8d39\u5f00\u653e\u7ed9\u6240\u6709\u4eba\u4f7f\u7528\u548c\u4fee\u6539\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-29336\" title=\"VeighNa\uff1a\u56fd\u5185\u6d41\u884c\u7684\u5f00\u6e90\u91cf\u5316\u4ea4\u6613\u6846\u67b6-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/674a5d4213517f8.png\" alt=\"VeighNa\uff1a\u56fd\u5185\u6d41\u884c\u7684\u5f00\u6e90\u91cf\u5316\u4ea4\u6613\u6846\u67b6-1\" width=\"797\" height=\"452\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/674a5d4213517f8.png 797w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/674a5d4213517f8-768x436.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/674a5d4213517f8-18x10.png 18w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u652f\u6301\u591a\u79cd\u4ea4\u6613\u63a5\u53e3\uff0c\u5982\u56fd\u5185\u7684 CTP\u3001\u98de\u9a6c\u3001\u91d1\u4ed5\u8fbe\uff0c\u56fd\u5916\u7684 OANDA\u3001Interactive Brokers \u7b49\u3002<\/li>\n<li>\u63d0\u4f9b\u4e8b\u4ef6\u9a71\u52a8\u5f15\u64ce\uff0c\u65b9\u4fbf\u5f00\u53d1\u81ea\u52a8\u5316\u4ea4\u6613\u7a0b\u5e8f\u3002<\/li>\n<li>\u5185\u7f6e CTA \u7b56\u7565\u6a21\u5757\uff0c\u652f\u6301\u7b56\u7565\u5f00\u53d1\u548c\u56de\u6d4b\u5206\u6790\u3002<\/li>\n<li>\u5305\u542b\u7b97\u6cd5\u4ea4\u6613\u6a21\u5757\uff0c\u63d0\u4f9b TWAP\u3001Sniper \u7b49\u667a\u80fd\u4ea4\u6613\u7b97\u6cd5\u3002<\/li>\n<li>\u652f\u6301\u9ad8\u6027\u80fd K \u7ebf\u56fe\u8868\uff0c\u5b9e\u65f6\u663e\u793a\u5e02\u573a\u6570\u636e\u3002<\/li>\n<li>\u63d0\u4f9b\u8de8\u8fdb\u7a0b\u901a\u8baf\u7ec4\u4ef6\uff0c\u9002\u5408\u5206\u5e03\u5f0f\u4ea4\u6613\u7cfb\u7edf\u3002<\/li>\n<li>\u96c6\u6210\u6570\u636e\u5f55\u5236\u529f\u80fd\uff0c\u53ef\u4fdd\u5b58\u548c\u7ba1\u7406\u5e02\u573a\u6570\u636e\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<p>VeighNa \u7684\u5b89\u88c5\u9700\u8981\u51c6\u5907\u4e00\u4e9b\u57fa\u7840\u73af\u5883\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li><strong>\u51c6\u5907\u73af\u5883<\/strong>\n<ul>\n<li>\u786e\u4fdd\u7535\u8111\u5b89\u88c5 Python 3.7 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u63a8\u8350\u4f7f\u7528\u5b98\u65b9\u53d1\u884c\u7248\u6216 VN Studio\uff08VeighNa \u56e2\u961f\u63d0\u4f9b\u7684\u96c6\u6210\u73af\u5883\uff09\u3002<\/li>\n<li>\u5b89\u88c5 Git\uff0c\u7528\u4e8e\u4ece GitHub \u4e0b\u8f7d\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u4e0b\u8f7d\u6e90\u7801<\/strong><br \/>\n\u5728\u7ec8\u7aef\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06 VeighNa \u4ed3\u5e93\u514b\u9686\u5230\u672c\u5730\uff1a<\/li>\n<\/ol>\n<pre><code>git clone https:\/\/github.com\/vnpy\/vnpy.git\r\n<\/code><\/pre>\n<p>\u5b8c\u6210\u540e\uff0c\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff1a<\/p>\n<pre><code>cd vnpy\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>\u5b89\u88c5\u4f9d\u8d56<\/strong><br \/>\n\u5728\u9879\u76ee\u6839\u76ee\u5f55\u8fd0\u884c\uff1a<\/li>\n<\/ol>\n<pre><code>pip install -r requirements.txt\r\n<\/code><\/pre>\n<p>\u8fd9\u4f1a\u5b89\u88c5 VeighNa \u8fd0\u884c\u6240\u9700\u7684 Python \u5e93\u3002\u5982\u679c\u9700\u8981\u7279\u5b9a\u63a5\u53e3\uff08\u5982 CTP\uff09\uff0c\u8fd8\u9700\u989d\u5916\u5b89\u88c5\u5bf9\u5e94\u6a21\u5757\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>pip install vnpy_ctp\r\n<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>\u8fd0\u884c\u7a0b\u5e8f<\/strong><br \/>\n\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff08\u5982 CTP \u8fde\u63a5\u4fe1\u606f\uff09\uff0c\u7136\u540e\u8fd0\u884c\u4e3b\u7a0b\u5e8f\uff1a<\/li>\n<\/ol>\n<pre><code>python examples\/veighna_trader\/run.py\r\n<\/code><\/pre>\n<p>\u4e00\u4e2a\u56fe\u5f62\u754c\u9762\u4f1a\u5f39\u51fa\uff0c\u663e\u793a\u4ea4\u6613\u7a97\u53e3\u3002<\/p>\n<h3>\u4e3b\u8981\u529f\u80fd\u64cd\u4f5c<\/h3>\n<h4>1. \u8fde\u63a5\u4ea4\u6613\u63a5\u53e3<\/h4>\n<ul>\n<li>\u6253\u5f00 VeighNa \u4e3b\u754c\u9762\uff0c\u70b9\u51fb\u201c\u7cfb\u7edf\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201c\u8fde\u63a5\u7f51\u5173\u201d\u3002<\/li>\n<li>\u6839\u636e\u9700\u8981\u9009\u62e9\u63a5\u53e3\uff08\u5982 CTP\uff09\uff0c\u8f93\u5165\u8d26\u53f7\u3001\u5bc6\u7801\u548c\u670d\u52a1\u5668\u5730\u5740\u3002\u8fd9\u4e9b\u4fe1\u606f\u7531\u7ecf\u7eaa\u5546\u63d0\u4f9b\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u8fde\u63a5\u201d\uff0c\u72b6\u6001\u680f\u4f1a\u663e\u793a\u662f\u5426\u6210\u529f\u3002<\/li>\n<\/ul>\n<h4>2. \u5f00\u53d1\u548c\u8fd0\u884c\u7b56\u7565<\/h4>\n<ul>\n<li>\u5728\u201c\u5e94\u7528\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201cCTA \u7b56\u7565\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u6dfb\u52a0\u7b56\u7565\u201d\uff0c\u8f93\u5165\u7b56\u7565\u540d\u79f0\u548c\u53c2\u6570\u3002VeighNa \u81ea\u5e26\u793a\u4f8b\u7b56\u7565\uff0c\u4e5f\u652f\u6301\u81ea\u5b9a\u4e49\u7f16\u5199\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u542f\u52a8\u201d\uff0c\u7b56\u7565\u4f1a\u81ea\u52a8\u8fd0\u884c\uff0c\u76d1\u63a7\u5e02\u573a\u5e76\u6267\u884c\u4ea4\u6613\u3002<\/li>\n<\/ul>\n<h4>3. \u56de\u6d4b\u5206\u6790<\/h4>\n<ul>\n<li>\u6253\u5f00\u201cCTA \u56de\u6d4b\u201d\u6a21\u5757\uff0c\u5bfc\u5165\u5386\u53f2\u6570\u636e\uff08\u652f\u6301 CSV \u6216\u6570\u636e\u5e93\u683c\u5f0f\uff09\u3002<\/li>\n<li>\u8bbe\u7f6e\u56de\u6d4b\u53c2\u6570\uff08\u5982\u65f6\u95f4\u8303\u56f4\u3001\u8d44\u91d1\u3001\u624b\u7eed\u8d39\uff09\uff0c\u9009\u62e9\u7b56\u7565\u540e\u70b9\u51fb\u201c\u5f00\u59cb\u56de\u6d4b\u201d\u3002<\/li>\n<li>\u56de\u6d4b\u5b8c\u6210\u540e\uff0c\u67e5\u770b\u6536\u76ca\u66f2\u7ebf\u548c\u4ea4\u6613\u65e5\u5fd7\uff0c\u5206\u6790\u7b56\u7565\u6548\u679c\u3002<\/li>\n<\/ul>\n<h4>4. \u6570\u636e\u5f55\u5236<\/h4>\n<ul>\n<li>\u5728\u201c\u6570\u636e\u5f55\u5236\u201d\u6a21\u5757\u4e2d\uff0c\u8fde\u63a5\u5e02\u573a\u6570\u636e\u6e90\u3002<\/li>\n<li>\u8bbe\u7f6e\u5f55\u5236\u9891\u7387\uff08\u5982 Tick \u6216 K \u7ebf\uff09\uff0c\u70b9\u51fb\u201c\u5f00\u59cb\u5f55\u5236\u201d\uff0c\u6570\u636e\u4f1a\u4fdd\u5b58\u5230\u672c\u5730\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<h3>\u7279\u8272\u529f\u80fd\u64cd\u4f5c<\/h3>\n<h4>\u7b97\u6cd5\u4ea4\u6613<\/h4>\n<ul>\n<li>\u6253\u5f00\u201c\u7b97\u6cd5\u4ea4\u6613\u201d\u6a21\u5757\uff0c\u9009\u62e9\u7b97\u6cd5\uff08\u5982 TWAP\uff09\u3002<\/li>\n<li>\u8f93\u5165\u4ea4\u6613\u76ee\u6807\uff08\u5982\u6570\u91cf\u3001\u65f6\u95f4\uff09\uff0c\u70b9\u51fb\u201c\u542f\u52a8\u201d\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u62c6\u5355\u6267\u884c\u3002<\/li>\n<li>\u53ef\u968f\u65f6\u6682\u505c\u6216\u8c03\u6574\u53c2\u6570\uff0c\u9002\u5408\u5927\u989d\u4ea4\u6613\u3002<\/li>\n<\/ul>\n<h4>K \u7ebf\u56fe\u8868<\/h4>\n<ul>\n<li>\u5728\u4e3b\u754c\u9762\u70b9\u51fb\u201c\u56fe\u8868\u201d\uff0c\u52a0\u8f7d\u5e02\u573a\u6570\u636e\u3002<\/li>\n<li>\u652f\u6301\u7f29\u653e\u548c\u62d6\u52a8\uff0c\u5b9e\u65f6\u66f4\u65b0 Tick \u6216 K \u7ebf\uff0c\u65b9\u4fbf\u6280\u672f\u5206\u6790\u3002<\/li>\n<\/ul>\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li>\u521d\u6b21\u4f7f\u7528\u65f6\uff0c\u5efa\u8bae\u5728\u6a21\u62df\u8d26\u6237\u6d4b\u8bd5\uff0c\u907f\u514d\u5b9e\u76d8\u98ce\u9669\u3002<\/li>\n<li>\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\uff0c\u786e\u4fdd\u6570\u636e\u548c\u4ea4\u6613\u6307\u4ee4\u7a33\u5b9a\u4f20\u8f93\u3002<\/li>\n<li>\u5b9a\u671f\u66f4\u65b0 VeighNa \u4ee3\u7801\uff0c\u83b7\u53d6\u6700\u65b0\u529f\u80fd\u548c\u4fee\u590d\uff1a<\/li>\n<\/ul>\n<pre><code>git pull origin master\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h2>\u5e94\u7528\u573a\u666f<\/h2>\n<ol>\n<li><strong>\u4e2a\u4eba\u6295\u8d44\u8005\u4ea4\u6613<\/strong><br \/>\n\u4e00\u4e2a\u6563\u6237\u60f3\u7528 Python \u81ea\u52a8\u5316\u4ea4\u6613\u671f\u8d27\u3002\u4ed6\u53ef\u4ee5\u7528 VeighNa \u8fde\u63a5 CTP \u63a5\u53e3\uff0c\u7f16\u5199\u7b80\u5355\u7b56\u7565\uff0c\u81ea\u52a8\u4e70\u5356\u4e3b\u529b\u5408\u7ea6\u3002<\/li>\n<li><strong>\u673a\u6784\u91cf\u5316\u7814\u7a76<\/strong><br \/>\n\u79c1\u52df\u57fa\u91d1\u9700\u8981\u6d4b\u8bd5\u65b0\u7b56\u7565\u3002\u56e2\u961f\u7528 VeighNa \u7684\u56de\u6d4b\u6a21\u5757\uff0c\u5bfc\u5165\u5386\u53f2\u6570\u636e\uff0c\u5feb\u901f\u9a8c\u8bc1\u7b56\u7565\u6548\u679c\u3002<\/li>\n<li><strong>\u9ad8\u6821\u91d1\u878d\u6559\u5b66<\/strong><br \/>\n\u5927\u5b66\u6559\u6388\u7528 VeighNa \u6f14\u793a\u91cf\u5316\u4ea4\u6613\u539f\u7406\uff0c\u5b66\u751f\u901a\u8fc7\u56fe\u5f62\u754c\u9762\u5b66\u4e60\u7b56\u7565\u5f00\u53d1\u548c\u6570\u636e\u5206\u6790\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>QA<\/h2>\n<ol>\n<li><strong>VeighNa \u652f\u6301\u54ea\u4e9b\u64cd\u4f5c\u7cfb\u7edf\uff1f<\/strong><br \/>\n\u652f\u6301 Windows 7 \u53ca\u4ee5\u4e0a\u3001Ubuntu 18.04 \u53ca\u4ee5\u4e0a\uff0cMac \u7cfb\u7edf\u9700\u624b\u52a8\u7f16\u8bd1\u90e8\u5206\u63a5\u53e3\u3002<\/li>\n<li><strong>\u5982\u4f55\u8d21\u732e\u4ee3\u7801\uff1f<\/strong><br \/>\n\u5728 GitHub \u4e0a fork VeighNa \u4ed3\u5e93\uff0c\u4fee\u6539\u540e\u63d0\u4ea4 Pull Request\uff0c\u7b49\u5f85\u5ba1\u6838\u5408\u5e76\u3002<\/li>\n<li><strong>\u6570\u636e\u4ece\u54ea\u91cc\u83b7\u53d6\uff1f<\/strong><br \/>\n\u53ef\u901a\u8fc7\u63a5\u53e3\uff08\u5982\u901a\u8054\u6570\u636e\uff09\u83b7\u53d6\uff0c\u6216\u7528\u6570\u636e\u5f55\u5236\u529f\u80fd\u4fdd\u5b58\u5b9e\u65f6\u5e02\u573a\u6570\u636e\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>VeighNa \u662f\u4e00\u4e2a\u57fa\u4e8e Python \u7684\u5f00\u6e90\u91cf\u5316\u4ea4\u6613\u5e73\u53f0\uff0c\u6700\u521d\u7531\u56fd\u5185\u79c1\u52df\u4ea4\u6613\u5458\u5f00\u53d1\uff0c2015 \u5e74\u6b63\u5f0f\u542f\u52a8\u3002\u5b83\u4ece\u7b80\u5355\u7684\u4ea4\u6613\u63a5\u53e3\u5c01\u88c5\uff0c\u53d1\u5c55\u6210\u4e86\u4e00\u4e2a\u529f\u80fd\u5168\u9762\u7684\u4ea4\u6613\u5f00\u53d1\u6846\u67b6\u3002\u7528\u6237\u5305\u62ec\u79c1\u52df\u57fa\u91d1\u3001\u8bc1\u5238\u516c\u53f8\u3001\u671f\u8d27\u516c\u53f8\u3001\u9ad8\u6821\u7814\u7a76\u673a\u6784\u548c\u4e2a\u4eba\u6295\u8d44\u8005\u3002Vei&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61720,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,377],"class_list":["post-29335","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aijinrongshujufenxi"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/29335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/comments?post=29335"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/29335\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media\/61720"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=29335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=29335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=29335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}