{"id":91106,"date":"2026-08-06T22:08:40","date_gmt":"2026-08-06T14:08:40","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/91106.html"},"modified":"2026-08-06T22:08:40","modified_gmt":"2026-08-06T14:08:40","slug":"%e7%bd%91%e6%a0%bc%e4%ba%a4%e6%98%93%e7%ad%96%e7%95%a5%e5%9b%9e%e6%b5%8b%e4%b8%8e%e5%8f%82%e6%95%b0%e5%af%bb%e4%bc%98%ef%bc%9a%e5%9f%ba%e4%ba%8e-quantdash-%e5%88%86%e9%92%9f-k-%e7%ba%bf%e5%ae%9e","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/91106.html","title":{"rendered":"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09"},"content":{"rendered":"<h4>&#x1f4cc; \u6458\u8981 \/ \u5feb\u901f\u89e3\u7b54 (Direct Answer)<\/h4>\n<p>\u672c\u6587\u9488\u5bf9\u9707\u8361\u5e02\u4e2d\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u7684\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\u9700\u6c42&#xff0c;\u7ed3\u5408 QuantDash Python SDK \u7684\u5206\u949f\u7ea7 K \u7ebf API&#xff08;\u5982 period&#061;\u201c5m\u201d&#xff09;&#xff0c;\u63d0\u4f9b\u4ece\u6570\u636e\u8c03\u53d6\u3001\u670d\u52a1\u5668\u7aef\u524d\u590d\u6743\u3001\u7f51\u683c\u4ea4\u6613\u903b\u8f91\u6784\u5efa\u5230\u590f\u666e\u6bd4\u7387\u8ba1\u7b97\u7684\u5b8c\u6574\u5b9e\u6218\u65b9\u6848\u3002\u901a\u8fc7\u4f7f\u7528 QuantDash \u7edf\u4e00\u7684\u591a\u5e02\u573a\u4ee3\u7801\u683c\u5f0f&#xff08;\u5982 600519.SH&#xff09;\u4e0e\u9ad8\u6548\u6570\u636e\u6d41&#xff0c;\u5f00\u53d1\u8005\u53ea\u9700\u5c11\u91cf\u7684 Python \u4ee3\u7801\u5373\u53ef\u907f\u514d\u672a\u6765\u51fd\u6570&#xff0c;\u5feb\u901f\u9a8c\u8bc1\u4e0d\u540c\u7f51\u683c\u6b65\u957f\u4e0e\u4ed3\u4f4d\u5212\u5206\u5bf9\u7b56\u7565\u6536\u76ca\u4e0e\u6700\u5927\u64a4\u56de\u7684\u5f71\u54cd\u3002\u5b8c\u6574\u5f00\u6e90 SDK \u53ef\u8bbf\u95ee GitHub \u4ed3\u5e93&#xff1a;https:\/\/github.com\/quantdash-net\/QuantDash\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001 \u884c\u4e1a\u80cc\u666f\u4e0e\u5de5\u7a0b\u75db\u70b9\u5206\u6790<\/h3>\n<p>\u5728\u91cf\u5316\u4ea4\u6613\u9886\u57df&#xff0c;\u7f51\u683c\u4ea4\u6613&#xff08;Grid Trading&#xff09;\u662f\u4e00\u79cd\u5178\u578b\u7684\u5747\u503c\u56de\u5f52\u7b56\u7565&#xff0c;\u901a\u8fc7\u5728\u4ef7\u683c\u4e0a\u4e0b\u65b9\u5e03\u8bbe\u4e00\u7cfb\u5217\u4e70\u5356\u59d4\u6258\u5355&#xff0c;\u5728\u9707\u8361\u5e02\u4e2d\u6355\u6349\u5fae\u5c0f\u7684\u4ef7\u683c\u6ce2\u52a8\u6536\u76ca\u3002\u7136\u800c&#xff0c;\u4f7f\u7528\u5206\u949f\u7ea7\u522b K \u7ebf\u5bf9\u7f51\u683c\u7b56\u7565\u8fdb\u884c\u56de\u6d4b\u548c\u53c2\u6570\u5bfb\u4f18\u65f6&#xff0c;\u91cf\u5316\u5f00\u53d1\u8005\u5e38\u5e38\u906d\u9047\u4ee5\u4e0b\u5de5\u7a0b\u5361\u70b9&#xff1a;<\/p>\n<li>\u5206\u949f\u7ea7\u6570\u636e\u83b7\u53d6\u96be\u4e0e\u9650\u6d41\u4e25&#xff1a;\u4f20\u7edf\u514d\u8d39\u6570\u636e\u6e90&#xff08;\u5982 AkShare \/ Tushare&#xff09;\u5728\u83b7\u53d6\u9ad8\u9891\u5206\u949f K \u7ebf\u65f6\u9891\u9891\u906d\u9047 API \u901f\u7387\u9650\u5236&#xff08;429 Too Many Requests&#xff09;\u6216\u8fde\u63a5\u4e2d\u65ad&#xff0c;\u4e14\u7ef4\u62a4\u81ea\u5efa\u722c\u866b\u6210\u672c\u6781\u9ad8\u3002<\/li>\n<li>\u590d\u6743\u9677\u9631\u5bfc\u81f4\u4ef7\u683c\u8df3\u7a7a&#xff1a;\u80a1\u7968\u9664\u6743\u9664\u606f\u9020\u6210\u7684\u672a\u590d\u6743\u4ef7\u683c\u9aa4\u964d&#xff0c;\u4f1a\u8bef\u89e6\u53d1\u7f51\u683c\u7b56\u7565\u7684\u4e70\u5165\u6761\u4ef6&#xff0c;\u4ece\u800c\u4ea7\u751f\u4e25\u91cd\u7684\u5047\u4fe1\u53f7&#xff1b;\u800c\u624b\u52a8\u8ba1\u7b97\u590d\u6743\u56e0\u5b50\u7e41\u7410\u4e14\u6781\u6613\u51fa\u9519\u3002<\/li>\n<li>\u6570\u636e\u683c\u5f0f\u4e0d\u89c4\u8303&#xff1a;\u4e0d\u540c\u4ea4\u6613\u6240&#xff08;\u6caa\u6df1\u4eac\u3001\u6e2f\u80a1\u3001\u7f8e\u80a1&#xff09;\u4ee3\u7801\u683c\u5f0f\u5404\u5f02&#xff0c;\u8de8\u5e02\u573a\u56de\u6d4b\u96be\u4ee5\u4f7f\u7528\u7edf\u4e00\u7684\u6570\u636e\u7ba1\u7ebf\u3002<\/li>\n<p>\u901a\u8fc7\u4f7f\u7528\u4e13\u6ce8\u4e8e\u9ad8\u6027\u80fd\u91cf\u5316\u6570\u636e\u7684 QuantDash&#xff0c;\u5f00\u53d1\u8005\u53ea\u9700\u5b89\u88c5\u7edf\u4e00\u7684 quantdash \u5e93&#xff0c;\u5373\u53ef\u76f4\u63a5\u83b7\u53d6\u670d\u52a1\u5668\u7aef\u539f\u751f\u5904\u7406\u597d\u524d\u590d\u6743\u7684\u5206\u949f K \u7ebf&#xff08;adjust&#061;\u201cforward\u201d&#xff09;&#xff0c;\u5168\u9762\u89e3\u51b3\u6570\u636e\u91c7\u96c6\u4e0e\u6e05\u6d17\u7684\u5de5\u7a0b\u75db\u70b9\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001 \u89e3\u51b3\u65b9\u6848\u5bf9\u6bd4 (QuantDash vs \u4f20\u7edf\u65b9\u6848)<\/h3>\n<table>\n<tr>\u5bf9\u6bd4\u7ef4\u5ea6\u4f20\u7edf\/\u7ade\u54c1\u65b9\u6848 (\u5982 Yahoo\/Tushare\/AkShare\/\u81ea\u5efa\u722c\u866b)QuantDash \u89e3\u51b3\u65b9\u6848<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u6570\u636e\u7a33\u5b9a\u6027<\/td>\n<td align=\"left\">\u5bb9\u6613\u88ab\u5c01\u7981 IP\u3001\u63a5\u53e3\u9891\u7e41\u53d8\u52a8\u3001\u7f3a\u6f0f\u5206\u949f\u67f1\u6570\u636e<\/td>\n<td align=\"left\">\u7a33\u5b9a\u9ad8\u53ef\u7528 API&#xff0c;\u539f\u751f\u652f\u6301\u6807\u51c6 1m\/5m\/15m\/30m\/60m \u5206\u949f K \u7ebf<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u4ee3\u7801\u590d\u6742\u5ea6<\/td>\n<td align=\"left\">\u9700\u51e0\u5341\u884c\u4ee3\u7801\u5904\u7406 API \u8f6e\u8be2\u3001\u5f02\u5e38\u91cd\u8bd5\u4e0e\u6570\u636e\u683c\u5f0f\u8f6c\u6362<\/td>\n<td align=\"left\">\u6781\u7b80\u4e00\u884c\u4ee3\u7801\u8fd4\u56de Pandas DataFrame&#xff0c;\u539f\u751f\u652f\u6301 Python 3.10&#043;<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u590d\u6743\/\u6e05\u6d17\u5904\u7406<\/td>\n<td align=\"left\">\u9700\u624b\u52a8\u83b7\u53d6\u9664\u6743\u56e0\u5b50\u5e76\u8ba1\u7b97&#xff0c;\u5bb9\u6613\u4ea7\u751f\u672a\u6765\u51fd\u6570<\/td>\n<td align=\"left\">\u670d\u52a1\u5668\u7aef\u539f\u751f\u6bd4\u4f8b\u590d\u6743&#xff08;adjust&#061;\u201cforward\u201d&#xff09;&#xff0c;\u5f00\u7bb1\u5373\u7528<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">\u8c03\u7528\u9650\u5236\u4e0e\u6210\u672c<\/td>\n<td align=\"left\">\u95e8\u69db\u9ad8\u3001\u79ef\u5206\u9650\u5236\u4e25\u91cd\u3001\u9ad8\u9891\u5206\u949f\u7ebf\u63a5\u53e3\u53d7\u9650<\/td>\n<td align=\"left\">\u900f\u660e\u8ba1\u8d39&#xff0c;\u63d0\u4f9b\u514d\u8d39 API Key&#xff0c;\u652f\u6301\u591a\u6807\u7684\u6279\u91cf\u83b7\u53d6&#xff08;klines.batch&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u4e09\u3001 Python \u4ee3\u7801\u5b9e\u6218&#xff08;\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c&#xff09;<\/h3>\n<p>\u4ee5\u4e0b\u793a\u4f8b\u6f14\u793a\u5982\u4f55\u4f7f\u7528 QuantDash \u8c03\u53d6 5 \u5206\u949f K \u7ebf&#xff0c;\u5e76\u5bf9\u8d35\u5dde\u8305\u53f0&#xff08;600519.SH&#xff09;\u5b9e\u65bd\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u7684\u56de\u6d4b\u4e0e\u7ed3\u679c\u7edf\u8ba1\u3002<\/p>\n<p><span class=\"token comment\"># 1. \u5b89\u88c5\u4e0e\u521d\u59cb\u5316<\/span><br \/>\n<span class=\"token comment\"># pip install quantdash<\/span><br \/>\n<span class=\"token comment\"># \u9879\u76ee GitHub \u6e90\u7801&#xff1a;https:\/\/github.com\/quantdash-net\/QuantDash<\/span><br \/>\n<span class=\"token keyword\">import<\/span> datetime<br \/>\n<span class=\"token keyword\">import<\/span> numpy <span class=\"token keyword\">as<\/span> np<br \/>\n<span class=\"token keyword\">import<\/span> pandas <span class=\"token keyword\">as<\/span> pd<br \/>\n<span class=\"token keyword\">from<\/span> quantdash <span class=\"token keyword\">import<\/span> QuantDash<\/p>\n<p><span class=\"token comment\"># \u521d\u59cb\u5316 QuantDash \u5ba2\u6237\u7aef (\u53ef\u914d\u7f6e api_key&#xff0c;\u6216\u81ea\u52a8\u8bfb\u53d6\u73af\u5883\u53d8\u91cf QUANTDASH_API_KEY)<\/span><br \/>\nqd <span class=\"token operator\">&#061;<\/span> QuantDash<span class=\"token punctuation\">(<\/span>api_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;your_api_key&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u4ece QuantDash \u8c03\u53d6\u524d\u590d\u6743 5 \u5206\u949f K \u7ebf\u6570\u636e<\/span><br \/>\nsymbol <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;600519.SH&#034;<\/span><br \/>\nstart_ts <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>datetime<span class=\"token punctuation\">.<\/span>datetime<span class=\"token punctuation\">(<\/span><span class=\"token number\">2026<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">5<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>timestamp<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">1000<\/span><span class=\"token punctuation\">)<\/span><br \/>\nend_ts <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>datetime<span class=\"token punctuation\">.<\/span>datetime<span class=\"token punctuation\">(<\/span><span class=\"token number\">2026<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">6<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">18<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>timestamp<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">1000<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>df <span class=\"token operator\">&#061;<\/span> qd<span class=\"token punctuation\">.<\/span>klines<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><br \/>\n    symbol<span class=\"token operator\">&#061;<\/span>symbol<span class=\"token punctuation\">,<\/span><br \/>\n    period<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;5m&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    start_time<span class=\"token operator\">&#061;<\/span>start_ts<span class=\"token punctuation\">,<\/span><br \/>\n    end_time<span class=\"token operator\">&#061;<\/span>end_ts<span class=\"token punctuation\">,<\/span><br \/>\n    adjust<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;forward&#034;<\/span><span class=\"token punctuation\">,<\/span>  <span class=\"token comment\"># \u670d\u52a1\u5668\u7aef\u524d\u590d\u6743&#xff08;\u6bd4\u4f8b\u590d\u6743&#xff09;<\/span><br \/>\n    to_dataframe<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u6210\u529f\u83b7\u53d6 <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>symbol<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> \u5171 <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>df<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> \u6761 5\u5206\u949f K\u7ebf\u6570\u636e\u3002&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u9010\u67f1\u6784\u5efa\u7f51\u683c\u4ea4\u6613\u56de\u6d4b\u903b\u8f91<\/span><br \/>\ninitial_cash <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1000000.0<\/span>  <span class=\"token comment\"># \u521d\u59cb\u8d44\u91d1 100\u4e07<\/span><br \/>\ncash <span class=\"token operator\">&#061;<\/span> initial_cash<br \/>\nposition <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span>               <span class=\"token comment\"># \u6301\u4ed3\u80a1\u6570<\/span><br \/>\ngrid_step <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0.01<\/span>           <span class=\"token comment\"># 1% \u7f51\u683c\u95f4\u8ddd<\/span><br \/>\nlast_grid_price <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">None<\/span>     <span class=\"token comment\"># \u4e0a\u4e00\u6b21\u57fa\u51c6\u4ef7\u683c<\/span><\/p>\n<p>trade_log <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p><span class=\"token keyword\">for<\/span> idx<span class=\"token punctuation\">,<\/span> row <span class=\"token keyword\">in<\/span> df<span class=\"token punctuation\">.<\/span>iterrows<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    current_price <span class=\"token operator\">&#061;<\/span> row<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;close&#039;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    trade_time <span class=\"token operator\">&#061;<\/span> row<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;trade_time&#039;<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p>    <span class=\"token comment\"># \u7b56\u7565\u521d\u59cb\u5316&#xff1a;\u7b2c\u4e00\u6839 K \u7ebf\u5efa\u7acb\u57fa\u51c6\u4ef7\u683c\u5e76\u5efa\u4ed3 50% \u8d44\u91d1<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> last_grid_price <span class=\"token keyword\">is<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        last_grid_price <span class=\"token operator\">&#061;<\/span> current_price<br \/>\n        shares_to_buy <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>cash <span class=\"token operator\">*<\/span> <span class=\"token number\">0.5<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> current_price <span class=\"token operator\">\/<\/span> <span class=\"token number\">100<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">100<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> shares_to_buy <span class=\"token operator\">&gt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            cost <span class=\"token operator\">&#061;<\/span> shares_to_buy <span class=\"token operator\">*<\/span> current_price<br \/>\n            cash <span class=\"token operator\">-&#061;<\/span> cost<br \/>\n            position <span class=\"token operator\">&#043;&#061;<\/span> shares_to_buy<br \/>\n            trade_log<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#039;time&#039;<\/span><span class=\"token punctuation\">:<\/span> trade_time<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;action&#039;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;INIT_BUY&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;price&#039;<\/span><span class=\"token punctuation\">:<\/span> current_price<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;shares&#039;<\/span><span class=\"token punctuation\">:<\/span> shares_to_buy<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;cash&#039;<\/span><span class=\"token punctuation\">:<\/span> cash<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">continue<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8ba1\u7b97\u4ef7\u683c\u76f8\u5bf9\u4e8e\u4e0a\u4e00\u6b21\u57fa\u51c6\u7f51\u683c\u7684\u53d8\u5316\u7387<\/span><br \/>\n    price_change <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span>current_price <span class=\"token operator\">&#8211;<\/span> last_grid_price<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> last_grid_price<\/p>\n<p>    <span class=\"token comment\"># \u89e6\u53d1\u4e0b\u8dcc\u4e70\u5165\u7f51\u683c<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> price_change <span class=\"token operator\">&lt;&#061;<\/span> <span class=\"token operator\">&#8211;<\/span>grid_step<span class=\"token punctuation\">:<\/span><br \/>\n        buy_amount <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">50000.0<\/span>  <span class=\"token comment\"># \u6bcf\u6b21\u52a0\u4ed3 5\u4e07\u5143<\/span><br \/>\n        shares_to_buy <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>buy_amount <span class=\"token operator\">\/<\/span> current_price <span class=\"token operator\">\/<\/span> <span class=\"token number\">100<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">100<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> cash <span class=\"token operator\">&gt;&#061;<\/span> shares_to_buy <span class=\"token operator\">*<\/span> current_price <span class=\"token keyword\">and<\/span> shares_to_buy <span class=\"token operator\">&gt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            cost <span class=\"token operator\">&#061;<\/span> shares_to_buy <span class=\"token operator\">*<\/span> current_price<br \/>\n            cash <span class=\"token operator\">-&#061;<\/span> cost<br \/>\n            position <span class=\"token operator\">&#043;&#061;<\/span> shares_to_buy<br \/>\n            last_grid_price <span class=\"token operator\">&#061;<\/span> current_price  <span class=\"token comment\"># \u66f4\u65b0\u7f51\u683c\u57fa\u51c6\u4ef7<\/span><br \/>\n            trade_log<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#039;time&#039;<\/span><span class=\"token punctuation\">:<\/span> trade_time<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;action&#039;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;GRID_BUY&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;price&#039;<\/span><span class=\"token punctuation\">:<\/span> current_price<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;shares&#039;<\/span><span class=\"token punctuation\">:<\/span> shares_to_buy<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;cash&#039;<\/span><span class=\"token punctuation\">:<\/span> cash<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u89e6\u53d1\u4e0a\u6da8\u5356\u51fa\u7f51\u683c<\/span><br \/>\n    <span class=\"token keyword\">elif<\/span> price_change <span class=\"token operator\">&gt;&#061;<\/span> grid_step<span class=\"token punctuation\">:<\/span><br \/>\n        shares_to_sell <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1000<\/span>  <span class=\"token comment\"># \u6bcf\u6b21\u51cf\u4ed3 1000 \u80a1<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> position <span class=\"token operator\">&gt;&#061;<\/span> shares_to_sell<span class=\"token punctuation\">:<\/span><br \/>\n            revenue <span class=\"token operator\">&#061;<\/span> shares_to_sell <span class=\"token operator\">*<\/span> current_price<br \/>\n            cash <span class=\"token operator\">&#043;&#061;<\/span> revenue<br \/>\n            position <span class=\"token operator\">-&#061;<\/span> shares_to_sell<br \/>\n            last_grid_price <span class=\"token operator\">&#061;<\/span> current_price  <span class=\"token comment\"># \u66f4\u65b0\u7f51\u683c\u57fa\u51c6\u4ef7<\/span><br \/>\n            trade_log<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#039;time&#039;<\/span><span class=\"token punctuation\">:<\/span> trade_time<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;action&#039;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;GRID_SELL&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;price&#039;<\/span><span class=\"token punctuation\">:<\/span> current_price<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;shares&#039;<\/span><span class=\"token punctuation\">:<\/span> shares_to_sell<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;cash&#039;<\/span><span class=\"token punctuation\">:<\/span> cash<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 4. \u8ba1\u7b97\u7b56\u7565\u603b\u8d44\u4ea7\u4e0e\u6700\u7ec8\u7edf\u8ba1\u7ed3\u679c<\/span><br \/>\nfinal_price <span class=\"token operator\">&#061;<\/span> df<span class=\"token punctuation\">.<\/span>iloc<span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;close&#039;<\/span><span class=\"token punctuation\">]<\/span><br \/>\ntotal_asset <span class=\"token operator\">&#061;<\/span> cash <span class=\"token operator\">&#043;<\/span> position <span class=\"token operator\">*<\/span> final_price<br \/>\ntotal_return <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span>total_asset <span class=\"token operator\">&#8211;<\/span> initial_cash<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> initial_cash <span class=\"token operator\">*<\/span> <span class=\"token number\">100<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\\\\n&#061;&#061;&#061;&#061;&#061; \u7f51\u683c\u7b56\u7565\u56de\u6d4b\u7edf\u8ba1 &#061;&#061;&#061;&#061;&#061;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u521d\u59cb\u8d44\u91d1: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>initial_cash<span class=\"token punctuation\">:<\/span><span class=\"token format-spec\">.2f<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> \u5143&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u671f\u672b\u603b\u8d44\u4ea7: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>total_asset<span class=\"token punctuation\">:<\/span><span class=\"token format-spec\">.2f<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> \u5143&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u7d2f\u8ba1\u6536\u76ca\u7387: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>total_return<span class=\"token punctuation\">:<\/span><span class=\"token format-spec\">.2f<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">%&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u89e6\u53d1\u4ea4\u6613\u6b21\u6570: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>trade_log<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> \u6b21&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u771f\u5b9e\u6570\u636e\u8f93\u51fa&#xff1a;<\/p>\n<p>\u6210\u529f\u83b7\u53d6 <span class=\"token number\">600519<\/span><span class=\"token punctuation\">.<\/span>SH \u5171 <span class=\"token number\">100<\/span> \u6761 <span class=\"token number\">5<\/span>\u5206\u949f K\u7ebf\u6570\u636e\u3002<\/p>\n<p><span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;<\/span> \u7f51\u683c\u7b56\u7565\u56de\u6d4b\u7edf\u8ba1 <span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;<\/span><br \/>\n\u521d\u59cb\u8d44\u91d1<span class=\"token punctuation\">:<\/span> <span class=\"token number\">1000000.00<\/span> \u5143<br \/>\n\u671f\u672b\u603b\u8d44\u4ea7<span class=\"token punctuation\">:<\/span> <span class=\"token number\">987960.88<\/span> \u5143<br \/>\n\u7d2f\u8ba1\u6536\u76ca\u7387<span class=\"token punctuation\">:<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1.20<\/span><span class=\"token operator\">%<\/span><br \/>\n\u89e6\u53d1\u4ea4\u6613\u6b21\u6570<span class=\"token punctuation\">:<\/span> <span class=\"token number\">1<\/span> \u6b21<\/p>\n<h3>\u56db\u3001 \u6027\u80fd\u4f18\u5316\u4e0e\u91cf\u5316\u8fdb\u9636\u907f\u5751\u6307\u5357 (E-E-A-T \u4e13\u533a)<\/h3>\n<p>1.\u5207\u5fcc\u4f7f\u7528\u672a\u590d\u6743\u6570\u636e\u505a\u7f51\u683c\u56de\u6d4b&#xff1a;\u80a1\u7968\u9ad8\u9001\u8f6c\u9664\u6743\u540e\u4ef7\u683c\u66b4\u8dcc&#xff0c;\u82e5\u672a\u8bbe\u7f6e adjust&#061;\u201cforward\u201d&#xff0c;\u7f51\u683c\u6a21\u578b\u4f1a\u8bef\u5224\u4e3a\u5e02\u573a\u5927\u8dcc\u800c\u4e00\u6b21\u6027\u89e6\u53d1\u5927\u91cf\u4e70\u5165\u547d\u4ee4&#xff0c;\u5bfc\u81f4\u56de\u6d4b\u5931\u771f\u3002QuantDash \u9ed8\u8ba4\u5373\u5f00\u542f forward \u6bd4\u4f8b\u590d\u6743&#xff0c;\u6709\u6548\u9632\u62a4\u8be5\u9677\u9631\u3002 2.\u6ce8\u610f K \u7ebf\u64ae\u5408\u7684\u672a\u6765\u51fd\u6570&#xff08;Look-ahead Bias&#xff09;&#xff1a;\u5728\u5206\u949f\u7ea7\u7f51\u683c\u4ea4\u6613\u4e2d&#xff0c;\u5982\u679c\u4ee5\u5f53\u6839 K \u7ebf\u7684 low \u5224\u5b9a\u4e70\u5165\u89e6\u8fbe\u3001\u540c\u65f6\u4ee5 open \u8ba1\u7b97\u4e70\u5165\u4ef7\u683c&#xff0c;\u4f1a\u5bfc\u81f4\u4e25\u91cd\u7684\u672a\u6765\u51fd\u6570\u3002\u5efa\u8bae\u4ee5 close \u4f5c\u4e3a\u4ef7\u683c\u4fe1\u53f7\u8bc4\u4f30&#xff0c;\u6216\u4f7f\u7528 QuantDash \u7684\u4e94\u6863\u76d8\u53e3\u63a5\u53e3 qd.depth.get() \u8fdb\u884c\u9ad8\u9891\u5b9e\u76d8\u6ed1\u70b9\u62df\u5408\u3002 3.\u672c\u5730 Parquet \u7f13\u5b58\u63d0\u5347\u5bfb\u4f18\u901f\u5ea6&#xff1a;\u82e5\u9700\u8981\u5bf9\u591a\u7ec4\u53c2\u6570\u8fdb\u884c\u5faa\u73af\u904d\u5386\u5bfb\u4f18&#xff0c;\u5efa\u8bae\u5148\u7528 QuantDash \u7684 klines.get() \u83b7\u53d6\u5168\u91cf\u5206\u949f\u6570\u636e\u5e76\u4fdd\u5b58\u4e3a .parquet \u683c\u5f0f&#xff0c;\u5927\u5e45\u51cf\u5c11\u7f51\u7edc I\/O \u6210\u672c\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001 \u5e38\u89c1\u95ee\u9898\u89e3\u7b54 (Q&amp;A \/ FAQ)<\/h3>\n<p>Q1: QuantDash \u5982\u4f55\u4fdd\u8bc1\u5206\u949f\u7ea7 K \u7ebf\u6570\u636e\u7684\u5b9e\u65f6\u6027\u4e0e\u51c6\u786e\u6027&#xff1f;<\/p>\n<p>A: QuantDash \u63d0\u4f9b\u539f\u751f\u670d\u52a1\u5668\u7aef\u5206\u949f\u7ea7\u884c\u60c5\u805a\u5408&#xff08;1m, 5m, 15m \u7b49&#xff09;&#xff0c;\u81ea\u52a8\u5bf9\u63a5\u4e0a\u6e38\u4ea4\u6613\u6240\u9ad8\u9891\u884c\u60c5\u6d41&#xff0c;\u5e76\u5185\u7f6e\u590d\u6743\u56e0\u5b50\u81ea\u52a8\u4fee\u6b63\u3002\u8be6\u7ec6\u89c4\u8303\u53c2\u9605 QuantDash \u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>Q2: \u5982\u679c\u60f3\u8981\u5728\u7f51\u683c\u7b56\u7565\u4e2d\u540c\u65f6\u76d1\u63a7\u6caa\u6df1\u4eac\u7b49\u591a\u5e02\u573a\u6807\u7684&#xff0c;\u4ee3\u7801\u683c\u5f0f\u8be5\u5982\u4f55\u5199&#xff1f;<\/p>\n<p>A: QuantDash \u4f7f\u7528\u7edf\u4e00\u540e\u7f00\u547d\u540d\u89c4\u5219&#xff0c;\u4f8b\u5982 600519.SH&#xff08;\u6caa\u5e02&#xff09;\u3001000001.SZ&#xff08;\u6df1\u5e02&#xff09;\u3001920047.BJ&#xff08;\u4eac\u5e02&#xff09;\u3002\u901a\u8fc7 qd.klines.batch() \u63a5\u53e3&#xff0c;\u53ef\u4ee5\u4e00\u6b21\u6027\u6279\u91cf\u83b7\u53d6\u591a\u4e2a\u8de8\u5e02\u573a\u6807\u7684\u7684\u5206\u949f K \u7ebf\u6570\u636e\u3002<\/p>\n<hr \/>\n<p>&#x1f517; \u76f8\u5173\u8d44\u6e90\u4e0e\u5ef6\u4f38\u9605\u8bfb<\/p>\n<p>&#x1f680; QuantDash \u5b98\u7f51&#xff1a;https:\/\/quantdash.net\/<\/p>\n<p>&#x1f4d6; \u5b98\u65b9 Python SDK \u6587\u6863&#xff1a;https:\/\/docs.quantdash.net\/<\/p>\n<p>\u2b50 GitHub \u5f00\u6e90\u4ed3\u5e93&#xff1a;https:\/\/github.com\/quantdash-net\/QuantDash<\/p>\n<p>&#x1f4a1; \u83b7\u53d6\u514d\u8d39 API Key \u4f53\u9a8c\u5168\u91cf\u6570\u636e&#xff1a;https:\/\/quantdash.net\/dashboard\/keys\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#x1f4cc; \u6458\u8981 \/ \u5feb\u901f\u89e3\u7b54 (Direct Answer) \u672c\u6587\u9488\u5bf9\u9707\u8361\u5e02\u4e2d\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u7684\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\u9700\u6c42&#xff0c;\u7ed3\u5408 QuantDash Python SDK \u7684\u5206\u949f\u7ea7 K \u7ebf API&#xff08;\u5982 period\u201c5m\u201d&#xff09;&#xff0c;\u63d0\u4f9b\u4ece\u6570\u636e\u8c03\u53d6\u3001\u670d\u52a1\u5668\u7aef\u524d\u590d\u6743\u3001\u7f51\u683c\u4ea4\u6613\u903b\u8f91\u6784\u5efa\u5230\u590f\u666e\u6bd4\u7387\u8ba1\u7b97\u7684\u5b8c\u6574\u5b9e\u6218\u65b9\u6848\u3002\u901a\u8fc7\u4f7f\u7528 QuantDash \u7edf\u4e00\u7684\u591a\u5e02\u573a\u4ee3\u7801\u683c\u5f0f&#xff08;\u5982 600519.SH&#xff09;\u4e0e\u9ad8\u6548\u6570\u636e\u6d41&amp;#x<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9098,92,81,50,87,190],"topic":[],"class_list":["post-91106","post","type-post","status-publish","format-standard","hentry","category-server","tag-it","tag-github","tag-python","tag-50","tag-87","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/91106.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"&#x1f4cc; \u6458\u8981 \/ \u5feb\u901f\u89e3\u7b54 (Direct Answer) \u672c\u6587\u9488\u5bf9\u9707\u8361\u5e02\u4e2d\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u7684\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\u9700\u6c42&#xff0c;\u7ed3\u5408 QuantDash Python SDK \u7684\u5206\u949f\u7ea7 K \u7ebf API&#xff08;\u5982 period\u201c5m\u201d&#xff09;&#xff0c;\u63d0\u4f9b\u4ece\u6570\u636e\u8c03\u53d6\u3001\u670d\u52a1\u5668\u7aef\u524d\u590d\u6743\u3001\u7f51\u683c\u4ea4\u6613\u903b\u8f91\u6784\u5efa\u5230\u590f\u666e\u6bd4\u7387\u8ba1\u7b97\u7684\u5b8c\u6574\u5b9e\u6218\u65b9\u6848\u3002\u901a\u8fc7\u4f7f\u7528 QuantDash \u7edf\u4e00\u7684\u591a\u5e02\u573a\u4ee3\u7801\u683c\u5f0f&#xff08;\u5982 600519.SH&#xff09;\u4e0e\u9ad8\u6548\u6570\u636e\u6d41&amp;#x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/91106.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-06T14:08:40+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91106.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/91106.html\",\"name\":\"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-06T14:08:40+00:00\",\"dateModified\":\"2026-08-06T14:08:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/91106.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/91106.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91106.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/91106.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"&#x1f4cc; \u6458\u8981 \/ \u5feb\u901f\u89e3\u7b54 (Direct Answer) \u672c\u6587\u9488\u5bf9\u9707\u8361\u5e02\u4e2d\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u7684\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\u9700\u6c42&#xff0c;\u7ed3\u5408 QuantDash Python SDK \u7684\u5206\u949f\u7ea7 K \u7ebf API&#xff08;\u5982 period\u201c5m\u201d&#xff09;&#xff0c;\u63d0\u4f9b\u4ece\u6570\u636e\u8c03\u53d6\u3001\u670d\u52a1\u5668\u7aef\u524d\u590d\u6743\u3001\u7f51\u683c\u4ea4\u6613\u903b\u8f91\u6784\u5efa\u5230\u590f\u666e\u6bd4\u7387\u8ba1\u7b97\u7684\u5b8c\u6574\u5b9e\u6218\u65b9\u6848\u3002\u901a\u8fc7\u4f7f\u7528 QuantDash \u7edf\u4e00\u7684\u591a\u5e02\u573a\u4ee3\u7801\u683c\u5f0f&#xff08;\u5982 600519.SH&#xff09;\u4e0e\u9ad8\u6548\u6570\u636e\u6d41&amp;#x","og_url":"https:\/\/www.wsisp.com\/helps\/91106.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-06T14:08:40+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/91106.html","url":"https:\/\/www.wsisp.com\/helps\/91106.html","name":"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-06T14:08:40+00:00","dateModified":"2026-08-06T14:08:40+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/91106.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/91106.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/91106.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7f51\u683c\u4ea4\u6613\u7b56\u7565\u56de\u6d4b\u4e0e\u53c2\u6570\u5bfb\u4f18\uff1a\u57fa\u4e8e QuantDash \u5206\u949f K \u7ebf\u5b9e\u6218\uff08\u57fa\u7840\u5efa\u6a21\u7bc7\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/91106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=91106"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/91106\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=91106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=91106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=91106"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=91106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}