{"id":4942,"date":"2026-09-23T07:45:00","date_gmt":"2026-09-22T23:45:00","guid":{"rendered":"https:\/\/laoyulaoyu.com\/?p=4942"},"modified":"2026-09-17T11:50:50","modified_gmt":"2026-09-17T03:50:50","slug":"%e7%9b%98%e6%95%b4%e6%89%be%e5%a6%82%e4%bd%95%e7%aa%81%e7%a0%b4%ef%bc%9f%e6%88%91%e5%ae%9e%e6%b5%8b%e4%ba%86%e4%b8%ad%e8%af%81500%e5%92%8c%e5%ae%81%e5%be%b7%e6%97%b6%e4%bb%a3%ef%bc%88%e9%99%84","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2026\/09\/23\/%e7%9b%98%e6%95%b4%e6%89%be%e5%a6%82%e4%bd%95%e7%aa%81%e7%a0%b4%ef%bc%9f%e6%88%91%e5%ae%9e%e6%b5%8b%e4%ba%86%e4%b8%ad%e8%af%81500%e5%92%8c%e5%ae%81%e5%be%b7%e6%97%b6%e4%bb%a3%ef%bc%88%e9%99%84\/","title":{"rendered":"\u76d8\u6574\u627e\u5982\u4f55\u7a81\u7834\uff1f\u6211\u5b9e\u6d4b\u4e86\u4e2d\u8bc1500\u548c\u5b81\u5fb7\u65f6\u4ee3\uff08\u9644\u6e90\u7801\uff09"},"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-10.png\" alt=\"\" class=\"wp-image-4943\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-10.png 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-10-300x128.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/cover-10-768x327.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u6587\u4e2d\u793a\u4f8b\u4ec5\u7528\u4e8e\u6280\u672f\u8ba8\u8bba\uff0c\u4e0d\u6784\u6210\u4efb\u4f55\u64cd\u4f5c\u5efa\u8bae\u3002<br>\u91cf\u5316\u7b56\u7565\u5f00\u53d1\u5e94\u4ee5\u5b66\u4e60\u548c\u6280\u672f\u4ea4\u6d41\u4e3a\u76ee\u7684\u3002<br>\u672c\u53f7\u4e0d\u8350\u80a1\u3001\u4e0d\u5356\u8bfe\u3001\u4e0d\u627f\u8bfa\u6536\u76ca\u3002<br>\u5e02\u573a\u6709\u98ce\u9669\uff0c\u8bf7\u5408\u6cd5\u5408\u89c4\u6295\u8d44\u3002<\/p>\n<\/blockquote>\n\n\n\n<p class=\"has-text-align-left wp-block-paragraph\">\u672c\u6587\u7ea6 5000 \u5b57 | \u9884\u8ba1\u9605\u8bfb 8-12 \u5206\u949f\uff0c\u540e\u6709\u5b9e\u4f8b\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<p class=\"wp-block-paragraph\">\u6211\u590d\u76d8\u65f6\u6709\u4e2a\u4e60\u60ef\uff1a\u5148\u628a\u5f53\u5929\u7684\u6da8\u505c\u68af\u961f\u626b\u4e00\u904d\uff0c\u518d\u53bb\u7ffb\u81ea\u9009\u80a1\u7684\u5206\u949f\u56fe\u3002\u7ffb\u5f97\u591a\u4e86\uff0c\u6211\u53d1\u73b0\u4e00\u4e2a\u633a\u6709\u610f\u601d\u7684\u89c4\u5f8b\uff1a\u90a3\u4e9b\u771f\u6b63\u8ba9\u6211\u8d5a\u5230\u94b1\u7684\u7968\uff0c\u5728\u8fdb\u573a\u524d\uff0c\u5f80\u5f80\u90fd\u6709\u4e00\u6bb5\u4e0d\u592a\u8d77\u773c\u7684\u6a2a\u76d8\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u662fV\u578b\u53cd\u8f6c\uff0c\u4e5f\u4e0d\u662f\u706b\u7bad\u53d1\u5c04\u3002\u5c31\u662f\u5341\u51e0\u4e2a\u4ea4\u6613\u65e5\u91cc\uff0c\u4ef7\u683c\u5728\u4e00\u6761\u5f88\u7a84\u7684\u8d70\u5eca\u91cc\u6765\u56de\u6643\uff0c\u91cf\u80fd\u4e00\u70b9\u70b9\u7f29\u4e0b\u53bb\uff0c\u65b0\u95fb\u6ca1\u4e86\uff0c\u7fa4\u91cc\u4e5f\u6ca1\u4eba\u804a\u5b83\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f4\u5230\u67d0\u4e00\u5929\uff0c\u4e00\u6839\u653e\u91cf\u7684\u5927\u9633\u7ebf\u6216\u8005\u5927\u9634\u7ebf\u628a\u8d70\u5eca\u7684\u95e8\u649e\u5f00\uff0c\u884c\u60c5\u5c31\u6765\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8001\u624b\u628a\u8fd9\u6bb5\u53eb<strong>\u76d8\u6574<\/strong>\uff0c\u6216\u8005\u8bf4\u662f\u884c\u60c5\u5728\u618b\u4e00\u53e3\u6c14\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9ebb\u70e6\u7684\u662f\uff0c\u8fd9\u6bb5\u5e73\u9759\u5149\u9760\u773c\u775b\u770b\uff0c\u5f88\u5403\u4e8f\u3002\u4f60\u770b\u5b83\u6a2a\u4e86\u4e09\u5929\uff0c\u5b83\u53ef\u80fd\u8fd8\u6709\u4e8c\u5341\u5929\u8981\u6a2a\uff1b\u4f60\u770b\u5b83\u50cf\u662f\u8981\u7a81\u7834\uff0c\u7ed3\u679c\u90a3\u6839\u9633\u7ebf\u7b2c\u4e8c\u5929\u53c8\u7f29\u56de\u53bb\u4e86\u3002\u8fd9\u79cd\u5dee\u4e00\u70b9\u70b9\u7684\u5047\u7a81\u7834\uff0c\u5e02\u573a\u91cc\u4e00\u6293\u4e00\u5927\u628a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u5929\u6211\u5206\u4eab\u4e00\u5957\u73b0\u6210\u7684\u65b9\u6cd5\uff0c\u80fd\u628a<strong>\u76d8\u6574\u53d8\u6210\u6570\u5b57\uff0c\u628a\u7a81\u7834\u53d8\u6210\u89c4\u5219\u3002<\/strong>\u63a5\u4e0b\u6765\u6211\u4f1a\u7528Python\u628a\u5b83\u5728A\u80a1\u6574\u4e2a\u590d\u73b0\u4e86\u4e00\u904d\uff0c\u4e24\u4e2a\u6807\u7684\u6362\u6210\u4e2d\u8bc1500\u548c\u5b81\u5fb7\u65f6\u4ee3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u8bf4\u6e05\u695a\u5b83\u662f\u4ec0\u4e48\u3001\u4e0d\u662f\u4ec0\u4e48\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"382\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/01-two-stories-1024x382.png\" alt=\"\" class=\"wp-image-4944\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/01-two-stories-1024x382.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/01-two-stories-300x112.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/01-two-stories-768x287.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/01-two-stories-1536x573.png 1536w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/01-two-stories.png 1664w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u56fe1\uff1a\u4e00\u6bb5\u8d8a\u8d70\u8d8a\u7a84\u7684\u6ce2\u6d6a\u8d70\u5eca\uff0c\u91cf\u7684\u662f\u5bbd\u5ea6\uff0c\u7b49\u7684\u662f\u63a8\u95e8\u90a3\u4e00\u523b<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u53ea\u7ba1\u4e24\u4ef6\u4e8b\uff1a\u7b2c\u4e00\uff0c\u628a\u201c\u76d8\u6574\u201d\u53d8\u6210\u4e00\u4e2a\u53ef\u4ee5\u91cf\u51fa\u6765\u7684\u6570\u5b57\uff1b\u7b2c\u4e8c\uff0c\u76ef\u4f4f\u4ef7\u683c\u51b2\u51fa\u8d70\u5eca\u7684\u90a3\u4e00\u523b\uff0c\u66ff\u4f60\u628a\u4fe1\u53f7\u8bb0\u4e0b\u6765\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u4e0d\u7ba1\u672a\u6765\u3002\u51b2\u51fa\u53bb\u4e4b\u540e\u80fd\u8d70\u591a\u8fdc\uff0c\u5b83\u4e0d\u77e5\u9053\u3002\u540e\u9762\u6211\u4f1a\u7528\u4e94\u4e2a\u4fe1\u53f7\u7684\u771f\u5b9e\u8868\u73b0\u7ed9\u4f60\u770b\uff0c\u6bd4\u7a7a\u53e3\u8bf4\u66f4\u6709\u8bf4\u670d\u529b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u6211\u6d4b\u51fa\u6765\u7684\u7ed3\u679c\uff0c\u5148\u7ed9\u7b54\u6848<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u4e0a\u6570\u5b57\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e2d\u8bc1500\uff0c\u5f80\u524d\u53d6 9 \u4e2a\u6708\u3002<\/strong>&nbsp;\u811a\u672c\u81ea\u52a8\u9009\u4e2d\u7684\u53c2\u6570\u662f\u7a97\u53e3 10 \u5929\u3001\u9608\u503c 6.0%\uff0c\u4e00\u6b21\u547d\u4e2d\u30029 \u4e2a\u6708\u91cc\u91cf\u51fa 4 \u4e2a\u76d8\u6574\u533a\uff0c\u6bcf\u4e00\u4e2a\u90fd\u8d70\u51fa\u4e86\u4fe1\u53f7\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u76d8\u6574\u533a<\/th><th>\u5929\u6570<\/th><th>\u4fe1\u53f7<\/th><th>\u4fe1\u53f7\u4ef7<\/th><th>\u540e5\u65e5<\/th><th>\u540e20\u65e5<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">02-13 ~ 02-24<\/td><td class=\"has-text-align-center\" data-align=\"center\">11<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5411\u4e0a\u7a81\u7834<\/td><td class=\"has-text-align-center\" data-align=\"center\">8527.56<\/td><td class=\"has-text-align-center\" data-align=\"center\">-3.3%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-8.9%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">04-03 ~ 04-09<\/td><td class=\"has-text-align-center\" data-align=\"center\">6<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5411\u4e0a\u7a81\u7834<\/td><td class=\"has-text-align-center\" data-align=\"center\">8088.57<\/td><td class=\"has-text-align-center\" data-align=\"center\">+2.2%<\/td><td class=\"has-text-align-center\" data-align=\"center\">+5.5%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">04-27 ~ 05-06<\/td><td class=\"has-text-align-center\" data-align=\"center\">9<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5411\u4e0a\u7a81\u7834<\/td><td class=\"has-text-align-center\" data-align=\"center\">8696.80<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0.3%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-3.9%<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">09-02 ~ 09-10<\/td><td class=\"has-text-align-center\" data-align=\"center\">8<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5411\u4e0b\u7a81\u7834<\/td><td class=\"has-text-align-center\" data-align=\"center\">7571.20<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u6837\u672c\u4e0d\u8db3<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4e24\u5929\u540e\u6536\u56de<\/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-1-csi500-1024x585.png\" alt=\"\" class=\"wp-image-4945\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-1-csi500-1024x585.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-1-csi500-300x171.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-1-csi500-768x439.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-1-csi500.png 1344w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u56fe2\uff1a\u4e2d\u8bc1500 \u4e5d\u4e2a\u6708\uff0c4 \u4e2a\u76d8\u6574\u533a 4 \u4e2a\u4fe1\u53f7\uff0c\u5168\u90e8\u5b9e\u8dd1\u8f93\u51fa<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b81\u5fb7\u65f6\u4ee3\uff0c\u5f80\u524d\u53d6 3 \u4e2a\u6708\u3002<\/strong>&nbsp;\u8fd9\u6b21\u7f51\u683c\u91cc\u6ca1\u6709\u53c2\u6570\u7ec4\u5408\u547d\u4e2d\u76ee\u6807\uff0c\u811a\u672c\u8d70\u4e86\u515c\u5e95\u8def\u5f84\uff0c\u7528\u7a97\u53e3 10 \u5929\u3001\u9608\u503c 5.0% \u627e\u5230 1 \u4e2a\u533a\uff0c\u968f\u540e\u7b49\u6765 1 \u4e2a\u5411\u4e0b\u7a81\u7834\u4fe1\u53f7\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u76d8\u6574\u533a<\/th><th>\u5929\u6570<\/th><th>\u4fe1\u53f7<\/th><th>\u4fe1\u53f7\u4ef7<\/th><th>\u540e5\u65e5<\/th><th>\u540e10\u65e5<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">08-20 ~ 08-24<\/td><td class=\"has-text-align-center\" data-align=\"center\">4<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5411\u4e0b\u7a81\u7834<\/td><td class=\"has-text-align-center\" data-align=\"center\">376.73<\/td><td class=\"has-text-align-center\" data-align=\"center\">-4.9%<\/td><td class=\"has-text-align-center\" data-align=\"center\">-10.9%<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-2-catl-1024x585.png\" alt=\"\" class=\"wp-image-4946\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-2-catl-1024x585.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-2-catl-300x171.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-2-catl-768x439.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-2-catl.png 1344w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u56fe3\uff1a\u5b81\u5fb7\u65f6\u4ee3 \u4e09\u4e2a\u6708\uff0c1 \u4e2a\u76d8\u6574\u533a 1 \u4e2a\u4fe1\u53f7\uff0c\u8dcc\u7834\u4e4b\u540e\u4e00\u8def\u8d70\u4e86\u4e0b\u6765<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u521a\u8dd1\u5b8c\u7684\u65f6\u5019\uff0c\u6211\u8fd8\u662f\u6709\u5c0f\u9e21\u51bb\u7684\u3002\u5b81\u5fb7\u90a3\u4e2a\u5411\u4e0b\u7a81\u7834\u4fe1\u53f7\uff0c8 \u6708 25 \u65e5 376 \u5757\u79bb\u573a\uff0c\u4e4b\u540e\u5341\u5929\u8dcc\u4e86 10.9%\uff0c\u4e00\u8def\u8dcc\u5230 305 \u9644\u8fd1\u3002\u8fd9\u4e2a\u4fe1\u53f7\u4e8b\u540e\u770b\uff0c\u51c6\u5f97\u8ba9\u4eba\u60f3\u7acb\u523b\u628a\u5b83\u6302\u5230\u5b9e\u76d8\u4e0a\u53bb\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u6211\u628a\u4e94\u4e2a\u4fe1\u53f7\u5168\u90e8\u5bf9\u4e86\u4e00\u904d\u8d26\uff0c\u5fc3\u6c14\u5c31\u964d\u4e0b\u6765\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e94\u4e2a\u4fe1\u53f7\u5bf9\u5b8c\u8d26\uff0c\u7ad9\u4f4f\u7684\u662f\u4e24\u4e2a\u3002\u4e2d\u8bc1500 \u90a3\u4e09\u4e2a\u5411\u4e0a\u7a81\u7834\u7684\u4fe1\u53f7\uff0c\u4e24\u4e2a\u5728 20 \u4e2a\u4ea4\u6613\u65e5\u540e\u662f\u4e8f\u7684\uff0c02-25 \u90a3\u4e2a\u4e70\u5b8c 20 \u5929\u4e8f 8.9%\u3002\u8fd8\u6709\u4e00\u4e2a 09-14 \u7684\u5411\u4e0b\u7a81\u7834\u4fe1\u53f7\uff0c\u5c31\u5728\u524d\u4e24\u5929\u521a\u89e6\u53d1\uff0c\u7ed3\u679c\u4e24\u4e2a\u4ea4\u6613\u65e5\u540e\u4ef7\u683c\u53c8\u6536\u56de\u533a\u95f4\u91cc\u4e86\uff0c\u73b0\u5728\u770b\u66f4\u50cf\u4e00\u6b21\u5047\u8dcc\u7834\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56db\u4e2a\u5b9d\u7bb1\uff0c\u53ea\u6709\u4e24\u4e2a\u534a\u88c5\u4e86\u5b9d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8d26\u8981\u4e00\u7b14\u4e00\u7b14\u7b97\u3002\u8fd9\u4e24\u4e2a\u534a\u662f\u600e\u4e48\u88c5\u4e86\u5b9d\u7684\uff0c\u624d\u662f\u8fd9\u7bc7\u771f\u6b63\u60f3\u8bb2\u7684\u4e1c\u897f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u600e\u4e48\u88c5\uff0c\u600e\u4e48\u8dd1<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6574\u5957\u4e1c\u897f\u88c5\u8d77\u6765\u53ea\u8981\u4e09\u6b65\uff0c\u5168\u7a0b\u4e0d\u82b1\u94b1\uff0c\u6570\u636e\u6e90\u662f\u514d\u8d39\u7684\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u6b65<strong>\u88c5\u4e24\u4e2a\u5e93<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2460 \u88c5\u4f9d\u8d56\uff0c\u4e00\u884c\u641e\u5b9a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install akshare pandas matplotlib<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">akshare \u8d1f\u8d23\u6570\u636e\uff0cpandas \u8d1f\u8d23\u8ba1\u7b97\uff0cmatplotlib \u8d1f\u8d23\u753b\u56fe\u3002\u88c5\u5b8c\u5c31\u9f50\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u6b65<strong>\u628a\u6807\u7684\u4e24\u884c\u6362\u6389<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u811a\u672c\u91cc\u6807\u7684\u548c\u533a\u95f4\u96c6\u4e2d\u653e\u5728\u4e00\u4e2a\u914d\u7f6e\u91cc\uff0c\u4f60\u53ea\u8981\u6539\u8fd9\u4e24\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2461 \u6807\u7684\u548c\u533a\u95f4\uff0c\u96c6\u4e2d\u6539\u8fd9\u4e24\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u6307\u6570\u7528 sh \u52a0\u4ee3\u7801\uff0c\u4e2a\u80a1\u7528 sz \u52a0\u4ee3\u7801\uff0c\u4e2a\u80a1\u5efa\u8bae\u52a0\u524d\u590d\u6743\nCASES = &#91;\n    {\"key\": \"csi500\", \"label\": \"\u4e2d\u8bc1500\", \"kind\": \"index\", \"symbol\": \"sh000905\", \"start\": \"2025-12-17\"},\n    {\"key\": \"catl\", \"label\": \"\u5b81\u5fb7\u65f6\u4ee3\", \"kind\": \"stock\", \"symbol\": \"sz300750\", \"start\": \"2026-06-17\"},\n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e09\u6b65<strong>\u8dd1\uff0c\u7136\u540e\u770b\u56fe<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2462 \u8dd1\u8d77\u6765\u5c31\u4e00\u6761\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python repro_consolidation.py<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8dd1\u5b8c\u63a7\u5236\u53f0\u4f1a\u6253\u51fa\u627e\u5230\u51e0\u4e2a\u76d8\u6574\u533a\u3001\u6bcf\u4e2a\u4fe1\u53f7\u7684\u65e5\u671f\u548c\u4ef7\u683c\uff0c\u540c\u65f6\u5728\u76ee\u5f55\u91cc\u751f\u6210 K \u7ebf\u56fe\u3002\u7ea2\u6da8\u7eff\u8dcc\uff0c\u76d8\u5b50\u7528\u6d45\u84dd\u5e95\u8272\u6846\u51fa\u6765\uff0c\u4fe1\u53f7\u7528\u4e09\u89d2\u6807\u5728\u5f53\u5929\u7684\u4ef7\u683c\u4e0a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e00\u6b65\u7684\u5173\u952e\u662f<strong>\u6570\u636e<\/strong>\u3002\u4e2a\u80a1\u4e00\u5b9a\u8981\u7528\u524d\u590d\u6743\uff0c\u4e0d\u7136\u9664\u6743\u9664\u606f\u90a3\u5929\u4f1a\u51ed\u7a7a\u51fa\u73b0\u4e00\u4e2a\u5927\u7f3a\u53e3\uff0c\u811a\u672c\u4f1a\u628a\u90a3\u4e2a\u7f3a\u53e3\u5f53\u6210\u5929\u5927\u7684\u6ce2\u52a8\uff0c\u76d8\u6574\u533a\u5168\u4e71\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u88c5\u597d\u4e4b\u540e\u600e\u4e48\u7528<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u628a\u5b83\u5f53\u6210\u4e00\u4e2a\u76d8\u524d\u626b\u63cf\u5668\u7528\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u5929\u65e9\u4e0a\u82b1\u4e00\u5206\u949f\uff0c\u628a\u4f60\u81ea\u9009\u80a1\u91cc\u7684\u7968\u6328\u4e2a\u6362\u8fdb\u914d\u7f6e\u91cc\u8dd1\u4e00\u904d\u3002\u6709\u65b0\u5f62\u6210\u7684\u76d8\u6574\u533a\uff0c\u5b83\u4f1a\u544a\u8bc9\u4f60\u4e0a\u4e0b\u6cbf\u5728\u54ea\u3002\u5df2\u7ecf\u6709\u4fe1\u53f7\u89e6\u53d1\u7684\uff0c\u5b83\u4f1a\u544a\u8bc9\u4f60\u54ea\u5929\u89e6\u53d1\u3001\u5f53\u65f6\u4ef7\u683c\u591a\u5c11\u3002\u53c2\u6570\u4e0d\u7528\u4f60\u7ba1\uff0c\u811a\u672c\u81ea\u5df1\u627e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u552f\u4e00\u7684\u7eaa\u5f8b\u662f\u522b\u62ff\u5b83\u5f53\u4e70\u5356\u6307\u4ee4\u3002\u5b83\u6807\u8bb0\u7684\u662f\u300c<strong>\u4ef7\u683c\u79bb\u5f00\u4e86\u4e00\u6bb5\u538b\u7f29\u533a\u95f4<\/strong>\u300d\u8fd9\u4e2a\u4e8b\u5b9e\uff0c\u4e0d\u662f\u300c\u63a5\u4e0b\u6765\u4f1a\u6da8\u300d\u8fd9\u4e2a\u9884\u8a00\u3002\u8fd9\u53e5\u8bdd\u4f60\u5148\u8bb0\u4f4f\uff0c\u7b2c\u4e03\u8282\u6211\u4f1a\u62ff\u771f\u5b9e\u6570\u636e\u7ed9\u4f60\u770b\u5b83\u9519\u8d77\u6765\u7684\u6837\u5b50\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u662f\u4f7f\u7528\u90e8\u5206\uff0c\u7167\u7740\u505a\u5c31\u80fd\u8dd1\u3002\u5f80\u4e0b\u662f\u52a8\u624b\u90e8\u5206\uff0c\u8bb2\u8fd9\u5957\u89c4\u5219\u91cc\u7684\u4e09\u4e2a\u5173\u952e\u8bbe\u8ba1\uff0c\u8fd8\u6709\u4e94\u4e2a\u4fe1\u53f7\u4e00\u7b14\u4e00\u7b14\u7684\u5bf9\u8d26\u3002\u4e0d\u5173\u5fc3\u4ee3\u7801\u7684\u8bdd\uff0c\u770b\u7b2c\u4e00\u8282\u7684\u8868\u683c\u548c\u7b2c\u4e03\u8282\u7684\u5bf9\u8d26\uff0c\u4e5f\u80fd\u628a\u7ed3\u8bba\u5e26\u8d70\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u76d8\u6574\u4e24\u4e2a\u5b57\uff0c\u662f\u600e\u4e48\u53d8\u6210\u4e00\u4e2a\u6570\u5b57\u7684<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u8bf4\u8fd9\u5957\u65b9\u6cd5\u6700\u6838\u5fc3\u7684\u4e00\u6b65\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u5929\u6536\u76d8\u540e\uff0c\u811a\u672c\u56de\u770b\u6700\u8fd1N\u4e2a\u4ea4\u6613\u65e5\uff0c\u627e\u51fa\u8fd9\u6bb5\u65f6\u95f4\u91cc\u7684\u6700\u9ad8\u70b9\u548c\u6700\u4f4e\u70b9\u3002\u7136\u540e\u7b97\u4e00\u4e2a\u6bd4\u503c\uff0c\u6700\u9ad8\u70b9\u51cf\u6700\u4f4e\u70b9\uff0c\u9664\u4ee5\u6700\u4f4e\u70b9\u3002\u8fd9\u4e2a\u6bd4\u503c\u5c31\u662f\u8fd9\u6bb5\u884c\u60c5\u7684\u632f\u5e45\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3e\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50\u3002\u6700\u8fd1 15 \u5929\u91cc\uff0c\u4ef7\u683c\u6700\u9ad8\u6478\u5230\u8fc7 11 \u5757\uff0c\u6700\u4f4e\u5230\u8fc7 10 \u5757\uff0c\u90a3\u632f\u5e45\u5c31\u662f 1 \u9664\u4ee5 10\uff0c\u7b49\u4e8e 10%\u3002\u53cd\u8fc7\u6765\uff0c\u5982\u679c\u8fd9 15 \u5929\u4ef7\u683c\u4e00\u76f4\u5728 10 \u5757\u5230 10 \u5757 2 \u4e4b\u95f4\u6643\uff0c\u632f\u5e45\u5c31\u53ea\u6709 2%\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u5b57\u4e00\u51fa\u6765\uff0c\u4e8b\u60c5\u5c31\u597d\u529e\u4e86\u3002\u9884\u5148\u8bbe\u4e00\u4e2a\u9608\u503c\uff0c\u6bd4\u5982 6%\uff0c\u632f\u5e45\u4f4e\u4e8e\u5b83\u7684\u65e5\u5b50\uff0c\u5c31\u8bb0\u4e00\u7b14\u300c\u4eca\u5929\u5728\u76d8\u6574\u300d\u3002\u8fde\u7eed\u7684\u76d8\u6574\u65e5\u4e32\u8d77\u6765\uff0c\u53ea\u8981\u8de8\u5ea6\u8d85\u8fc7 3 \u5929\uff0c\u5c31\u6210\u4e86\u4e00\u4e2a\u76d8\u6574\u533a\u3002\u533a\u7684\u6700\u9ad8\u4ef7\u5c31\u662f\u5929\u82b1\u677f\uff0c\u6700\u4f4e\u4ef7\u5c31\u662f\u5730\u677f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-3-vol-1024x585.png\" alt=\"\" class=\"wp-image-4947\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-3-vol-1024x585.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-3-vol-300x171.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-3-vol-768x439.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-3-vol.png 1344w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u56fe4\uff1a\u4e2d\u8bc1500 \u6bcf\u5929\u7684\u7a97\u53e3\u632f\u5e45\uff0c\u7ea2\u7ebf\u662f 6% \u9608\u503c\uff0c\u7eff\u5f71\u91cc\u5c31\u662f\u76d8\u6574\u65e5<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5f20\u56fe\u4f60\u770b\u540e\u662f\u4e0d\u662f\u611f\u89c9\uff1a\u6700\u8fd1\u8d70\u52bf\u6536\u655b\u4e86\uff1f\u5176\u5b9e\u5c31\u662f\u66f2\u7ebf\u5f80\u4e0b\u624e\u8fdb\u7ea2\u7ebf\u7684\u4e0b\u65b9\uff0c\u56fe\u53d8\u6210\u4e86\u53ef\u4ee5\u6838\u67e5\u7684\u4e1c\u897f\uff0c\u8fd9\u662f\u6574\u5957\u65b9\u6cd5\u91cc\u6211\u89c9\u5f97\u6700\u503c\u94b1\u7684\u4e00\u6b65\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6838\u5fc3\u903b\u8f91\u5c31\u8fd9\u51e0\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2463 \u632f\u5e45\u600e\u4e48\u7b97\uff0c\u5c31\u8fd9\u56db\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df&#91;'rolling_high'] = df&#91;'High'].rolling(window=window).max()\ndf&#91;'rolling_low'] = df&#91;'Low'].rolling(window=window).min()\ndf&#91;'volatility'] = (df&#91;'rolling_high'] - df&#91;'rolling_low']) \/ df&#91;'rolling_low']\ndf&#91;'in_consolidation'] = df&#91;'volatility'] &lt; threshold<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u56db\u884c\u4ee3\u7801\uff0c\u7b2c\u4e00\u884c\u627e\u7a97\u53e3\u5185\u6700\u9ad8\uff0c\u7b2c\u4e8c\u884c\u627e\u6700\u4f4e\uff0c\u7b2c\u4e09\u884c\u7b97\u632f\u5e45\uff0c\u7b2c\u56db\u884c\u8ddf\u9608\u503c\u6bd4\u5927\u5c0f\u3002\u4e4b\u540e\u628a\u8fde\u7eed\u7684 True \u4e32\u6210\u533a\uff0c\u8de8\u5ea6\u8d85\u8fc7 3 \u5929\u7684\u7559\u4e0b\u6765\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8fc7\u8fd9\u91cc\u85cf\u7740\u4e00\u4e2a\u6211\u8dd1\u7684\u65f6\u5019\u624d\u6ce8\u610f\u5230\u7684\u7ec6\u8282\u3002\u4ee3\u7801\u5224\u8de8\u5ea6\u7528\u7684\u662f\u65e5\u5386\u5929\uff0c\u4e0d\u662f\u4ea4\u6613\u65e5\u3002\u5b81\u5fb7\u90a3\u4e2a 08-20 \u5230 08-24 \u7684\u533a\uff0c\u65e5\u5386\u4e0a 4 \u5929\uff0c\u64e6\u7ebf\u8fc7\u4e86\u300c\u5927\u4e8e 3 \u5929\u300d\u7684\u95e8\u69db\uff0c\u644a\u5f00\u4e00\u770b\u5176\u5b9e\u53ea\u6709 3 \u4e2a\u4ea4\u6613\u65e5\u3002\u8fd9\u79cd\u8ff7\u4f60\u533a\u7b97\u4e0d\u7b97\u76d8\u6574\uff0c\u6211\u7684\u770b\u6cd5\u662f\u7b97\uff0c\u4f46\u4f60\u8981\u77e5\u9053\u5b83\u662f\u8fd9\u4e48\u7b97\u7684\uff0c\u5fc3\u91cc\u6709\u6570\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e2d\u8bc1500 \u90a3\u8fb9\u8fd8\u6709\u4e00\u4e2a\u66f4\u5938\u5f20\u7684\u3002\u7b2c\u4e00\u4e2a\u533a\u6807\u7740 02-13 \u5230 02-24\uff0c\u65e5\u5386\u4e0a 11 \u5929\uff0c\u4e2d\u95f4\u9694\u7740\u6574\u4e2a\u6625\u8282\u5047\u671f\uff0c\u771f\u6b63\u5f00\u76d8\u7684\u53ea\u6709 2 \u5929\u3002\u8fd9\u79cd\u5047\u671f\u91cc\u8bde\u751f\u7684\u533a\uff0c\u8bf4\u662f\u76d8\u6574\u6709\u70b9\u52c9\u5f3a\uff0c\u800c\u56db\u4e2a\u4fe1\u53f7\u91cc 20 \u65e5\u4e8f\u5f97\u6700\u72e0\u7684\u90a3\u7b14\uff0c\u6070\u597d\u5c31\u662f\u5b83\u53d1\u51fa\u6765\u7684\u3002\u65e5\u5386\u5929\u8fd9\u4e2a\u53e3\u5f84\uff0c\u7528\u4e4b\u524d\u5f97\u81ea\u5df1\u6382\u91cf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001\u53c2\u6570\u662f\u811a\u672c\u81ea\u5df1\u8bd5\u51fa\u6765\u7684<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u6709\u4e2a\u7ed5\u4e0d\u5f00\u7684\u9ebb\u70e6\u3002\u7a97\u53e3\u53d6\u591a\u5c11\u5929\uff0c\u9608\u503c\u5b9a\u591a\u5c11\uff0c\u6ca1\u6709\u4e00\u4e2a\u5bf9\u6240\u6709\u7968\u90fd\u597d\u4f7f\u7684\u7b54\u6848\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u6837\u7684 6% \u9608\u503c\uff0c\u653e\u5728\u5927\u76d8\u6307\u6570\u4e0a\u53ef\u80fd\u627e\u51fa\u5341\u51e0\u4e2a\u533a\uff0c\u653e\u5230\u4e00\u53ea\u6ce2\u52a8\u5927\u7684\u7968\u4e0a\u53ef\u80fd\u4e00\u4e2a\u90fd\u627e\u4e0d\u51fa\u6765\u3002\u624b\u52a8\u8c03\u53c2\u8c03\u5230\u5410\uff0c\u6362\u4e2a\u7968\u53c8\u5f97\u4ece\u5934\u518d\u6765\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5957\u505a\u6cd5\u7684\u7b54\u6848\u662f\u8ba9\u811a\u672c\u81ea\u5df1\u8bd5\u3002\u7a97\u53e3\u5728 10\u300115\u300120\u300125 \u5929\u91cc\u6311\uff0c\u9608\u503c\u5728 2.5% \u5230 6% \u91cc\u6311\uff0c\u4e00\u5171 20 \u79cd\u7ec4\u5408\uff0c\u6328\u4e2a\u8dd1\u3002\u76ee\u6807\u662f\u627e\u51fa 2 \u5230 7 \u4e2a\u76d8\u6574\u533a\uff0c\u592a\u5c11\u8bf4\u660e\u5de5\u5177\u6ca1\u8d77\u4f5c\u7528\uff0c\u592a\u591a\u8bf4\u660e\u628a\u566a\u97f3\u90fd\u6846\u8fdb\u6765\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2464 20 \u79cd\u7ec4\u5408\uff0c\u6328\u4e2a\u8bd5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>window_options = &#91;10, 15, 20, 25]\nthreshold_options = &#91;0.025, 0.03, 0.04, 0.05, 0.06]\ntarget_zone_count = (2, 7)\n\nfor window in window_options:\n    for threshold in threshold_options:\n        zones = identify_sideways_movement(data, window, threshold)\n        if target_zone_count&#91;0] &lt;= len(zones) &lt;= target_zone_count&#91;1]:\n            return window, threshold, zones<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u8fd9\u6b21\u8dd1\u7684\u4e24\u4e2a\u6807\u7684\uff0c\u6b63\u597d\u628a\u4e24\u6761\u8def\u5f84\u90fd\u6f14\u793a\u4e86\u4e00\u904d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e2d\u8bc1500 \u662f\u987a\u7684\u3002\u7a97\u53e3 10 \u5929\u52a0\u9608\u503c 6.0% \u8fd9\u7ec4\u53c2\u6570\uff0c\u4e00\u6b21\u5c31\u627e\u51fa 4 \u4e2a\u533a\uff0c\u843d\u5728 2 \u5230 7 \u7684\u76ee\u6807\u533a\u95f4\u91cc\uff0c\u76f4\u63a5\u8fd4\u56de\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b81\u5fb7\u65f6\u4ee3\u662f\u6002\u7684\u30023 \u4e2a\u6708\u91cc\u628a 20 \u79cd\u7ec4\u5408\u5168\u90e8\u8bd5\u4e86\u4e00\u904d\uff0c\u6ca1\u6709\u4e00\u7ec4\u843d\u5728\u76ee\u6807\u533a\u95f4\u91cc\u3002\u8fd9\u65f6\u5019\u811a\u672c\u4e0d\u4f1a\u786c\u51d1\uff0c\u5b83\u4f1a\u9000\u4e00\u6b65\uff0c\u7528\u300c\u81f3\u5c11\u80fd\u627e\u51fa\u4e00\u4e2a\u533a\u300d\u7684\u6700\u5bbd\u6807\u51c6\u515c\u5e95\uff0c\u6700\u540e\u505c\u5728\u7a97\u53e3 10 \u5929\u3001\u9608\u503c 5.0%\uff0c\u627e\u5230 1 \u4e2a\u533a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u5f53\u65f6\u8dd1\u5b8c\u8fd9\u4e2a\u8f93\u51fa\uff0c\u5bf9\u8fd9\u5957\u8bbe\u8ba1\u7684\u8bc4\u4ef7\u5c31\u4e00\u53e5\u8bdd\u3002\u5b83\u77e5\u9053\u81ea\u5df1\u5728\u4ec0\u4e48\u65f6\u5019\u8be5\u8ba4\u6002\uff0c\u800c\u4e0d\u662f\u786c\u7ed9\u4f60\u7f16\u4e00\u4e2a\u597d\u770b\u7684\u7ed3\u679c\u51fa\u6765\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u6709\u5c42\u7a97\u6237\u7eb8\u6211\u5f97\u6345\u7834\u3002\u8fd9 20 \u79cd\u7ec4\u5408\u662f\u62ff\u6574\u6bb5\u5386\u53f2\u8bd5\u51fa\u6765\u7684\uff0c\u8bd5\u7684\u65f6\u5019\uff0c\u6bcf\u4e2a\u533a\u5728\u54ea\u5b83\u90fd\u5df2\u7ecf\u770b\u5728\u773c\u91cc\uff0c\u53c2\u6570\u672c\u8d28\u4e0a\u662f\u4e8b\u540e\u6311\u7684\u3002\u8fd9\u4e0d\u7b97\u4f5c\u5f0a\uff0c\u5de5\u5177\u672c\u6765\u5c31\u662f\u5e2e\u4f60\u5b9a\u89c4\u5219\u7684\uff0c\u53ef\u4f60\u5fc3\u91cc\u8981\u6709\u6570\uff0c\u8fc7\u4e00\u4e2a\u6708\u518d\u8dd1\u540c\u4e00\u53ea\u7968\uff0c\u9009\u4e2d\u7684\u53c2\u6570\u53ef\u80fd\u5c31\u6362\u4e86\u4e00\u7ec4\u3002\u6211\u7684\u7528\u6cd5\u662f\u628a\u5b83\u5f53\u5b9a\u671f\u91cd\u8dd1\u7684\u626b\u63cf\u5668\uff0c\u8ddf\u7740\u6700\u65b0\u884c\u60c5\u91cd\u65b0\u6311\u53c2\u6570\uff0c\u800c\u4e0d\u662f\u8bbe\u5b9a\u4e00\u6b21\u5c31\u6254\u5728\u4e00\u8fb9\u4e0d\u7ba1\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001\u7a81\u7834\u600e\u4e48\u624d\u7b97\u6570<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u627e\u5230\u76d8\u6574\u533a\u53ea\u662f\u524d\u534a\u4ef6\u4e8b\u3002\u771f\u6b63\u503c\u94b1\u7684\u5728\u540e\u534a\u6bb5\uff0c\u4ef7\u683c\u4ec0\u4e48\u65f6\u5019\u79bb\u5f00\u8fd9\u4e2a\u533a\uff0c\u5f80\u54ea\u8fb9\u79bb\u5f00\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u89c4\u5219\u5199\u5f97\u5f88\u6b7b\u3002\u6536\u76d8\u4ef7\u51b2\u8fc7\u533a\u95f4\u7684\u5929\u82b1\u677f\uff0c\u518d\u591a\u8d70 0.5%\uff0c\u624d\u7b97\u4e00\u6b21\u5411\u4e0a\u7a81\u7834\u3002\u6536\u76d8\u4ef7\u8dcc\u7834\u5730\u677f\uff0c\u518d\u591a\u8d70 0.5%\uff0c\u624d\u7b97\u4e00\u6b21\u5411\u4e0b\u7a81\u7834\u3002\u6bcf\u4e2a\u533a\u53ea\u8bb0\u7b2c\u4e00\u4e2a\u4fe1\u53f7\uff0c\u540e\u9762\u7684\u4e0d\u7b97\uff0c\u514d\u5f97\u540c\u4e00\u4e2a\u533a\u53cd\u590d\u6253\u6270\u4f60\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2465 \u7a81\u7834\u786e\u8ba4\uff0c\u591a\u8d70 0.5% \u518d\u7b97\u6570<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if close > zone_high * (1 + confirm_buffer) and not signal_triggered:\n    signals.append({\"date\": idx, \"signal\": \"BUY\", \"price\": close})\nelif close &lt; zone_low * (1 - confirm_buffer) and not signal_triggered:\n    signals.append({\"date\": idx, \"signal\": \"SELL\", \"price\": close})<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u90a3 0.5% \u662f\u5e72\u561b\u7684\uff1f\u5b83\u5176\u5b9e\u662f\u7ed9\u5047\u7a81\u7834\u8bbe\u7684\u4e00\u9053\u95e8\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ca1\u6709\u8fd9\u9053\u95e8\uff0c\u6536\u76d8\u4ef7\u9ad8\u51fa\u5929\u82b1\u677f\u4e00\u5206\u94b1\uff0c\u4fe1\u53f7\u5c31\u54cd\u4e86\u3002\u800c\u5e02\u573a\u91cc\u6700\u4e0d\u7f3a\u7684\uff0c\u5c31\u662f\u90a3\u79cd\u63a2\u51fa\u5934\u4e00\u5929\u3001\u7b2c\u4e8c\u5929\u5c31\u7f29\u56de\u53bb\u7684\u5047\u52a8\u4f5c\u3002\u591a\u8d70 0.5%\uff0c\u7b49\u4e8e\u8981\u6c42\u4ef7\u683c\u62ff\u51fa\u4e00\u70b9\u771f\u91d1\u767d\u94f6\u7684\u59ff\u6001\uff0c\u800c\u4e0d\u662f\u8e6d\u4e00\u4e0b\u5c31\u8dd1\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/02-buffer-gate-1024x503.png\" alt=\"\" class=\"wp-image-4948\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/02-buffer-gate-1024x503.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/02-buffer-gate-300x147.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/02-buffer-gate-768x377.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/02-buffer-gate-1536x754.png 1536w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/02-buffer-gate.png 1664w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u56fe5\uff1a\u5929\u82b1\u677f\u4e0a\u65b9\u591a\u51fa\u4e00\u9053 0.5% \u7684\u95e8\uff0c\u5dee\u4e00\u70b9\u7684\u90fd\u88ab\u62e6\u5728\u5916\u9762<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b21\u5b9e\u8dd1\u8fd8\u649e\u4e0a\u4e86\u4e00\u4e2a\u6559\u79d1\u4e66\u7ea7\u7684\u6848\u4f8b\u3002\u4e2d\u8bc1500 \u90a3\u4e2a\u533a\uff0c\u5730\u677f\u662f 7610.58\uff0c\u4e58\u4e0a 0.995 \u4e4b\u540e\u89e6\u53d1\u7ebf\u662f 7572.53\u30029 \u6708 14 \u65e5\u90a3\u5929\u6536\u76d8 7571.20\uff0c\u6bd4\u89e6\u53d1\u7ebf\u53ea\u4f4e\u4e86 1.33 \u4e2a\u70b9\u3002\u5c31\u5dee\u8fd9\u4e00\u70b9\u70b9\uff0c\u5411\u4e0b\u7a81\u7834\u4fe1\u53f7\u54cd\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u6709\u610f\u601d\u7684\u5728\u540e\u9762\u3002\u4e24\u4e2a\u4ea4\u6613\u65e5\u540e\uff0c9 \u6708 16 \u65e5\uff0c\u6307\u6570\u6536\u76d8 7683\uff0c\u4e0d\u4f46\u6536\u56de\u4e86\u5730\u677f\uff0c\u8fd8\u7ad9\u56de\u4e86\u5730\u677f\u4e0a\u65b9 1%\u3002\u6211\u5728\u5c4f\u5e55\u524d\u770b\u7740\u8fd9\u4e2a\u4fe1\u53f7\uff0c\u5fc3\u60c5\u5f88\u590d\u6742\u3002\u7f13\u51b2\u6321\u5f97\u4f4f\u201c\u5dee\u4e00\u70b9\u70b9\u201d\u7684\u5047\u52a8\u4f5c\uff0c\u6321\u4e0d\u4f4f\u201c\u8fc7\u4e24\u5929\u518d\u9a97\u4f60\u201d\u7684\u5047\u52a8\u4f5c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001\u4e94\u4e2a\u4fe1\u53f7\u7684\u4e8b\u540e\u8d26<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u56de\u5230\u7b2c\u4e8c\u8282\u6b20\u7684\u90a3\u7b14\u8d26\u3002\u8fd9\u4e9b\u4fe1\u53f7\uff0c\u4e8b\u540e\u5230\u5e95\u8d70\u6210\u4ec0\u4e48\u6837\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u628a\u6bcf\u4e2a\u4fe1\u53f7\u89e6\u53d1\u65e5\u7684\u6536\u76d8\u4ef7\u8bb0\u4e0b\u6765\uff0c\u5f80\u540e\u6570 5 \u4e2a\u300110 \u4e2a\u300120 \u4e2a\u4ea4\u6613\u65e5\uff0c\u7b97\u6da8\u8dcc\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u8d26\u7684\u53e3\u5f84\u4e5f\u4ea4\u4ee3\u6e05\u695a\u3002\u4fe1\u53f7\u9760\u6536\u76d8\u4ef7\u89e6\u53d1\uff0c\u6536\u76d8\u4e4b\u524d\u5b83\u51fa\u4e0d\u6765\u3002\u771f\u8981\u7167\u7740\u505a\uff0c\u4f60\u5f97\u7b49\u6536\u76d8\u786e\u8ba4\u4fe1\u53f7\uff0c\u7b2c\u4e8c\u5929\u518d\u52a8\u624b\uff0c\u4e2d\u95f4\u8fd8\u9694\u7740\u9694\u591c\u8df3\u7a7a\u548c\u624b\u7eed\u8d39\u3002\u4e0b\u9762\u7684\u8d26\u5168\u90e8\u4ece\u4fe1\u53f7\u5f53\u5929\u6536\u76d8\u4ef7\u8d77\u7b97\uff0c\u6ca1\u5360\u4fbf\u5b9c\uff0c\u4f46\u4e5f\u6ca1\u6263\u8df3\u7a7a\u548c\u624b\u7eed\u8d39\uff0c\u4f60\u770b\u7684\u65f6\u5019\u5fc3\u91cc\u5f97\u6709\u8fd9\u6746\u79e4\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-4-after-1024x585.png\" alt=\"\" class=\"wp-image-4949\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-4-after-1024x585.png 1024w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-4-after-300x171.png 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-4-after-768x439.png 768w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/09\/chart-4-after.png 1344w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u56fe6\uff1a\u4e94\u4e2a\u4fe1\u53f7\u7684\u5bf9\u8d26\uff0c\u989c\u8272\u8d8a\u6df1\u4ee3\u8868\u56de\u770b\u8d8a\u8fdc\uff0c\u7070\u8272\u4ee3\u8868\u6837\u672c\u8fd8\u4e0d\u591f<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u7b14\u4e00\u7b14\u8fc7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7ad9\u4f4f\u7684\u4e24\u4e2a\u3002\u4e2d\u8bc1500 04-14 \u7684\u5411\u4e0a\u7a81\u7834\u4fe1\u53f7\uff0c\u89e6\u53d1\u4ef7 8088.57\uff0c20 \u4e2a\u4ea4\u6613\u65e5\u540e +5.5%\uff0c\u4e2d\u9014\u8fd8\u6478\u8fc7\u66f4\u9ad8\u3002\u5b81\u5fb7 08-25 \u7684\u5411\u4e0b\u7a81\u7834\u66f4\u6f02\u4eae\uff0c\u89e6\u53d1\u4ef7 376.73\uff0c10 \u4e2a\u4ea4\u6613\u65e5\u540e -10.9%\uff0c\u65b9\u5411\u4e00\u8def\u6ca1\u56de\u5934\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8f\u7684\u4e24\u4e2a\u300202-25 \u7684\u5411\u4e0a\u7a81\u7834\uff0c\u8ffd\u5728 8527\uff0c20 \u5929\u540e -8.9%\uff0c\u4e70\u5b8c\u5c31\u8dcc\u300205-07 \u7684\u5411\u4e0a\u7a81\u7834\uff0c\u8ffd\u5728 8696\uff0c20 \u5929\u540e -3.9%\u3002\u8fd9\u4e24\u4e2a\u90fd\u662f\u6807\u51c6\u7684\u300c\u7a81\u7834\u8ffd\u8fdb\u53bb\uff0c\u7136\u540e\u533a\u95f4\u89c1\u9876\u300d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5931\u6548\u7684\u4e00\u4e2a\u300209-14 \u7684\u5411\u4e0b\u7a81\u7834\uff0c\u521a\u89e6\u53d1\u4e24\u5929\uff0c\u4ef7\u683c\u5c31\u6536\u56de\u533a\u95f4\uff0c\u6309\u89c4\u5219\u5b83\u5df2\u7ecf\u4e0d\u4f1a\u518d\u53d1\u7b2c\u4e8c\u4e2a\u4fe1\u53f7\uff0c\u8fd9\u4e2a\u4fe1\u53f7\u7b49\u4e8e\u767d\u54cd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u4e00\u4e0b\uff0c2 \u4e2a\u7ad9\u4f4f\uff0c2 \u4e2a\u4e8f\uff0c1 \u4e2a\u767d\u54cd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u4ee5\u6211\u624d\u8bf4\u56db\u4e2a\u7bb1\u5b50\u6253\u5f00\u4e24\u4e2a\u534a\u3002\u8fd9\u4e2a\u6210\u7ee9\u5355\u653e\u5728\u4efb\u4f55\u7b56\u7565\u8bc4\u5ba1\u4f1a\u4e0a\u90fd\u4e0d\u7b97\u96be\u770b\uff0c\u4f46\u5b83\u6e05\u695a\u5730\u544a\u8bc9\u4f60\uff0c\u7a81\u7834\u4fe1\u53f7\u7684\u4ef7\u503c\u4e0d\u5728\u6bcf\u4e00\u6b21\u90fd\u5bf9\uff0c\u800c\u5728\u5b83\u628a\u300c\u8ffd\u6da8\u6740\u8dcc\u300d\u8fd9\u4e2a\u60c5\u7eea\u52a8\u4f5c\uff0c\u6362\u6210\u4e86\u4e00\u4e2a\u53ef\u6838\u67e5\u3001\u53ef\u590d\u76d8\u3001\u53ef\u7edf\u8ba1\u7684\u89c4\u5219\u52a8\u4f5c\u3002\u5355\u6b21\u5bf9\u9519\u662f\u8fd0\u6c14\uff0c\u6837\u672c\u6512\u591a\u4e86\u624d\u8f6e\u5230\u89c4\u5219\u8bf4\u8bdd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u6709\u4e00\u4e2a\u5fc5\u987b\u8001\u5b9e\u4ea4\u4ee3\u7684\u4e8b\u30025 \u4e2a\u4fe1\u53f7\uff0c\u6837\u672c\u5c31\u662f\u8fd9\u4e48\u70b9\uff0c\u518d\u4e58\u4ee5\u4efb\u4f55\u5e74\u5316\u6536\u76ca\u90fd\u662f\u800d\u6d41\u6c13\u3002\u4f60\u60f3\u9a8c\u8bc1\u5b83\uff0c\u5c31\u5f97\u50cf\u6211\u8fd9\u6837\u6362\u6807\u7684\u3001\u6362\u533a\u95f4\u591a\u8dd1\u51e0\u8f6e\uff0c\u8ba9\u6837\u672c\u81ea\u5df1\u722c\u51fa\u6765\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516b\u3001\u5b83\u4e0d\u731c\u672a\u6765<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5199\u5230\u8fd9\u91cc\uff0c\u628a\u8bdd\u6536\u62e2\u4e00\u4e0b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5957\u4e1c\u897f\u731c\u4e0d\u4e86\u884c\u60c5\u3002\u5b83\u505a\u7684\u662f\u4e09\u4ef6\u66f4\u8001\u5b9e\u7684\u4e8b\u3002\u628a<strong>\u76d8\u6574<\/strong>\u4ece\u611f\u89c9\u53d8\u6210\u4e00\u4e2a\u6bcf\u5929\u53ef\u4ee5\u6838\u67e5\u7684\u6570\u5b57\u3002\u628a<strong>\u7a81\u7834<\/strong>\u4ece\u4e00\u4e2a\u77ac\u95f4\u7684\u51b2\u52a8\uff0c\u53d8\u6210\u4e00\u6761\u8981\u8fde\u7eed\u6ee1\u8db3\u4e24\u4e2a\u6761\u4ef6\u624d\u89e6\u53d1\u7684\u89c4\u5219\u3002\u628a\u6bcf\u4e00\u6b21\u89e6\u53d1\u90fd\u8bb0\u4e0b\u65e5\u671f\u3001\u4ef7\u683c\u548c\u5f53\u65f6\u533a\u95f4\u7684\u4e0a\u4e0b\u6cbf\uff0c\u8ba9\u4f60\u4e8b\u540e\u80fd\u4e00\u7b14\u4e00\u7b14\u5bf9\u8d26\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e09\u4ef6\u4e8b\u6700\u4e0d\u663e\u773c\uff0c\u4e5f\u6700\u503c\u94b1\u3002\u5927\u90e8\u5206\u6563\u6237\u7684\u590d\u76d8\uff0c\u505c\u5728<strong>\u5f53\u65f6\u6211\u611f\u89c9\u8981\u7a81\u7834\u4e86<\/strong>\u3002\u5b83\u7ed9\u4f60\u7684\u590d\u76d8\u6750\u6599\u662f\u8fd9\u6837\u7684\uff0c9 \u6708 14 \u65e5 7571 \u89e6\u53d1\u5411\u4e0b\u7a81\u7834\uff0c\u533a\u95f4 7610 \u5230 7850\uff0c\u4e24\u4e2a\u4ea4\u6613\u65e5\u540e\u5931\u6548\u3002\u611f\u89c9\u6ca1\u6cd5\u6539\u8fdb\uff0c\u6570\u5b57\u624d\u80fd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u7559\u4e24\u4e2a\u95ee\u9898\u7ed9\u4f60\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u81ea\u9009\u80a1\u91cc\u90a3\u51e0\u53ea\u6a2a\u4e86\u5f88\u4e45\u7684\u7968\uff0c\u632f\u5e45\u662f\u591a\u5c11\uff0c\u79bb 6% \u8fd8\u5dee\u591a\u8fdc\uff0c\u8fd9\u4e2a\u4eca\u5929\u6536\u76d8\u5c31\u80fd\u7b97\u3002\u8fd8\u6709\uff0c\u4e0a\u4e00\u6b21\u4f60\u8ffd\u4e00\u4e2a\u7a81\u7834\u88ab\u5957\u7684\u65f6\u5019\uff0c\u90a3\u4e2a\u4ef7\u683c\u79bb\u533a\u95f4\u4e0a\u6cbf\u6709\u591a\u8fdc\uff0c\u591f\u4e0d\u591f 0.5%\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b8c\u6574\u811a\u672c\u5728\u4e0b\u9762\uff0c\u88c5\u597d\u5e93\u5c31\u80fd\u8dd1\u3002\u60f3\u8981\u54ea\u4e2a\u6807\u7684\uff0c\u6539\u914d\u7f6e\u91cc\u7684\u4e24\u884c\u5c31\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2466 \u5b8c\u6574\u811a\u672c\uff0c\u88c5\u597d\u5e93\u76f4\u63a5\u8dd1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># -*- coding: utf-8 -*-\n\n\"\"\"\n\u76d8\u6574\u533a\u68c0\u6d4b\u4e0e\u7a81\u7834\u4fe1\u53f7\uff08A \u80a1\u7248\uff09\n\u7b56\u7565\u903b\u8f91\u590d\u73b0\u81ea The Quiet Before the Move\n\u6570\u636e\u6e90 akshare\uff08\u65b0\u6d6a\uff09\uff0c\u6307\u6570 sh \u524d\u7f00\uff0c\u4e2a\u80a1 sz \u524d\u7f00 + \u524d\u590d\u6743\n\u8fd0\u884c\uff1apython repro_consolidation.py\n\"\"\"\n\nimport os\nimport json\n\nimport akshare as ak\nimport pandas as pd\nfrom datetime import datetime\n\nCASES = &#91;\n    {\"key\": \"csi500\", \"label\": \"\u4e2d\u8bc1500\", \"kind\": \"index\", \"symbol\": \"sh000905\", \"start\": \"2025-12-17\"},\n    {\"key\": \"catl\", \"label\": \"\u5b81\u5fb7\u65f6\u4ee3\", \"kind\": \"stock\", \"symbol\": \"sz300750\", \"start\": \"2026-06-17\"},\n]\n\nEND = datetime.now().strftime(\"%Y-%m-%d\")\nCONFIRM_BUFFER = 0.005  # \u7a81\u7834\u786e\u8ba4\u7f13\u51b2 0.5%\n\n\ndef get_clean_financial_data(kind, symbol, start_date, end_date):\n    \"\"\"\u6307\u6570\u7528 stock_zh_index_daily\uff0c\u4e2a\u80a1\u7528 stock_zh_a_daily \u524d\u590d\u6743\"\"\"\n    if kind == \"index\":\n        raw = ak.stock_zh_index_daily(symbol=symbol)\n    else:\n        raw = ak.stock_zh_a_daily(symbol=symbol, adjust=\"qfq\")\n\n    raw&#91;\"date\"] = pd.to_datetime(raw&#91;\"date\"])\n    df = raw&#91;&#91;\"date\", \"open\", \"high\", \"low\", \"close\"]].copy()\n    df.columns = &#91;\"Date\", \"Open\", \"High\", \"Low\", \"Close\"]\n    df = df.set_index(\"Date\").ffill()\n    return df.loc&#91;start_date:end_date]\n\n\ndef identify_sideways_movement(data, window, threshold):\n    \"\"\"\u6eda\u52a8\u7a97\u53e3\u7b97\u632f\u5e45\uff0c\u4f4e\u4e8e\u9608\u503c\u7684\u65e5\u5b50\u8fde\u6210\u76d8\u6574\u533a\uff08\u8de8\u5ea6\u9700\u8d85\u8fc7 3 \u4e2a\u65e5\u5386\u5929\uff09\"\"\"\n    zones = &#91;]\n    if len(data) &lt; window:\n        return zones\n\n    df = data.copy()\n    df&#91;'rolling_high'] = df&#91;'High'].rolling(window=window).max()\n    df&#91;'rolling_low'] = df&#91;'Low'].rolling(window=window).min()\n    df&#91;'volatility'] = (df&#91;'rolling_high'] - df&#91;'rolling_low']) \/ df&#91;'rolling_low']\n    df&#91;'in_consolidation'] = df&#91;'volatility'] &lt; threshold\n\n    in_zone, zone_start = False, None\n    for i in range(len(df)):\n        if df&#91;'in_consolidation'].iloc&#91;i] and not in_zone:\n            in_zone, zone_start = True, df.index&#91;i]\n        elif not df&#91;'in_consolidation'].iloc&#91;i] and in_zone:\n            in_zone = False\n            zone_end = df.index&#91;i - 1]\n            if (zone_end - zone_start).days > 3:\n                zones.append({\"start\": zone_start, \"end\": zone_end})\n\n    if in_zone and (df.index&#91;-1] - zone_start).days > 3:\n        zones.append({\"start\": zone_start, \"end\": df.index&#91;-1]})\n\n    return zones\n\n\ndef detect_breakout_signals(data, zones, confirm_buffer=CONFIRM_BUFFER):\n    \"\"\"\u6536\u76d8\u7a81\u7834\u533a\u9ad8 +0.5% \u8bb0\u5411\u4e0a\u7a81\u7834\uff0c\u8dcc\u7834\u533a\u4f4e -0.5% \u8bb0\u5411\u4e0b\u7a81\u7834\uff0c\u6bcf\u533a\u53ea\u8bb0\u7b2c\u4e00\u4e2a\"\"\"\n    signals = &#91;]\n    for period in zones:\n        if period&#91;\"start\"] == period&#91;\"end\"]:\n            continue\n\n        zone_data = data.loc&#91;period&#91;\"start\"]:period&#91;\"end\"]]\n        zone_high = zone_data&#91;'High'].max()\n        zone_low = zone_data&#91;'Low'].min()\n        after_zone = data.iloc&#91;data.index.get_loc(period&#91;\"end\"]):]\n\n        triggered = False\n        for idx, row in after_zone.iterrows():\n            close = row&#91;'Close']\n            if close > zone_high * (1 + confirm_buffer) and not triggered:\n                signals.append({\n                    \"date\": str(idx.date()),\n                    \"signal\": \"BUY\",\n                    \"price\": round(close, 2),\n                    \"zone_high\": round(zone_high, 2),\n                    \"zone_low\": round(zone_low, 2),\n                })\n                triggered = True\n            elif close &lt; zone_low * (1 - confirm_buffer) and not triggered:\n                signals.append({\n                    \"date\": str(idx.date()),\n                    \"signal\": \"SELL\",\n                    \"price\": round(close, 2),\n                    \"zone_high\": round(zone_high, 2),\n                    \"zone_low\": round(zone_low, 2),\n                })\n                triggered = True\n\n    return pd.DataFrame(signals)\n\n\ndef find_optimal_parameters(data):\n    \"\"\"\u7f51\u683c\u641c\u7d22\u7a97\u53e3\u4e0e\u9608\u503c\uff0c\u76ee\u6807 2~7 \u4e2a\u533a\uff1b\u627e\u4e0d\u5230\u5c31\u9000\u56de\u300c\u81f3\u5c11\u6709\u4e00\u4e2a\u533a\u300d\u7684\u515c\u5e95\"\"\"\n    window_options = &#91;10, 15, 20, 25]\n    threshold_options = &#91;0.025, 0.03, 0.04, 0.05, 0.06]\n    target = (2, 7)\n\n    for window in window_options:\n        for threshold in threshold_options:\n            zones = identify_sideways_movement(data, window, threshold)\n            if target&#91;0] &lt;= len(zones) &lt;= target&#91;1]:\n                print(f\"\u53c2\u6570\u547d\u4e2d -> Window={window}, Threshold={threshold:.1%}\")\n                return window, threshold, zones, \"hit\"\n\n    for window in window_options:\n        for threshold in threshold_options:\n            zones = identify_sideways_movement(data, window, threshold)\n            if zones:\n                print(f\"\u76ee\u6807\u672a\u547d\u4e2d\uff0c\u515c\u5e95 -> Window={window}, Threshold={threshold:.1%}\")\n                return window, threshold, zones, \"fallback\"\n\n    return None, None, &#91;], \"none\"\n\n\nfor c in CASES:\n    print(\"=\" * 50)\n    print(f\"{c&#91;'label']}  {c&#91;'start']} ~ {END}\")\n\n    df = get_clean_financial_data(c&#91;\"kind\"], c&#91;\"symbol\"], c&#91;\"start\"], END)\n    w, t, zones, mode = find_optimal_parameters(df)\n    sigs = detect_breakout_signals(df, zones)\n\n    print(f\"\u76d8\u6574\u533a {len(zones)} \u4e2a\uff0c\u4fe1\u53f7 {len(sigs)} \u4e2a\")\n    for _, s in sigs.iterrows():\n        unit = \"\u70b9\" if c&#91;\"kind\"] == \"index\" else \"\u5143\"\n        print(f\"  {s&#91;'date']} | {s&#91;'signal']} @ {s&#91;'price']}{unit} \"\n              f\"(\u533a {s&#91;'zone_low']} ~ {s&#91;'zone_high']})\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8dd1\u5b8c\u4e4b\u540e\uff0c\u628a\u63a7\u5236\u53f0\u7684\u8f93\u51fa\u548c\u56fe\u5bf9\u7167\u7740\u770b\u3002\u60f3\u626b\u81ea\u9009\u80a1\uff0c\u628a CASES \u91cc\u7684\u4e24\u884c\u6362\u6389\u5c31\u884c\u3002\u6570\u636e\u8fd9\u5757\u591a\u8bf4\u4e00\u53e5\uff0c\u6307\u6570\u63a5\u53e3\u8d70\u65b0\u6d6a\uff0c\u4e2a\u80a1\u63a5\u53e3\u540c\u6837\u8d70\u65b0\u6d6a\u3001\u8bb0\u5f97\u5e26\u524d\u590d\u6743\u3002\u8981\u662f\u65b0\u6d6a\u63a5\u53e3\u54ea\u5929\u9650\u6d41\uff0c\u6362\u6210\u5238\u5546\u6216\u8005\u901a\u8fbe\u4fe1\u7684\u672c\u5730\u6570\u636e\u4e5f\u4e00\u6837\uff0c\u53ea\u8981\u5582\u8fdb\u6765\u7684\u56db\u5217\u540d\u5b57\u5bf9\u4e0a\uff0c\u540e\u9762\u4e00\u884c\u4ee3\u7801\u90fd\u4e0d\u7528\u52a8\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>#\u76d8\u6574\u7a81\u7834<\/a>&nbsp;<a>#\u533a\u95f4\u7a81\u7834<\/a>&nbsp;<a>#\u4e2d\u8bc1500<\/a>&nbsp;<a>#\u5b81\u5fb7\u65f6\u4ee3<\/a>&nbsp;<a>#\u91cf\u5316\u5de5\u5177<\/a>&nbsp;<a>#Python<\/a>&nbsp;<a>#akshare<\/a>&nbsp;<a>#\u6ce2\u52a8\u7387<\/a>&nbsp;<a>#\u5047\u7a81\u7834<\/a>&nbsp;<a>#A\u80a1\u590d\u76d8<\/a>&nbsp;<a>#\u91cf\u5316\u7b56\u7565<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6587\u4e3a\u6280\u672f\u65b9\u6848\u62c6\u89e3\u4e0e\u5386\u53f2\u6570\u636e\u5b9e\u6d4b\uff0c\u4e0d\u6784\u6210\u4efb\u4f55\u64cd\u4f5c\u5efa\u8bae\u3002\u6587\u4e2d\u6240\u6709\u4fe1\u53f7\u5747\u4e3a\u5386\u53f2\u6570\u636e\u56de\u653e\uff0c\u4e0d\u4ee3\u8868\u672a\u6765\u8868\u73b0\uff0c\u4e5f\u4e0d\u9488\u5bf9\u4efb\u4f55\u5177\u4f53\u6807\u7684\u505a\u51fa\u4e70\u5356\u5efa\u8bae\u3002\u91cf\u5316\u5de5\u5177\u5f00\u53d1\u5e94\u4ee5\u5b66\u4e60\u548c\u6280\u672f\u4ea4\u6d41\u4e3a\u76ee\u7684\u3002\u5e02\u573a\u6709\u98ce\u9669\uff0c\u8bf7\u5408\u6cd5\u5408\u89c4\u6295\u8d44\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\/23\/%e7%9b%98%e6%95%b4%e6%89%be%e5%a6%82%e4%bd%95%e7%aa%81%e7%a0%b4%ef%bc%9f%e6%88%91%e5%ae%9e%e6%b5%8b%e4%ba%86%e4%b8%ad%e8%af%81500%e5%92%8c%e5%ae%81%e5%be%b7%e6%97%b6%e4%bb%a3%ef%bc%88%e9%99%84\/\">Continue reading<span class=\"screen-reader-text\">\u76d8\u6574\u627e\u5982\u4f55\u7a81\u7834\uff1f\u6211\u5b9e\u6d4b\u4e86\u4e2d\u8bc1500\u548c\u5b81\u5fb7\u65f6\u4ee3\uff08\u9644\u6e90\u7801\uff09<\/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-4942","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\/4942","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=4942"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/4942\/revisions"}],"predecessor-version":[{"id":4950,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/4942\/revisions\/4950"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=4942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=4942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=4942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}