{"id":4928,"date":"2026-09-17T07:15:00","date_gmt":"2026-09-16T23:15:00","guid":{"rendered":"https:\/\/laoyulaoyu.com\/?p=4928"},"modified":"2026-09-15T10:15:23","modified_gmt":"2026-09-15T02:15:23","slug":"%e5%88%ab%e5%86%8d%e6%89%8b%e6%89%93%e5%9b%9e%e6%b5%8b%e8%a7%84%e5%88%99%e4%ba%86%ef%bc%81%e6%88%91%e6%8a%8a%e9%87%8f%e5%8c%96%e7%ad%96%e7%95%a5%e5%81%9a%e6%88%90-ai-%e6%8a%80%e8%83%bd%ef%bc%8c","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2026\/09\/17\/%e5%88%ab%e5%86%8d%e6%89%8b%e6%89%93%e5%9b%9e%e6%b5%8b%e8%a7%84%e5%88%99%e4%ba%86%ef%bc%81%e6%88%91%e6%8a%8a%e9%87%8f%e5%8c%96%e7%ad%96%e7%95%a5%e5%81%9a%e6%88%90-ai-%e6%8a%80%e8%83%bd%ef%bc%8c\/","title":{"rendered":"\u522b\u518d\u624b\u6253\u56de\u6d4b\u89c4\u5219\u4e86\uff01\u6211\u628a\u91cf\u5316\u7b56\u7565\u505a\u6210 AI \u6280\u80fd\uff0c\u6362\u6807\u7684\u53ea\u9700\u4e00\u53e5\u8bdd"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u4f5c \u8005\uff1a<a href=\"https:\/\/www.laoyulaoyu.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u8001\u4f59\u635e\u9c7c<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">\u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002<\/mark><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"900\" height=\"383\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-9.png\" alt=\"\" class=\"wp-image-4929\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-9.png 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-9-300x128.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-9-768x327.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-left wp-block-paragraph\">\u672c\u6587\u7ea6 3700 \u5b57 | \u9605\u8bfb\u9884\u8ba1\u9700 6-8\u00a0\u5206\u949f\uff0c\u524d\u534a\u662f\u4ecb\u7ecd\u548c\u5b89\u88c5\uff0c\u540e\u534a\u6709\u5b8c\u6574\u4ee3\u7801\uff0c\u5efa\u8bae\u5148\u6536\u85cf\u3002<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">\u00b7 \u00b7 \u00b7<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u8fd9\u662f\u4e2a\u4ec0\u4e48\u4e1c\u897f<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u5468\u56db\u665a\u4e0a\uff0c\u6211\u65b0\u5f00\u4e00\u4e2a AI \u5bf9\u8bdd\uff0c\u51c6\u5907\u91cd\u8dd1\u4e00\u4e2a\u8001\u7b56\u7565\u3002\u7b2c\u4e00\u4ef6\u4e8b\uff0c\u628a\u89c4\u5219\u91cd\u65b0\u5199\u4e00\u904d\u3002RSI \u4f4e\u4e8e 30 \u8fdb\u573a\uff0c\u9ad8\u4e8e 70 \u79bb\u573a\uff0c\u533a\u95f4\u4e94\u5e74\uff0c\u8d77\u6b65\u4e00\u4e07\u3002\u6253\u5b8c\u6211\u76ef\u7740\u5c4f\u5e55\u53d1\u5446\uff0c\u4e0a\u4e2a\u5bf9\u8bdd\u91cc\uff0c\u5b83\u660e\u660e\u5df2\u7ecf\u5199\u8fc7\u4e00\u6a21\u4e00\u6837\u7684\u4e1c\u897f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e8b\u540e\u6765\u8ba9\u6211\u60f3\u8d77\u4e00\u4e2a\u5199\u4ee3\u7801\u7684\u6d41\u6d3e\uff0c\u540d\u5b57\u8d77\u5f97\u968f\u610f\uff0c\u53eb\u9a6c\u5c3e\u8fab\u7f16\u7a0b\uff08ponytail coding\uff09\u3002\u6838\u5fc3\u5c31\u4e00\u53e5\u8bdd\uff0c\u4ee3\u7801\u5199\u5230\u521a\u597d\u80fd\u7528\u5c31\u505c\u7b14\uff0c\u80fd\u5c11\u5199\u4e00\u884c\u662f\u4e00\u884c\u3002\u6709\u4eba\u8ba4\u771f\u7b97\u8fc7\u8d26\uff0c\u8fd9\u4e48\u5199\uff0c\u5582\u7ed9 AI \u7684 token \u8d26\u5355\u6700\u9ad8\u80fd\u7701\u4e5d\u6210\u3002GitHub \u4e0a\u8fd8\u6709\u4e2a\u540c\u540d\u4ed3\u5e93 ponytail\uff0c\u6211\u90a3\u5957 RSI \u56de\u6d4b\u57fa\u7ebf\u5c31\u7167\u8fd9\u4e2a\u8def\u5b50\u5199\u7684\uff0c\u51e0\u5341\u884c\uff0c\u8dd1\u4e00\u6b21\u6254\u4e00\u6b21\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u61d2\u4eba\u4e5f\u6709\u61d2\u4eba\u7684\u70e6\u607c\u3002\u57fa\u7ebf\u5199\u5f97\u518d\u7701\u4e8b\uff0c\u8dd1\u4e00\u6b21\u4e5f\u5c31\u5b8c\u4e86\uff0c\u6362\u4e2a\u6807\u7684\u8fd8\u5f97\u6539\u4ee3\u7801\uff0c\u6362\u4e2a\u5bf9\u8bdd\u8fd8\u5f97\u91cd\u65b0\u4ea4\u4ee3\u3002\u6211\u60f3\u628a\u5b83\u53d8\u6210\u968f\u53eb\u968f\u5230\u7684\u80fd\u529b\uff0c\u4efb\u4f55\u6807\u7684\u3001\u4efb\u4f55\u533a\u95f4\uff0c\u4e00\u53e5\u8bdd\u5c31\u80fd\u518d\u8dd1\u4e00\u904d\u3002\u8fd9\u4e8b\u6700\u540e\u662f\u5728\u8c37\u6b4c\u7684 AI \u7f16\u7a0b\u4ee3\u7406 Antigravity \u91cc\u505a\u6210\u7684\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u6240\u8c13\u7684\u6280\u80fd\uff08skill\uff09\uff0c\u4f60\u53ef\u4ee5\u7406\u89e3\u6210\u7ed9 AI \u7684\u4e00\u5f20\u5c97\u4f4d\u8bf4\u660e\u4e66\u3002\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u4e00\u4efd SKILL.md \u52a0\u51e0\u4e2a\u811a\u672c\u3002SKILL.md \u5f00\u5934\u4e24\u884c\uff0c\u5199\u6e05\u8fd9\u4e2a\u6280\u80fd\u53eb\u4ec0\u4e48\u3001\u4ec0\u4e48\u65f6\u5019\u8be5\u7528\u5b83\uff0c\u6b63\u6587\u5199\u660e\u767d\u600e\u4e48\u8c03\u3001\u9ed8\u8ba4\u53c2\u6570\u662f\u4ec0\u4e48\u3002AI \u5e73\u65f6\u53ea\u626b\u4e00\u773c\u8bf4\u660e\u4e66\u5c01\u76ae\uff0c\u6d3b\u513f\u5bf9\u4e0a\u4e86\u624d\u7ffb\u5f00\u7ec6\u8bfb\uff0c\u91cc\u9762\u7684\u811a\u672c\u539f\u6837\u7167\u8dd1\uff0c\u4e0d\u95ee\u7ec6\u8282\u3002\u5b98\u65b9\u7ba1\u8fd9\u5957\u673a\u5236\u53eb\u6e10\u8fdb\u5f0f\u62ab\u9732\uff0c\u542c\u7740\u7384\uff0c\u5176\u5b9e\u5c31\u662f\u5e73\u65f6\u4e0d\u5360 AI \u7684\u8111\u5b50\uff0c\u5e72\u6d3b\u624d\u8ba9\u5b83\u7ffb\u5f00\u770b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u683c\u5f0f\u4e5f\u4e0d\u662f\u8c37\u6b4c\u72ec\u4e00\u4efd\u3002Gemini CLI\u3001Claude Code \u8fd9\u4e9b\u5de5\u5177\uff0c\u8ba4\u7684\u90fd\u662f\u540c\u4e00\u5957 SKILL.md\uff0c\u6211\u81ea\u5df1\u5199\u6587\u7ae0\u7528\u7684\u8fd9\u5957 AI \u5de5\u4f5c\u6d41\uff0c\u6280\u80fd\u4e5f\u662f\u540c\u4e00\u4e2a\u5199\u6cd5\u3002\u8c37\u6b4c\u751a\u81f3\u628a\u81ea\u5df1\u66f4\u8001\u7684 workflow \u673a\u5236\u90fd\u505c\u4e86\uff0c\u4eca\u5e74 11 \u6708 1 \u65e5\u6b63\u5f0f\u9000\u5f79\uff0c\u5168\u90e8\u5e76\u5230\u6280\u80fd\u4e0a\u3002\u5927\u5382\u4eec\u62bc\u7684\u662f\u540c\u4e00\u4e2a\u65b9\u5411\uff0c\u8fd9\u6bd4\u4ec0\u4e48\u90fd\u6709\u8bf4\u670d\u529b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf4\u56de\u91cf\u5316\u3002\u4f60\u7684\u6bcf\u4e00\u6761\u56de\u6d4b\u89c4\u5219\uff0c\u90fd\u53ef\u4ee5\u8fd9\u6837\u88c5\u8fdb\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u53d8\u6210 AI \u968f\u53eb\u968f\u5230\u7684\u4e00\u9879\u624b\u827a\u3002\u60f3\u6362\u6807\u7684\u6362\u533a\u95f4\uff0c\u5f20\u5634\u5c31\u884c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u6211\u5b9e\u6d4b\u7684\u7ed3\u679c\uff0c\u5148\u7ed9\u7b54\u6848<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u88c5\u4e86\u4e24\u4e2a\u6280\u80fd\u3002\u7b2c\u4e00\u6761 RSI(14)\uff0c\u4f4e\u4e8e 30 \u8fdb\u573a\uff0c\u9ad8\u4e8e 70 \u79bb\u573a\uff0c\u53ea\u505a\u591a\u3002\u7b2c\u4e8c\u6761\u5e03\u6797\u5e26(20, 2\u03c3)\uff0c\u6536\u76d8\u8dcc\u7834\u4e0b\u8f68\u8fdb\u573a\uff0c\u5347\u7834\u4e0a\u8f68\u79bb\u573a\uff0c\u540c\u6837\u662f\u53ea\u505a\u591a\u3002\u5404\u81ea\u5305\u6210\u4e00\u4efd SKILL.md \u52a0\u4e00\u4efd\u811a\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u662f\u4f7f\u7528\u65b9\u5f0f\u3002\u6211\u5728\u5bf9\u8bdd\u6846\u91cc\u6572\u4e00\u884c\u5b57\uff0c\u6267\u884c RSI \u6280\u80fd\uff0c\u5206\u6790 TSLA\u3002\u4e94\u5e74\u533a\u95f4\uff0c\u4e00\u4e07\u7f8e\u5143\u8d77\u6b65\uff0c\u7ee9\u6548\u8868\u548c\u4ea4\u6613\u6d41\u6c34\u4e00\u5206\u949f\u5185\u6446\u5728\u9762\u524d\u3002\u5e03\u6797\u5e26\u6280\u80fd\u540c\u7406\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u770b\u597d\u7684\u4e00\u9762\u3002\u6280\u80fd\u5316\u4e4b\u540e\u786e\u5b9e\u4e1d\u6ed1\u3002\u6362\u6807\u7684\u6539\u4e24\u4e2a\u8bcd\uff0c\u6362\u533a\u95f4\u6539\u4e00\u4e2a\u6570\uff0c\u4ee3\u7406\u5168\u7a0b\u81ea\u5df1\u8dd1\u3002\u89c4\u5219\u903b\u8f91\u4e00\u6b21\u90fd\u4e0d\u7528\u518d\u89e3\u91ca\u3002\u7279\u65af\u62c9\u90a3\u7ec4\u6570\u5b57\u6211\u4ece\u539f\u6559\u7a0b\u91cc\u6458\u7684\uff0c\u7b56\u7565&nbsp;<strong>+36.14%<\/strong>\uff0c\u62ff\u7740\u4e0d\u52a8 +47.55%\u3002\u6700\u5927\u56de\u64a4 -61.84% \u5bf9 -73.63%\uff0c\u590f\u666e 0.32\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"700\" height=\"513\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/bb-tsla-metrics.png\" alt=\"\" class=\"wp-image-4930\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/bb-tsla-metrics.png 700w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/bb-tsla-metrics-300x220.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">TSLA \u4e94\u5e74\u5e03\u6797\u5e26\u6280\u80fd\u7ee9\u6548\u8868<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u771f\u6b63\u8be5\u76ef\u7740\u770b\u7684\u5728\u6570\u5b57\u91cc\u3002\u5e03\u6797\u5e26\u5728\u7279\u65af\u62c9\u4e0a\u6ca1\u8dd1\u8d62\u62ff\u7740\u4e0d\u52a8\uff0c\u5c11\u8d5a 11 \u4e2a\u70b9\u3002\u552f\u4e00\u80fd\u5b89\u6170\u4eba\u7684\u662f\u56de\u64a4\uff0c\u6d45\u4e86\u5c06\u8fd1 12 \u4e2a\u70b9\u3002\u5de5\u5177\u5f88\u542c\u8bdd\u3002\u6570\u5b57\u5f88\u8bda\u5b9e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u628a\u540c\u6837\u7684\u4e24\u6761\u89c4\u5219\u642c\u5230\u4e86\u56fd\u5185\u3002\u6807\u7684 510300\uff0cakshare \u65b0\u6d6a\u65e5\u7ebf\uff0c\u540c\u6837\u4e94\u5e74\u3002\u533a\u95f4 2021 \u5e74 9 \u6708 14 \u65e5\u5230 2026 \u5e74 9 \u6708 14 \u65e5\uff0c1211 \u6839K\u7ebf\u3002\u4e00\u4e07\u5143\u8d77\u6b65\uff0c\u514d\u624b\u7eed\u8d39\uff0c\u6536\u76d8\u51fa\u4fe1\u53f7\u6536\u76d8\u6210\u4ea4\u3002<strong>\u7ed3\u679c\u53cd\u8f6c\u4e86\u3002<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u89c4\u5219<\/th><th>\u4e94\u5e74\u603b\u6536\u76ca<\/th><th>\u6700\u5927\u56de\u64a4<\/th><th>\u590f\u666e<\/th><th>\u4ea4\u6613\u6b21\u6570<\/th><th>\u80dc\u7387<\/th><th>\u5728\u573a\u65f6\u95f4<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">RSI(14)<\/td><td>+24.23%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-22.13%<\/td><td class=\"has-text-align-center\" data-align=\"center\">0.44<\/td><td class=\"has-text-align-center\" data-align=\"center\">6<\/td><td class=\"has-text-align-center\" data-align=\"center\">66.7%<\/td><td class=\"has-text-align-center\" data-align=\"center\">49.6%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u5e03\u6797\u5e26(20, 2\u03c3)<\/td><td>+16.60%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-29.91%<\/td><td class=\"has-text-align-center\" data-align=\"center\">0.32<\/td><td class=\"has-text-align-center\" data-align=\"center\">16<\/td><td class=\"has-text-align-center\" data-align=\"center\">80.0%<\/td><td class=\"has-text-align-center\" data-align=\"center\">50.9%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u6301\u6709\u4e0d\u52a8<\/td><td>-8.92%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-38.19%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0.02<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u65e0<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u65e0<\/td><td class=\"has-text-align-center\" data-align=\"center\">100%<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-repro-510300-1024x585.png\" alt=\"\" class=\"wp-image-4931\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-repro-510300-1024x585.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-repro-510300-300x171.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-repro-510300-768x439.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-repro-510300.png 1344w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">510300 \u4e94\u5e74\u4e09\u6761\u6743\u76ca\u66f2\u7ebf\uff08\u6211\u590d\u73b0\u7684\u6570\u636e\uff0cakshare \u65b0\u6d6a\u65e5\u7ebf\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6caa\u6df1300ETF \u8fd9\u4e94\u5e74\u8d70\u5f97\u78e8\u4eba\u3002\u8eba\u7740\u4e0d\u52a8\uff0c\u5230\u4eca\u5929\u8fd8\u4e8f 8.92%\uff0c\u4e2d\u95f4\u6700\u5927\u56de\u64a4 38.19%\u3002\u4e24\u6761\u89c4\u5219\u7684\u601d\u8def\u5176\u5b9e\u662f\u4e00\u8def\u7684\uff0c\u90fd\u5728\u5e02\u573a\u6700\u96be\u770b\u7684\u65f6\u5019\u8fdb\u573a\u3002\u8fd9\u79cd\u9707\u8361\u4e0b\u884c\u7684\u884c\u60c5\u6070\u597d\u5582\u5230\u5b83\u4eec\u5634\u91cc\uff0cRSI \u89c4\u5219 +24.23%\uff0c\u5e03\u6797\u5e26 +16.60%\uff0c\u56de\u64a4\u8fd8\u90fd\u6bd4\u62ff\u7740\u4e0d\u52a8\u6d45\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u6761\u7ed3\u8bba\u6446\u5728\u8fd9\u3002\u7b2c\u4e00\uff0c\u5de5\u5177\u5c42\u5b8c\u5168\u6210\u7acb\uff0c\u4e00\u6761\u6307\u4ee4\u51fa\u5168\u5957\u7ed3\u679c\u3002\u8fd9\u8ddf\u7b56\u7565\u597d\u4e0d\u597d\u65e0\u5173\u3002\u7b2c\u4e8c\uff0c\u540c\u4e24\u6761\u89c4\u5219\u6362\u4e2a\u6807\u7684\uff0c\u7ed3\u8bba\u53ef\u4ee5\u6574\u4e2a\u5012\u8fc7\u6765\u3002\u7279\u65af\u62c9\u4e0a\u8f93\u7ed9\u6301\u6709\uff0c510300 \u4e0a\u8d62\u4e86\u6301\u6709\uff0c\u5355\u4e00\u5e02\u573a\u7684\u7ed3\u8bba\u522b\u5f53\u771f\u7406\u3002\u7b2c\u4e09\uff0c\u8fd9\u5957\u6570\u5b57\u6211\u7b2c\u4e00\u6b21\u7b97\u51fa\u6765\u4e0d\u662f\u8fd9\u6837\u7684\u3002\u5dee\u70b9\u88ab\u81ea\u5df1\u7684\u811a\u672c\u9a97\u8fc7\u53bb\uff0c\u5751\u5728\u54ea\uff0c\u7b2c\u4e94\u8282\u5c55\u5f00\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u4ea4\u4ee3\u6837\u672c\u5c40\u9650\u3002\u5355\u4e00\u6807\u7684\uff0c\u4e94\u5e74\u7a97\u53e3\u514d\u624b\u7eed\u8d39\uff0c\u7ed3\u8bba\u5916\u63a8\u8fb9\u754c\u4f60\u5fc3\u91cc\u8981\u6709\u6570\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u600e\u4e48\u88c5<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5168\u7a0b\u4e0d\u7528\u5199\u80f6\u6c34\u4ee3\u7801\u3002\u62e2\u5171\u4e94\u6b65\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u6b65\u5efa\u6587\u4ef6\u5939\u3002\u5de5\u4f5c\u533a\u6280\u80fd\u653e&nbsp;<code>.agents\/skills\/rsi-backtest\/<\/code>\u3002\u60f3\u8de8\u9879\u76ee\u7528\uff0c\u5c31\u653e\u5168\u5c40\u76ee\u5f55&nbsp;<code>~\/.gemini\/config\/skills\/<\/code>&nbsp;\u4e0b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u6b65\u5199 SKILL.md\u3002\u5f00\u5934 YAML \u4e24\u884c\u662f\u5173\u952e\u3002description \u662f\u4ee3\u7406\u51b3\u5b9a\u7528\u4e0d\u7528\u8fd9\u4e2a\u6280\u80fd\u7684\u552f\u4e00\u4f9d\u636e\u3002\u5199\u7684\u65f6\u5019\u4ea4\u4ee3\u6e05\u695a\u4e24\u4ef6\u4e8b\uff0c\u4ec0\u4e48\u65f6\u5019\u7528\uff0c\u9ed8\u8ba4\u53c2\u6570\u662f\u4ec0\u4e48\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>---\nname: rsi-backtest\ndescription: \u56de\u6d4b 14 \u5468\u671f RSI \u89c4\u5219\uff08\u4f4e\u4e8e 30 \u8fdb\u573a\uff0c\u9ad8\u4e8e 70 \u79bb\u573a\uff0c\u53ea\u505a\u591a\uff09\u3002\u5f53\u7528\u6237\u8981\u6c42\u56de\u6d4b RSI \u7b56\u7565\u3001\u5bf9\u6bd4\u6301\u6709\u6536\u76ca\u6216\u751f\u6210\u4ea4\u6613\u6d41\u6c34\u65f6\u4f7f\u7528\u3002\n---\n\n# RSI \u56de\u6d4b\u6280\u80fd\n\n## \u6b65\u9aa4\n1. \u63a5\u6536\u6807\u7684\u4ee3\u7801\uff08\u9ed8\u8ba4 510300\uff09\u4e0e\u56de\u6d4b\u5e74\u6570\uff08\u9ed8\u8ba4 5 \u5e74\uff09\n2. \u6267\u884c scripts\/rsi_backtest.py\uff0c\u8ba1\u7b97 RSI\u3001\u751f\u6210\u4fe1\u53f7\u3001\u6a21\u62df\u6743\u76ca\u66f2\u7ebf\n3. \u8f93\u51fa\u603b\u6536\u76ca\u3001\u6301\u6709\u6536\u76ca\u3001\u6700\u5927\u56de\u64a4\u3001\u590f\u666e\u4e0e\u4ea4\u6613\u6d41\u6c34\n\n## \u6267\u884c\u547d\u4ee4\npython scripts\/rsi_backtest.py --ticker 510300 --years 5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e09\u6b65\u653e\u811a\u672c\u3002<code>scripts\/rsi_backtest.py<\/code>\uff0c\u5c31\u662f\u6587\u672b\u90a3\u4efd\u3002\u6280\u80fd\u53ea\u7ba1\u8c03\u7528\uff0c\u4e0d\u5173\u5fc3\u811a\u672c\u5185\u90e8\u600e\u4e48\u7b97\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u56db\u6b65\u8ba9\u4ee3\u7406\u8ba4\u8bc6\u5b83\u3002\u65b0\u5f00\u5bf9\u8bdd\uff0c\u4ee3\u7406\u4f1a\u81ea\u52a8\u628a\u6280\u80fd\u63cf\u8ff0\u7f16\u8fdb\u7d22\u5f15\u3002\u62ff\u4e0d\u51c6\u5c31\u5728\u6307\u4ee4\u91cc\u76f4\u63a5\u70b9\u540d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e94\u6b65\u4e00\u53e5\u8bdd\u8c03\u7528\u3002\u6267\u884c RSI \u6280\u80fd\uff0c\u5206\u6790 510300\uff0c\u533a\u95f4\u4e94\u5e74\u3002\u4ee3\u7406\u81ea\u5df1\u8bfb SKILL.md\uff0c\u8dd1\u811a\u672c\uff0c\u628a\u7ee9\u6548\u8868\u548c\u4ea4\u6613\u6d41\u6c34\u9012\u56de\u6765\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u88c5\u597d\u4e4b\u540e\u600e\u4e48\u7528<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u5e38\u4f7f\u7528\u5c31\u4e00\u53e5\u8bdd\u7684\u4e8b\u3002\u60f3\u6362\u6807\u7684\u6539\u6307\u4ee4\u91cc\u7684\u4ee3\u7801\uff0c6 \u4f4d\u6570\u5b57\u81ea\u52a8\u8865\u6caa\u6df1\u524d\u7f00\u8fd9\u4ef6\u4e8b\u6211\u5199\u8fdb\u4e86\u811a\u672c\u3002\u60f3\u6362\u533a\u95f4\u6539\u5e74\u6570\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u51fa\u662f\u56fa\u5b9a\u7684\u4e24\u4ef6\u5957\uff0c\u7ee9\u6548\u8868\u52a0\u4ea4\u6613\u6d41\u6c34\u3002\u6280\u80fd\u8fd4\u56de\u7684\u4ea4\u6613\u6d41\u6c34\u503c\u5f97\u591a\u770b\u4e00\u773c\u3002\u6bcf\u7b14\u8fdb\u573a\u79bb\u573a\u7684\u4ef7\u683c\u3001\u6301\u4ed3\u4efd\u6570\u3001\u5f53\u65f6\u6743\u76ca\u90fd\u5728\u4e0a\u9762\uff0c\u56de\u6d4b\u4e0d\u518d\u662f\u4e00\u4e2a\u5b64\u96f6\u96f6\u7684\u6536\u76ca\u7387\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"492\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/bb-tsla-trades.png\" alt=\"\" class=\"wp-image-4932\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/bb-tsla-trades.png 700w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/bb-tsla-trades-300x211.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">TSLA \u5e03\u6797\u5e26\u6280\u80fd\u4ea4\u6613\u6d41\u6c34<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u60f3\u52a0\u7b2c\u4e09\u6761\u89c4\u5219\u4e5f\u7b80\u5355\uff0c\u590d\u5236\u7c98\u8d34\u6539\u4e2a\u540d\u3002SKILL.md \u6362\u4e00\u6bb5\u63cf\u8ff0\uff0c\u811a\u672c\u6362\u4e00\u4e2a\u4fe1\u53f7\u51fd\u6570\u3002MACD \u4e5f\u597d ADX \u4e5f\u597d\uff0c\u53ea\u8981\u80fd\u5199\u6210\u4fe1\u53f7\u751f\u6210\u52a0\u7ec4\u5408\u6a21\u62df\u7684\u5f62\u72b6\uff0c\u90fd\u80fd\u6302\u4e0a\u53bb\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u81ea\u5df1\u65e5\u5e38\u8dd1\u6570\u636e\u7528\u7684\u8fd9\u5957 AI \u5de5\u4f5c\u6d41\uff0c\u6280\u80fd\u4e5f\u662f\u540c\u4e00\u4e2a SKILL.md \u683c\u5f0f\u3002\u8fd9\u6761\u7ea6\u5b9a\u5df2\u7ecf\u662f\u884c\u4e1a\u901a\u7528\u8d27\uff0c\u5b66\u4f1a\u4e86\u4e0d\u4e8f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u662f\u666e\u901a\u8bfb\u8005\u7684\u90e8\u5206\uff0c\u88c5\u4e0a\u5c31\u80fd\u7528\u3002\u5f80\u4e0b\u662f\u52a8\u624b\u90e8\u5206\uff0c\u5199\u7ed9\u60f3\u81ea\u5df1\u8dd1\u56de\u6d4b\u3001\u60f3\u6539\u89c4\u5219\u7684\u4eba\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001\u6570\u636e\u8e29\u5751\u5b9e\u5f55<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">yfinance\u5728\u56fd\u5185\u8fde\u63a5\u4e0d\u7a33\uff0c\u6211\u76f4\u63a5\u6362\u4e86akshare\u7684\u65b0\u6d6a\u63a5\u53e3\u3002fund_etf_hist_sina(symbol=&#8221;sh510300&#8243;) \u4e00\u628a\u8fc7\u30021211 \u6839K\u7ebf\uff0c\u6ca1\u65ad\u70b9\u3002\u4e1c\u8d22\u7684\u63a5\u53e3\u5355\u53ea\u6ca1\u95ee\u9898\uff0c\u6279\u91cf\u62c9\u5168\u5e02\u573a\u65e5K\u4f1a\u88ab\u9650\u6d41\uff0c\u522b\u8d2a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5927\u7684\u5751\u5728\u6210\u4ea4\u53e3\u5f84\u3002\u6559\u7a0b\u91cc\u5e38\u89c1\u7684\u5411\u91cf\u5316\u5199\u6cd5\uff0c\u662f\u62ff\u4ed3\u4f4d\u5e8f\u5217\u76f4\u63a5\u4e58\u65e5\u6536\u76ca\u7387\u3002\u4e00 shift \u90fd\u4e0d\u505a\uff0c\u7b49\u4e8e\u628a\u4fe1\u53f7\u5f53\u5929\u7684\u6da8\u8dcc\u4e5f\u7b97\u8fdb\u7b56\u7565\u6536\u76ca\u3002\u540c\u4e00\u6761\u89c4\u5219\u4e09\u79cd\u53e3\u5f84\uff0c\u6211\u5404\u8dd1\u4e86\u4e00\u904d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u53e3\u5f84<\/th><th>RSI(14)<\/th><th>\u5e03\u6797\u5e26(20, 2\u03c3)<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u6559\u7a0b\u5e38\u89c1\u9519\u8bef\u7248\uff08\u4fe1\u53f7\u65e5\u6da8\u8dcc\u7b97\u8fdb\u6536\u76ca\uff09<\/td><td>-3.36%<\/td><td>-26.07%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u6536\u76d8\u51fa\u4fe1\u53f7\u6536\u76d8\u6210\u4ea4\uff08\u4e3b\u53e3\u5f84\uff09<\/td><td>+24.23%<\/td><td>+16.60%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u6536\u76d8\u51fa\u4fe1\u53f7\u6b21\u65e5\u6536\u76d8\u6210\u4ea4\uff08\u4fdd\u5b88\uff09<\/td><td>+28.81%<\/td><td>+6.10%<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u4e00\u5957\u4ed3\u4f4d\uff0c\u5e03\u6797\u5e26\u4e24\u4e2a\u53e3\u5f84\u76f8\u5dee&nbsp;<strong>42.7 \u4e2a\u70b9<\/strong>\uff0cRSI \u76f8\u5dee 27.6 \u4e2a\u70b9\u3002\u8fd9\u4e2a\u5751\u8ddf\u7b56\u7565\u597d\u574f\u65e0\u5173\uff0c\u5168\u5728\u6210\u4ea4\u65f6\u70b9\u4e0a\u3002\u53e3\u5f84\u7684\u9009\u62e9\uff0c\u6bd4\u89c4\u5219\u7684\u9009\u62e9\u5f71\u54cd\u8fd8\u5927\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u9ebb\u70e6\u7684\u662f\u65b9\u5411\u3002\u8fd9\u4e2a bug \u4f1a\u770b\u7b56\u7565\u4e0b\u83dc\u3002\u5728\u52a8\u91cf\u7b56\u7565\u91cc\u5b83\u5f80\u9ad8\u4e86\u5439\u4e1a\u7ee9\uff0c\u7a81\u7834\u90a3\u6839\u5927\u9633\u7ebf\u7684\u6da8\u5e45\u88ab\u767d\u62ff\u3002\u5728\u5747\u503c\u56de\u5f52\u89c4\u5219\u91cc\u5b83\u5f80\u6b7b\u4e86\u8e29\u4e1a\u7ee9\uff0c\u8fdb\u573a\u90a3\u5929\u5f80\u5f80\u662f\u5927\u8dcc\u65e5\uff0c\u8dcc\u5e45\u88ab\u767d\u5403\u3002\u6211\u4e4b\u524d\u62c6\u8fc7\u4e00\u4e2a\u52a8\u91cf\u7b56\u7565\uff0c\u540c\u6b3e bug \u628a\u4e00\u6761\u4e0d\u8d5a\u94b1\u7684\u89c4\u5219\u5439\u6210\u4e86\u5370\u949e\u673a\u3002\u8fd9\u6b21\u5b83\u53cd\u8fc7\u6765\uff0c\u628a\u4e24\u6761\u80fd\u6253\u7684\u89c4\u5219\u6253\u6210\u4e86\u5e9f\u94c1\u3002\u540c\u4e00\u4e2a\u5751\uff0c\u4e24\u4e2a\u65b9\u5411\uff0c\u5168\u770b\u7b56\u7565\u5403\u7684\u662f\u54ea\u4e00\u8fb9\u7684\u5f53\u65e5\u6da8\u8dcc\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e09\u4e2a\u5751\u662f\u624b\u7eed\u8d39\u3002\u4e3b\u8868\u514d\u624b\u7eed\u8d39\uff0c\u662f\u4e3a\u4e86\u8ddf\u539f\u6587\u53e3\u5f84\u5bf9\u9f50\u3002\u771f\u7b97\u8d26\u7684\u8bdd\uff0c\u5e03\u6797\u5e26 16 \u4e2a\u6765\u56de\uff0c\u53cc\u8fb9\u5404\u4e07\u4e94\uff0c\u7ea6\u5403\u6389 1.6 \u4e2a\u70b9\u3002\u4f18\u52bf\u4ece 16.6% \u8584\u5230 15% \u4e0a\u4e0b\uff0c\u8fd8\u5728\uff0c\u4f46\u6ca1\u90a3\u4e48\u597d\u770b\u3002RSI \u53ea\u6709 6 \u4e2a\u6765\u56de\uff0c\u5f71\u54cd\u4e0d\u5230 1 \u4e2a\u70b9\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u6709\u4e00\u4e2a\u63d0\u9192\u3002\u65b0\u6d6a\u8fd9\u4efd\u65e5\u7ebf\u662f\u4e0d\u590d\u6743\u53e3\u5f84\u3002510300 \u8fd9\u7c7b\u5bbd\u57fa ETF \u5206\u7ea2\u6270\u52a8\u5c0f\uff0c\u95ee\u9898\u4e0d\u5927\u3002\u771f\u62ff\u4e2a\u80a1\u8dd1\u8fd9\u5957\u89c4\u5219\uff0c\u8bb0\u5f97\u6362\u540e\u590d\u6743\u6570\u636e\uff0c\u4e0d\u7136\u9664\u6743\u65e5\u4f1a\u9020\u51fa\u4e00\u5806\u5047\u4fe1\u53f7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56de\u6d4b\u91cc\u6700\u8d35\u7684\u5751\uff0c\u5f80\u5f80\u5c31\u85cf\u5728\u6ca1\u5199\u51fa\u6765\u7684\u5047\u8bbe\u91cc\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001\u52a8\u624b\u533a\u6838\u5fc3\u4ee3\u7801<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7167\u65e7\uff0c\u5206\u6bb5\u8bb2\uff0c\u6587\u672b\u7ed9\u5b8c\u6574\u811a\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2460 \u62c9\u6570\u636e\uff08\u65b0\u6d6a\u65e5\u7ebf\uff0c\u81ea\u52a8\u8865\u6caa\u6df1\u524d\u7f00\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>import&nbsp;argparse<\/code><code>import&nbsp;json<\/code><code>import&nbsp;os<\/code><code><\/code><code>import&nbsp;numpy&nbsp;as&nbsp;np<\/code><code>import&nbsp;pandas&nbsp;as&nbsp;pd<\/code><code>import&nbsp;akshare&nbsp;as&nbsp;ak<\/code><code><\/code><code>TICKER =&nbsp;\"sh510300\"<\/code><code>YEARS =&nbsp;5<\/code><code>INIT_CAPITAL =&nbsp;10000.0<\/code><code>OUT_JSON =&nbsp;\"repro_results.json\"<\/code><code>OUT_PNG =&nbsp;\"illustrations\/chart-repro-510300.png\"<\/code><code><\/code><code><\/code><code>def&nbsp;normalize_code(code):<\/code><code>&nbsp; &nbsp;&nbsp;# 510300 \u81ea\u52a8\u8865\u524d\u7f00\uff0c\u6df1\u5e02\u4ee3\u7801\u7ed9 sz<\/code><code>&nbsp; &nbsp; code = code.strip().lower()<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;code.isdigit()&nbsp;and&nbsp;len(code) ==&nbsp;6:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;(\"sh\"&nbsp;if&nbsp;code&#91;0]&nbsp;in&nbsp;\"569\"&nbsp;else&nbsp;\"sz\") + code<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;code<\/code><code><\/code><code><\/code><code>def&nbsp;load_close(ticker, years):<\/code><code>&nbsp; &nbsp; df = ak.fund_etf_hist_sina(symbol=ticker)<\/code><code>&nbsp; &nbsp; df&#91;\"date\"] = pd.to_datetime(df&#91;\"date\"])<\/code><code>&nbsp; &nbsp; df = df.sort_values(\"date\").set_index(\"date\")<\/code><code>&nbsp; &nbsp; cutoff = df.index.max() - pd.DateOffset(years=years)<\/code><code>&nbsp; &nbsp; df = df.loc&#91;df.index &gt;= cutoff]<\/code><code>&nbsp; &nbsp;&nbsp;print(f\"\u6570\u636e&nbsp;{len(df)}&nbsp;\u6839K\u7ebf,&nbsp;{df.index&#91;0].date()}&nbsp;~&nbsp;{df.index&#91;-1].date()}\")<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;df&#91;\"close\"].astype(float)<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2461 RSI \u4e0e\u4ed3\u4f4d\u72b6\u6001\u673a\uff08Wilder \u5e73\u6ed1\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;rsi_wilder(close, n=14):<\/code><code>&nbsp; &nbsp; diff = close.diff()<\/code><code>&nbsp; &nbsp; up = diff.clip(lower=0).ewm(alpha=1&nbsp;\/ n, adjust=False).mean()<\/code><code>&nbsp; &nbsp; dn = (-diff.clip(upper=0)).ewm(alpha=1&nbsp;\/ n, adjust=False).mean()<\/code><code>&nbsp; &nbsp; rs = up \/ dn<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;100&nbsp;-&nbsp;100&nbsp;\/ (1&nbsp;+ rs)<\/code><code><\/code><code><\/code><code>def&nbsp;pos_rsi(close):<\/code><code>&nbsp; &nbsp; r = rsi_wilder(close)<\/code><code>&nbsp; &nbsp; pos, holding = &#91;],&nbsp;False<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;v&nbsp;in&nbsp;r:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;not&nbsp;holding&nbsp;and&nbsp;v &lt;&nbsp;30:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;True<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;holding&nbsp;and&nbsp;v &gt;&nbsp;70:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;False<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; pos.append(1.0&nbsp;if&nbsp;holding&nbsp;else&nbsp;0.0)<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;pd.Series(pos, index=close.index)<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2462 \u5e03\u6797\u5e26\u4ed3\u4f4d\uff0820 \u65e5\u5747\u7ebf \u00b1 2 \u500d\u6807\u51c6\u5dee\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;pos_bbands(close, n=20, k=2.0):<\/code><code>&nbsp; &nbsp; mid = close.rolling(n).mean()<\/code><code>&nbsp; &nbsp; std = close.rolling(n).std()<\/code><code>&nbsp; &nbsp; lower, upper = mid - k * std, mid + k * std<\/code><code><\/code><code>&nbsp; &nbsp; pos, holding = &#91;],&nbsp;False<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;c, lo, hi&nbsp;in&nbsp;zip(close, lower, upper):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;isinstance(lo,&nbsp;float):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;not&nbsp;holding&nbsp;and&nbsp;c &lt; lo:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;True<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;holding&nbsp;and&nbsp;c &gt; hi:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;False<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; pos.append(1.0&nbsp;if&nbsp;holding&nbsp;else&nbsp;0.0)<\/code><code><\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;pd.Series(pos, index=close.index)<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2463 \u4e09\u79cd\u53e3\u5f84\u7684\u56de\u6d4b\u4e0e\u7ee9\u6548\uff08\u5168\u6587\u4e03\u5bf8\u5728\u8fd9\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;perf(close, pos, mode=\"signal_close\"):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"<\/code><code>&nbsp; &nbsp; \u4e09\u79cd\u56de\u6d4b\u53e3\u5f84\uff1a<\/code><code>&nbsp; &nbsp; - signal_close: \u6536\u76d8\u51fa\u4fe1\u53f7\uff0c\u6536\u76d8\u6210\u4ea4\uff08\u4e3b\u53e3\u5f84\uff09<\/code><code>&nbsp; &nbsp; - next_close: &nbsp; \u6536\u76d8\u51fa\u4fe1\u53f7\uff0c\u6b21\u65e5\u6536\u76d8\u6210\u4ea4\uff08\u4fdd\u5b88\uff09<\/code><code>&nbsp; &nbsp; - buggy_same: &nbsp; \u6559\u7a0b\u5e38\u89c1\u9519\u8bef\uff0c\u628a\u4fe1\u53f7\u65e5\u6da8\u8dcc\u4e5f\u7b97\u8fdb\u7b56\u7565<\/code><code>&nbsp; &nbsp; \"\"\"<\/code><code>&nbsp; &nbsp; ret = close.pct_change().fillna(0.0)<\/code><code>&nbsp; &nbsp; lag = {\"signal_close\":&nbsp;1,&nbsp;\"next_close\":&nbsp;2,&nbsp;\"buggy_same\":&nbsp;0}&#91;mode]<\/code><code>&nbsp; &nbsp; strat = pos.shift(lag) * ret<\/code><code>&nbsp; &nbsp; equity = INIT_CAPITAL * (1&nbsp;+ strat).cumprod()<\/code><code>&nbsp; &nbsp; dd = (equity \/ equity.cummax() -&nbsp;1).min()<\/code><code>&nbsp; &nbsp; sharpe = strat.mean() \/ (strat.std()&nbsp;or&nbsp;np.nan) * np.sqrt(252)<\/code><code>&nbsp; &nbsp; entries =&nbsp;int((pos.diff() ==&nbsp;1).sum())<\/code><code><\/code><code>&nbsp; &nbsp; wins, done =&nbsp;0,&nbsp;0<\/code><code>&nbsp; &nbsp; entry_px =&nbsp;None<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;i&nbsp;in&nbsp;range(len(close)):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;pos.iloc&#91;i] ==&nbsp;1&nbsp;and&nbsp;entry_px&nbsp;is&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entry_px = close.iloc&#91;i]<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;pos.iloc&#91;i] ==&nbsp;0&nbsp;and&nbsp;entry_px&nbsp;is&nbsp;not&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; done +=&nbsp;1<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wins += close.iloc&#91;i] &gt; entry_px<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entry_px =&nbsp;None<\/code><code><\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"total_return_pct\":&nbsp;round((equity.iloc&#91;-1] \/ INIT_CAPITAL -&nbsp;1) *&nbsp;100,&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"final_equity\":&nbsp;round(float(equity.iloc&#91;-1]),&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"max_drawdown_pct\":&nbsp;round(dd *&nbsp;100,&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"sharpe\":&nbsp;round(float(sharpe),&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"trades\": entries,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"win_trades\":&nbsp;int(wins),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"win_rate_pct\":&nbsp;round(wins \/ done *&nbsp;100,&nbsp;1)&nbsp;if&nbsp;done&nbsp;else&nbsp;0.0,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"time_in_market_pct\":&nbsp;round(float(pos.mean()) *&nbsp;100,&nbsp;1),<\/code><code>&nbsp; &nbsp; }<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2464 \u6743\u76ca\u66f2\u7ebf\u4e00\u5f20\u56fe<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>import&nbsp;matplotlib<\/code><code>matplotlib.use(\"Agg\")<\/code><code>import&nbsp;matplotlib.pyplot as plt<\/code><code><\/code><code>plt.rcParams&#91;\"font.family\"] =&nbsp;\"Microsoft YaHei\"<\/code><code><\/code><code>fig, ax = plt.subplots(figsize=(8.96,&nbsp;5.12), dpi=150)<\/code><code><\/code><code>for&nbsp;pos, label in &#91;(rsi_pos,&nbsp;\"RSI(14) \u89c4\u5219\"), (bb_pos,&nbsp;\"\u5e03\u6797\u5e26(20, 2\u03c3) \u89c4\u5219\")]:<\/code><code>&nbsp; &nbsp; eq = INIT_CAPITAL * (pos.shift(1) *&nbsp;close.pct_change().fillna(0) +&nbsp;1).cumprod()<\/code><code>&nbsp; &nbsp; ax.plot(eq.index, eq.values, label=label, linewidth=1.4)<\/code><code><\/code><code>ax.plot(close.index, INIT_CAPITAL *&nbsp;close&nbsp;\/&nbsp;close.iloc&#91;0],<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; label=\"\u6301\u6709\u4e0d\u52a8\", linewidth=1.4, color=\"#999999\")<\/code><code><\/code><code>ax.set_title(\"510300 \u4e94\u5e74\u56de\u6d4b\uff0c\u4e09\u6761\u8def\u5f84\uff0810000 \u5143\u8d77\u6b65\uff0c\u514d\u624b\u7eed\u8d39\uff09\")<\/code><code>ax.legend()<\/code><code>ax.grid(alpha=0.3)<\/code><code><\/code><code>fig.tight_layout()<\/code><code>fig.savefig(OUT_PNG) &nbsp;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u662f\u5b8c\u6574\u811a\u672c\u3002\u6807\u7684\u548c\u5e74\u6570\u8d70\u53c2\u6570\uff0c<code>--ticker 510300 --years 5<\/code>&nbsp;\u5c31\u80fd\u6362\u3002\u8fd9\u4efd\u811a\u672c\u6211\u5b8c\u6574\u8dd1\u8fc7\uff0c\u6570\u5b57\u5c31\u662f\u6b63\u6587\u8868\u683c\u91cc\u90a3\u4e9b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code># -*- coding: utf-8 -*-<\/code><code><\/code><code>\"\"\"<\/code><code>\u628a\u4e00\u6761\u56de\u6d4b\u89c4\u5219\u6253\u5305\u6210 Agent \u6280\u80fd\u4e4b\u524d\u7684\u57fa\u7ebf\u811a\u672c<\/code><code>\u6807\u7684\uff1a510300\uff08\u6caa\u6df1300ETF\uff09\uff0c\u533a\u95f4\uff1a\u6700\u8fd1 5 \u5e74<\/code><code>\u4e24\u6761\u505a\u591a\u89c4\u5219\uff1a<\/code><code>&nbsp; RSI(14)\uff1aRSI \u4f4e\u4e8e 30 \u8fdb\u573a\uff0c\u9ad8\u4e8e 70 \u79bb\u573a\uff08Wilder \u5e73\u6ed1\uff09<\/code><code>&nbsp; \u5e03\u6797\u5e26(20, 2\u03c3)\uff1a\u6536\u76d8\u8dcc\u7834\u4e0b\u8f68\u8fdb\u573a\uff0c\u5347\u7834\u4e0a\u8f68\u79bb\u573a<\/code><code>\u53e3\u5f84\uff1a\u6536\u76d8\u51fa\u4fe1\u53f7\u6536\u76d8\u6210\u4ea4\u4e3a\u4e3b\uff0c\u53e6\u7ed9\u6b21\u65e5\u6210\u4ea4\u4e0e\u6559\u7a0b\u9519\u8bef\u53e3\u5f84\u5bf9\u7167<\/code><code>\u6570\u636e\u6e90\uff1aakshare \u65b0\u6d6a\u65e5\u7ebf\uff0c\u514d\u624b\u7eed\u8d39\u53e3\u5f84<\/code><code>\"\"\"<\/code><code>import&nbsp;argparse<\/code><code>import&nbsp;json<\/code><code>import&nbsp;os<\/code><code>import&nbsp;numpy&nbsp;as&nbsp;np<\/code><code>import&nbsp;pandas&nbsp;as&nbsp;pd<\/code><code>import&nbsp;akshare&nbsp;as&nbsp;ak<\/code><code>TICKER =&nbsp;\"sh510300\"<\/code><code>YEARS =&nbsp;5<\/code><code>INIT_CAPITAL =&nbsp;10000.0<\/code><code>OUT_JSON =&nbsp;\"repro_results.json\"<\/code><code>OUT_PNG =&nbsp;\"illustrations\/chart-repro-510300.png\"<\/code><code>def&nbsp;normalize_code(code):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"510300 \u81ea\u52a8\u8865\u524d\u7f00\uff0c\u5b81\u5fb7\u65f6\u4ee3\u8fd9\u7c7b\u6df1\u5e02\u4ee3\u7801\u7ed9 sz\"\"\"<\/code><code>&nbsp; &nbsp; code = code.strip().lower()<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;code.isdigit()&nbsp;and&nbsp;len(code) ==&nbsp;6:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;(\"sh\"&nbsp;if&nbsp;code&#91;0]&nbsp;in&nbsp;\"569\"&nbsp;else&nbsp;\"sz\") + code<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;code<\/code><code>def&nbsp;load_close(ticker, years):<\/code><code>&nbsp; &nbsp; df = ak.fund_etf_hist_sina(symbol=ticker)<\/code><code>&nbsp; &nbsp; df&#91;\"date\"] = pd.to_datetime(df&#91;\"date\"])<\/code><code>&nbsp; &nbsp; df = df.sort_values(\"date\").set_index(\"date\")<\/code><code>&nbsp; &nbsp; cutoff = df.index.max() - pd.DateOffset(years=years)<\/code><code>&nbsp; &nbsp; df = df.loc&#91;df.index &gt;= cutoff]<\/code><code>&nbsp; &nbsp;&nbsp;print(f\"\u6570\u636e&nbsp;{len(df)}&nbsp;\u6839K\u7ebf,&nbsp;{df.index&#91;0].date()}&nbsp;~&nbsp;{df.index&#91;-1].date()}\")<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;df&#91;\"close\"].astype(float)<\/code><code>def&nbsp;rsi_wilder(close, n=14):<\/code><code>&nbsp; &nbsp; diff = close.diff()<\/code><code>&nbsp; &nbsp; up = diff.clip(lower=0).ewm(alpha=1&nbsp;\/ n, adjust=False).mean()<\/code><code>&nbsp; &nbsp; dn = (-diff.clip(upper=0)).ewm(alpha=1&nbsp;\/ n, adjust=False).mean()<\/code><code>&nbsp; &nbsp; rs = up \/ dn<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;100&nbsp;-&nbsp;100&nbsp;\/ (1&nbsp;+ rs)<\/code><code>def&nbsp;pos_rsi(close):<\/code><code>&nbsp; &nbsp; r = rsi_wilder(close)<\/code><code>&nbsp; &nbsp; pos, holding = &#91;],&nbsp;False<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;v&nbsp;in&nbsp;r:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;not&nbsp;holding&nbsp;and&nbsp;v &lt;&nbsp;30:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;True<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;holding&nbsp;and&nbsp;v &gt;&nbsp;70:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;False<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; pos.append(1.0&nbsp;if&nbsp;holding&nbsp;else&nbsp;0.0)<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;pd.Series(pos, index=close.index)<\/code><code>def&nbsp;pos_bbands(close, n=20, k=2.0):<\/code><code>&nbsp; &nbsp; mid = close.rolling(n).mean()<\/code><code>&nbsp; &nbsp; std = close.rolling(n).std()<\/code><code>&nbsp; &nbsp; lower, upper = mid - k * std, mid + k * std<\/code><code>&nbsp; &nbsp; pos, holding = &#91;],&nbsp;False<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;c, lo, hi&nbsp;in&nbsp;zip(close, lower, upper):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;isinstance(lo,&nbsp;float):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;not&nbsp;holding&nbsp;and&nbsp;c &lt; lo:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;True<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;holding&nbsp;and&nbsp;c &gt; hi:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holding =&nbsp;False<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; pos.append(1.0&nbsp;if&nbsp;holding&nbsp;else&nbsp;0.0)<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;pd.Series(pos, index=close.index)<\/code><code>def&nbsp;perf(close, pos, mode=\"signal_close\"):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"\u4e09\u79cd\u53e3\u5f84\u3002signal_close \u6536\u76d8\u51fa\u4fe1\u53f7\u3001\u6536\u76d8\u6210\u4ea4\uff08\u4e3b\u53e3\u5f84\uff09\u3002<\/code><code>&nbsp; &nbsp; next_close \u6536\u76d8\u51fa\u4fe1\u53f7\u3001\u6b21\u65e5\u6536\u76d8\u6210\u4ea4\uff08\u4fdd\u5b88\u5bf9\u7167\uff09\u3002<\/code><code>&nbsp; &nbsp; buggy_same \u6559\u7a0b\u5e38\u89c1\u9519\u8bef\uff0c\u628a\u4fe1\u53f7\u5f53\u5929\u7684\u6da8\u8dcc\u4e5f\u7b97\u8fdb\u7b56\u7565\u3002\"\"\"<\/code><code>&nbsp; &nbsp; ret = close.pct_change().fillna(0.0)<\/code><code>&nbsp; &nbsp; lag = {\"signal_close\":&nbsp;1,&nbsp;\"next_close\":&nbsp;2,&nbsp;\"buggy_same\":&nbsp;0}&#91;mode]<\/code><code>&nbsp; &nbsp; strat = pos.shift(lag) * ret<\/code><code>&nbsp; &nbsp; equity = INIT_CAPITAL * (1&nbsp;+ strat).cumprod()<\/code><code>&nbsp; &nbsp; dd = (equity \/ equity.cummax() -&nbsp;1).min()<\/code><code>&nbsp; &nbsp; sharpe = strat.mean() \/ (strat.std()&nbsp;or&nbsp;np.nan) * np.sqrt(252)<\/code><code>&nbsp; &nbsp; entries =&nbsp;int((pos.diff() ==&nbsp;1).sum())<\/code><code>&nbsp; &nbsp;&nbsp;# \u9010\u7b14\u7edf\u8ba1\uff08\u540c\u53e3\u5f84\u914d\u5bf9\u8fdb\u573a\/\u79bb\u573a\uff09<\/code><code>&nbsp; &nbsp; wins, done =&nbsp;0,&nbsp;0<\/code><code>&nbsp; &nbsp; entry_px =&nbsp;None<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;i&nbsp;in&nbsp;range(len(close)):<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;pos.iloc&#91;i] ==&nbsp;1&nbsp;and&nbsp;entry_px&nbsp;is&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entry_px = close.iloc&#91;i]<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;elif&nbsp;pos.iloc&#91;i] ==&nbsp;0&nbsp;and&nbsp;entry_px&nbsp;is&nbsp;not&nbsp;None:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; done +=&nbsp;1<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wins += close.iloc&#91;i] &gt; entry_px<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entry_px =&nbsp;None<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"total_return_pct\":&nbsp;round((equity.iloc&#91;-1] \/ INIT_CAPITAL -&nbsp;1) *&nbsp;100,&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"final_equity\":&nbsp;round(float(equity.iloc&#91;-1]),&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"max_drawdown_pct\":&nbsp;round(dd *&nbsp;100,&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"sharpe\":&nbsp;round(float(sharpe),&nbsp;2),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"trades\": entries,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"win_trades\":&nbsp;int(wins),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"win_rate_pct\":&nbsp;round(wins \/ done *&nbsp;100,&nbsp;1)&nbsp;if&nbsp;done&nbsp;else&nbsp;0.0,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"time_in_market_pct\":&nbsp;round(float(pos.mean()) *&nbsp;100,&nbsp;1),<\/code><code>&nbsp; &nbsp; }<\/code><code>def&nbsp;parse_args():<\/code><code>&nbsp; &nbsp; ap = argparse.ArgumentParser(description=\"RSI \u4e0e\u5e03\u6797\u5e26\u89c4\u5219\u7684 ETF \u56de\u6d4b\u57fa\u7ebf\")<\/code><code>&nbsp; &nbsp; ap.add_argument(\"--ticker\", default=TICKER,&nbsp;help=\"\u6807\u7684\u4ee3\u7801\uff0c6\u4f4d\u6570\u5b57\u81ea\u52a8\u8865\u6caa\u6df1\u524d\u7f00\")<\/code><code>&nbsp; &nbsp; ap.add_argument(\"--years\",&nbsp;type=int, default=YEARS,&nbsp;help=\"\u56de\u6d4b\u5e74\u6570\")<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;ap.parse_args()<\/code><code>def&nbsp;main():<\/code><code>&nbsp; &nbsp; args = parse_args()<\/code><code>&nbsp; &nbsp; ticker = normalize_code(args.ticker)<\/code><code>&nbsp; &nbsp; os.makedirs(os.path.dirname(OUT_PNG), exist_ok=True)<\/code><code>&nbsp; &nbsp; close = load_close(ticker, args.years)<\/code><code>&nbsp; &nbsp; bh = perf(close, pd.Series(1.0, index=close.index))<\/code><code>&nbsp; &nbsp; rsi_pos = pos_rsi(close)<\/code><code>&nbsp; &nbsp; bb_pos = pos_bbands(close)<\/code><code>&nbsp; &nbsp; out = {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"config\": {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"ticker\": ticker,&nbsp;\"years\": args.years,&nbsp;\"init_capital\": INIT_CAPITAL,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"fee\":&nbsp;0.0,&nbsp;\"main_mode\":&nbsp;\"signal_close\",<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"range\":&nbsp;f\"{close.index&#91;0].date()}&nbsp;~&nbsp;{close.index&#91;-1].date()}\",<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; },<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"buy_hold\": bh,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"rsi14\": perf(close, rsi_pos),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"rsi14_next_close\": {\"total_return_pct\": perf(close, rsi_pos,&nbsp;\"next_close\")&#91;\"total_return_pct\"]},<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"rsi14_buggy_same\": {\"total_return_pct\": perf(close, rsi_pos,&nbsp;\"buggy_same\")&#91;\"total_return_pct\"]},<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"bbands\": perf(close, bb_pos),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"bbands_next_close\": {\"total_return_pct\": perf(close, bb_pos,&nbsp;\"next_close\")&#91;\"total_return_pct\"]},<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"bbands_buggy_same\": {\"total_return_pct\": perf(close, bb_pos,&nbsp;\"buggy_same\")&#91;\"total_return_pct\"]},<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;print(json.dumps(out, ensure_ascii=False, indent=2))<\/code><code>&nbsp; &nbsp;&nbsp;with&nbsp;open(OUT_JSON,&nbsp;\"w\", encoding=\"utf-8\")&nbsp;as&nbsp;f:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; json.dump(out, f, ensure_ascii=False, indent=2)<\/code><code>&nbsp; &nbsp;&nbsp;import&nbsp;matplotlib<\/code><code>&nbsp; &nbsp; matplotlib.use(\"Agg\")<\/code><code>&nbsp; &nbsp;&nbsp;import&nbsp;matplotlib.pyplot&nbsp;as&nbsp;plt<\/code><code>&nbsp; &nbsp; plt.rcParams&#91;\"font.family\"] =&nbsp;\"Microsoft YaHei\"<\/code><code>&nbsp; &nbsp; fig, ax = plt.subplots(figsize=(8.96,&nbsp;5.12), dpi=150)<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;pos, label&nbsp;in&nbsp;&#91;(rsi_pos,&nbsp;\"RSI(14) \u89c4\u5219\"), (bb_pos,&nbsp;\"\u5e03\u6797\u5e26(20, 2\u03c3) \u89c4\u5219\")]:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; eq = INIT_CAPITAL * (pos.shift(1) * close.pct_change().fillna(0) +&nbsp;1).cumprod()<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; ax.plot(eq.index, eq.values, label=label, linewidth=1.4)<\/code><code>&nbsp; &nbsp; ax.plot(close.index, INIT_CAPITAL * close \/ close.iloc&#91;0],<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label=\"\u6301\u6709\u4e0d\u52a8\", linewidth=1.4, color=\"#999999\")<\/code><code>&nbsp; &nbsp; ax.set_title(\"510300 \u4e94\u5e74\u56de\u6d4b\uff0c\u4e09\u6761\u8def\u5f84\uff0810000 \u5143\u8d77\u6b65\uff0c\u514d\u624b\u7eed\u8d39\uff09\")<\/code><code>&nbsp; &nbsp; ax.legend()<\/code><code>&nbsp; &nbsp; ax.grid(alpha=0.3)<\/code><code>&nbsp; &nbsp; fig.tight_layout()<\/code><code>&nbsp; &nbsp; fig.savefig(OUT_PNG)<\/code><code>&nbsp; &nbsp;&nbsp;print(\"\u56fe\u5df2\u4fdd\u5b58\", OUT_PNG)<\/code><code>if&nbsp;__name__ ==&nbsp;\"__main__\":<\/code><code>&nbsp; &nbsp; main()<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001\u6280\u80fd\u7684\u4ef7\u503c\u5728\u54ea<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7701\u4e0b\u7684\u51e0\u5206\u949f\u662f\u5c0f\u4e8b\u3002\u771f\u6b63\u7684\u4ef7\u503c\u5728\u4ea4\u63a5\u3002\u89c4\u5219\u5199\u8fdb SKILL.md \u7684\u90a3\u4e00\u523b\uff0c\u5b83\u5c31\u4ece\u4f60\u8111\u5b50\u91cc\u7684\u9ed8\u5951\u53d8\u6210\u4e86\u968f\u65f6\u53ef\u67e5\u7684\u6587\u4ef6\u3002AI \u6709\u6ca1\u6709\u7167\u505a\uff0c\u4f60\u7ffb\u4e00\u773c\u5c31\u77e5\u9053\u3002\u6280\u80fd\u6512\u5f97\u591a\u4e86\uff0c\u4ee3\u7406\u624d\u7b97\u4ece\u4e00\u6b21\u6027\u7684\u5e2e\u624b\u53d8\u6210\u957f\u671f\u7684\u5458\u5de5\uff0c\u4e0d\u7528\u6bcf\u6b21\u91cd\u65b0\u5e26\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4e0b\u4e00\u6b65\u6253\u7b97\u63a5\u7740\u6302 MACD \u548c ADX\uff0c\u7b49\u6302\u6ee1\u4e00\u6392\uff0c\u7167\u65e7\u6362\u6807\u7684\u518d\u8dd1\u4e00\u904d\u7ed9\u5927\u5bb6\u770b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u7559\u4e00\u4e2a\u95ee\u9898\u3002\u4f60\u7684\u56de\u6d4b\u811a\u672c\u91cc\uff0c\u4fe1\u53f7\u662f\u54ea\u5929\u7684\u6536\u76d8\u7b97\u7684\uff0c\u6210\u4ea4\u53c8\u7b97\u5728\u54ea\u5929\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u89c9\u5f97\u6709\u7528\u7684\u8bdd\uff0c\u628a\u8fd9\u7bc7\u8f6c\u7ed9\u540c\u6837\u5728\u641e\u91cf\u5316\u7684\u670b\u53cb\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><a>#AI\u7f16\u7a0b<\/a>&nbsp;<a>#AI\u4ee3\u7406<\/a>&nbsp;<a>#Antigravity<\/a>&nbsp;<a>#\u91cf\u5316\u56de\u6d4b<\/a>&nbsp;<a>#RSI\u6307\u6807<\/a>&nbsp;<a>#\u5e03\u6797\u5e26<\/a>&nbsp;<a>#510300<\/a>&nbsp;<a>#Python\u91cf\u5316<\/a>&nbsp;<a>#AI\u5de5\u5177\u5b9e\u6d4b<\/a>&nbsp;<a>#\u6280\u80fd\u7cfb\u7edf<\/a>&nbsp;<a>#\u5747\u503c\u56de\u5f52<\/a>&nbsp;<a>#\u56de\u6d4b\u8e29\u5751<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u58f0\u660e<\/strong>&nbsp;\u672c\u6587\u4e3a\u6280\u672f\u6d41\u7a0b\u62c6\u89e3\u4e0e\u5386\u53f2\u6570\u636e\u56de\u6d4b\uff0c\u6240\u6709\u6807\u7684\u4e0e\u53c2\u6570\u4ec5\u4f5c\u793a\u4f8b\uff0c\u4e0d\u6784\u6210\u4efb\u4f55\u64cd\u4f5c\u5efa\u8bae\u3002\u6570\u636e\u6765\u81ea\u516c\u5f00\u63a5\u53e3\uff0c\u53ef\u80fd\u5b58\u5728\u8bef\u5dee\uff0c\u539f\u6587\u4e0e\u5b98\u65b9\u6587\u6863\u4e3a\u672c\u6587\u4e3b\u8981\u6765\u6e90\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c \u8005\uff1a\u8001\u4f59\u635e\u9c7c \u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/laoyulaoyu.com\/index.php\/2026\/09\/17\/%e5%88%ab%e5%86%8d%e6%89%8b%e6%89%93%e5%9b%9e%e6%b5%8b%e8%a7%84%e5%88%99%e4%ba%86%ef%bc%81%e6%88%91%e6%8a%8a%e9%87%8f%e5%8c%96%e7%ad%96%e7%95%a5%e5%81%9a%e6%88%90-ai-%e6%8a%80%e8%83%bd%ef%bc%8c\/\">Continue reading<span class=\"screen-reader-text\">\u522b\u518d\u624b\u6253\u56de\u6d4b\u89c4\u5219\u4e86\uff01\u6211\u628a\u91cf\u5316\u7b56\u7565\u505a\u6210 AI \u6280\u80fd\uff0c\u6362\u6807\u7684\u53ea\u9700\u4e00\u53e5\u8bdd<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[17,4,5,6],"class_list":["post-4928","post","type-post","status-publish","format-standard","hentry","category-aiinvest","tag-ai","tag-6","entry"],"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/4928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/comments?post=4928"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/4928\/revisions"}],"predecessor-version":[{"id":4933,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/4928\/revisions\/4933"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=4928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=4928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=4928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}