{"id":2342,"date":"2025-06-05T07:58:00","date_gmt":"2025-06-04T23:58:00","guid":{"rendered":"https:\/\/blog.laoyulaoyu.top\/?p=2342"},"modified":"2025-06-02T10:59:06","modified_gmt":"2025-06-02T02:59:06","slug":"%e5%ad%a6%e5%ba%84%e5%ae%b6%e7%94%a8%e8%b5%84%e9%87%91%e8%b6%b3%e8%bf%b9%e6%8a%93%e5%8f%8d%e8%bd%ac%ef%bc%9a%e8%ae%a2%e5%8d%95%e6%b5%81%e8%a7%a3%e7%a0%8121%e5%a4%a966%e8%83%9c","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/06\/05\/%e5%ad%a6%e5%ba%84%e5%ae%b6%e7%94%a8%e8%b5%84%e9%87%91%e8%b6%b3%e8%bf%b9%e6%8a%93%e5%8f%8d%e8%bd%ac%ef%bc%9a%e8%ae%a2%e5%8d%95%e6%b5%81%e8%a7%a3%e7%a0%8121%e5%a4%a966%e8%83%9c\/","title":{"rendered":"\u5b66\u5e84\u5bb6\u7528\u201c\u8d44\u91d1\u8db3\u8ff9\u201d\u6293\u53cd\u8f6c\uff1a\u8ba2\u5355\u6d41\u89e3\u780121\u592966%\u80dc\u7387\u7684\u91cf\u5316\u7b56\u7565"},"content":{"rendered":"\n<p>\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><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 decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/06\/0e6e292f23002dadc1d7564471f8e9513f47239f.webp\" alt=\"\" class=\"wp-image-5406\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<pre class=\"wp-block-verse\"><strong>\u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a<\/strong>\u4eca\u5929\u7ed9\u5927\u5bb6\u5206\u4eab\u4e00\u4e2a\u4eb2\u6d4b\u6709\u6548\u7684\u8ba2\u5355\u6d41\u7b56\u7565\u5de5\u5177\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><strong>\u672c\u5de5\u5177\u4e0d\u9700\u8981\u590d\u6742\u6307\u6807\uff0c\u57fa\u4e8e\u4ef7\u683c\u548c\u6210\u4ea4\u91cf\u5c31\u80fd\u8bc6\u522b\u5173\u952e\u8f6c\u6298\u70b9\uff0c\u572821\u5929\u5185\u5b9e\u73b0\u4e8621.49%\u7684\u6536\u76ca\u7387\u548c66.67%\u7684\u80dc\u7387\u3002<\/strong><\/mark>\u63a5\u4e0b\u6765\u624b\u628a\u624b\u6559\u4f60\u4ece\u539f\u7406\u5230\u4ee3\u7801\u5b9e\u73b0\uff0c\u5305\u542b\u591a\u5468\u671f\u53c2\u6570\u8bbe\u7f6e\u548c\u9632\u5751\u6307\u5357\u3002\u8ba9\u6211\u4eec\u4e00\u8d77\u7528\u7b97\u6cd5\u5b66\u4e60\u5e84\u5bb6\u5982\u4f55\u7528\u8d44\u91d1\u8db3\u8ff9\u6765\u6355\u6349\u5e02\u573a\u5931\u8861\u77ac\u95f4\uff01<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u5e84\u5bb6\u7684\u79d8\u5bc6\uff1a\u8ba2\u5355\u6d41\u5230\u5e95\u662f\u4ec0\u4e48\uff1f<\/strong><\/h2>\n\n\n\n<p>\u6211\u89c1\u8fc7\u592a\u591a\u6563\u6237\u76ef\u7740MACD\u91d1\u53c9\u6b7b\u53c9\u64cd\u4f5c\uff0c\u7ed3\u679c\u603b\u5728\u9ad8\u70b9\u63a5\u76d8\u3001\u4f4e\u70b9\u5272\u8089\u3002<\/p>\n\n\n\n<p><strong>\u6839\u672c\u95ee\u9898\u5728\u4e8e\uff1a\u4f20\u7edf\u6307\u6807\u662f\u201c\u7ed3\u679c\u201d\uff0c\u800c\u8ba2\u5355\u6d41\u662f\u201c\u539f\u56e0\u201d<\/strong>\u3002\u8ba2\u5355\u6d41\uff08Order Flow\uff09\u662f\u80a1\u4ef7\u53d8\u52a8\u7684\u201cDNA\u201d\u3002\u6bcf\u6b21\u80a1\u4ef7\u6da8\u8dcc\uff0c\u90fd\u662f\u56e0\u4e3a\u4e70\u65b9\u548c\u5356\u65b9\u7684\u529b\u91cf\u5931\u8861\u3002\u4e70\u65b9\u538b\u5012\u5356\u65b9\uff0c\u80a1\u4ef7\u4e0a\u6da8\uff1b\u5356\u65b9\u5360\u4f18\uff0c\u80a1\u4ef7\u4e0b\u8dcc\u3002\u8ba2\u5355\u6d41\u5c31\u50cf\u8bb0\u5f55\u8fd9\u573a\u201c\u4e70\u5356\u5927\u6218\u201d\u7684\u6bd4\u5206\u3002<\/p>\n\n\n\n<p>\u6253\u4e2a\u6bd4\u65b9\uff0c\u80a1\u5e02\u50cf\u662f\u4e2a\u6dd8\u5b9d\uff0c\u4e70\u5bb6\u548c\u5356\u5bb6\u5c31\u50cf\u5e97\u5bb6\u548c\u7f51\u8d2d\u987e\u5ba2\u3002<strong>\u8ba2\u5355\u6d41<\/strong>\u5c31\u662f\u8bb0\u5f55\u5927\u5bb6\u8c01\u62a2\u7740\u4e70\u3001\u8c01\u6025\u7740\u5356\u7684\u201c\u8bb0\u5206\u724c\u201d\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4ef7\u683c\u6da8 <\/strong>= \u4e70\u5bb6\u62a2\u8d27\uff08\u50cf\u53cc\u5341\u4e00\u62a2\u8305\u53f0\uff09<\/li>\n\n\n\n<li><strong>\u4ef7\u683c\u8dcc <\/strong>= \u5356\u5bb6\u7529\u5356\uff08\u50cf\u5927\u6e05\u4ed3\u7529\u5356\u4e34\u671f\u54c1\uff09<\/li>\n\n\n\n<li><strong>\u8ba2\u5355\u6d41\u4e0d\u5e73\u8861\u503c <\/strong>= \u4e70\u5bb6\u603b\u62a2\u8d27\u6b21\u6570 &#8211; \u5356\u5bb6\u603b\u7529\u5356\u6b21\u6570<\/li>\n<\/ul>\n\n\n\n<p><strong>\u4e3e\u4e2a\u6817\u5b50\ud83c\udf30<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u65e5\u671f<\/th><th>\u6536\u76d8\u4ef7<\/th><th>\u6210\u4ea4\u91cf<\/th><th>\u4e70\u5bb6\u4e3b\u5bfc\uff1f<\/th><th>\u7d2f\u8ba1\u4e70\u5bb6\u91cf<\/th><th>\u7d2f\u8ba1\u5356\u5bb6\u91cf<\/th><th>\u8ba2\u5355\u6d41\u503c<\/th><\/tr><\/thead><tbody><tr><td>1\u65e5<\/td><td>100<\/td><td>1000<\/td><td>\u662f<\/td><td>1000<\/td><td>0<\/td><td>+1000<\/td><\/tr><tr><td>2\u65e5<\/td><td>99<\/td><td>800<\/td><td>\u5426<\/td><td>1000<\/td><td>800<\/td><td>+200<\/td><\/tr><tr><td>3\u65e5<\/td><td>101<\/td><td>1200<\/td><td>\u662f<\/td><td>2200<\/td><td>800<\/td><td>+1400<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5f53\u80a1\u4ef7\u8dcc\u5230\u652f\u6491\u4f4d\u65f6\uff0c\u666e\u901a\u6563\u6237\u770b\u5230\u7684\u662f\u201c\u7834\u4f4d\u5371\u9669\u201d\uff0c\u800c\u6211\u901a\u8fc7\u8ba2\u5355\u6d41\u770b\u5230\u7684\u662f<strong>\u5356\u65b9\u80fd\u91cf\u67af\u7aed\u7684\u673a\u9047<\/strong>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/06\/4ab823bad4ad0baf54cf8d2c0f883f5d5ffbab2f-1024x360.png\" alt=\"\" class=\"wp-image-5408\"\/><\/figure>\n\n\n\n<p>\u5c31\u50cf4\u67088\u65e5AAPL\u89e6\u53ca173\u7f8e\u5143\u65f6\uff0c\u8ba2\u5355\u6d41\u663e\u793a\u7a7a\u5934\u529b\u91cf\u8017\u5c3d\uff0c\u968f\u540e24\u5929\u4e0a\u6da823.5%\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5728\u8fd9\u4e2a\u7b56\u7565\u5de5\u5177\u4e2d\u8fd8\u7528\u5230\u4e86<strong>\u652f\u6491\u4f4d\u4e0e\u963b\u529b\u4f4d<\/strong>\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u652f\u6491\u4f4d\u662f\u6307\u80a1\u4ef7\u4e0b\u8dcc\u5230\u67d0\u4e00\u6c34\u5e73\u65f6\uff0c\u4e70\u76d8\u589e\u52a0\uff0c\u963b\u6b62\u80a1\u4ef7\u7ee7\u7eed\u4e0b\u8dcc\u7684\u4ef7\u4f4d\uff1b<\/li>\n\n\n\n<li>\u963b\u529b\u4f4d\u5219\u662f\u80a1\u4ef7\u4e0a\u6da8\u5230\u67d0\u4e00\u6c34\u5e73\u65f6\uff0c\u5356\u76d8\u589e\u52a0\uff0c\u963b\u6b62\u80a1\u4ef7\u7ee7\u7eed\u4e0a\u6da8\u7684\u4ef7\u4f4d\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8bc6\u522b\u8fd9\u4e9b\u5173\u952e\u4ef7\u4f4d\uff0c\u6709\u52a9\u4e8e\u5224\u65ad\u80a1\u4ef7\u7684\u6f5c\u5728\u53cd\u8f6c\u70b9\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u5b9e\u6218\u6848\u4f8b\u5206\u6790<\/strong><\/h2>\n\n\n\n<p>\u6211\u4eec\u7528$10,000\u521d\u59cb\u8d44\u91d1\uff0c0.2%\u7684\u5355\u7b14\u624b\u7eed\u8d39\uff0c\u7528\u6b21\u65e5\u5f00\u76d8\u4ef7\uff08\u8df3\u7a7a\u4e5f\u6267\u884c\uff09\u8fdb\u884c\u5bf9\u82f9\u679c\u80a1\u7968\u7684\u4e70\u5356\u64cd\u4f5c\uff0c\u6700\u7ec8\u8d44\u91d1\u4e3a$12,148.93\u3002\u5f97\u5230\u5982\u4e0b\u7ed3\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u6307\u6807<\/strong><\/th><th><strong>\u7ed3\u679c<\/strong><\/th><th><strong>\u8d85\u8d8a\u4f20\u7edf\u7b56\u7565<\/strong><\/th><\/tr><\/thead><tbody><tr><td>\u603b\u6536\u76ca\u7387<\/td><td>+21.49%<\/td><td>\u8d85\u8fc7\u6caa\u6df1300\u540c\u671f9.2%<\/td><\/tr><tr><td>\u80dc\u7387<\/td><td>66.67%<\/td><td>\u6bd4MACD\u7b56\u7565\u9ad824\u4e2a\u767e\u5206\u70b9<\/td><\/tr><tr><td>\u6700\u5927\u56de\u64a4<\/td><td>-5.43%<\/td><td>\u4f4e\u4e8e\u884c\u4e1a\u5e73\u57478%<\/td><\/tr><tr><td>\u4ea4\u6613\u6b21\u6570<\/td><td>3\u6b21<\/td><td>\u907f\u514d\u8fc7\u5ea6\u4ea4\u6613<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">2025\u5e744-5\u6708\u56de\u6d4b\u7ee9\u6548<\/figcaption><\/figure>\n\n\n\n<p>\u4e0b\u9762\u7684\u4e09\u5f20\u56fe\u5206\u522b\u662f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4ef7\u683c\u56fe<\/strong>\uff1a\u663e\u793aAAPL\u6536\u76d8\u4ef7\u3001\u4e70\u5356\u4fe1\u53f7\uff08\u7eff\u8272\u4e09\u89d2\u4e3a\u4e70\u5165\uff0c\u7ea2\u8272\u4e09\u89d2\u4e3a\u5356\u51fa\uff09\u3001\u652f\u6491\uff08\u7eff\u8272\u865a\u7ebf\uff09\u548c\u963b\u529b\u4f4d\uff08\u7ea2\u8272\u865a\u7ebf\uff09\u3002<\/li>\n\n\n\n<li><strong>\u8ba2\u5355\u6d41\u56fe<\/strong>\uff1a\u5c55\u793a\u6bcf\u65e5\u5931\u8861\uff08\u7eff\u8272\/\u7ea2\u8272\u67f1\u72b6\u56fe\uff09\u548c\u7d2f\u79ef\u5931\u8861\uff08\u9ed1\u8272\u6298\u7ebf\uff09\u3002<\/li>\n\n\n\n<li><strong>\u7ec4\u5408\u4ef7\u503c\u56fe<\/strong>\uff1a\u8ffd\u8e2a\u6295\u8d44\u7ec4\u5408\u4ece$10,000\u5230$12,148.93\u7684\u53d8\u5316\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/06\/4ab823bad4ad0baf54cf8d2c0f883f5d5ffbab2f-1024x877.webp\" alt=\"\" class=\"wp-image-5409\"\/><\/figure>\n\n\n\n<p>\u4f8b\u5982\uff1a2025\u5e744\u67083\u65e5\uff0c\u4ef7\u683c\u63a5\u8fd1$170\u652f\u6491\u4f4d\uff0c\u8ba2\u5355\u6d41\u5931\u8861\u4e3a\u8d1f\uff0c\u89e6\u53d1\u4e70\u5165\u4fe1\u53f7\uff1b4\u670825\u65e5\uff0c\u4ef7\u683c\u63a5\u8fd1$215\u963b\u529b\u4f4d\uff0c\u5931\u8861\u4e3a\u6b63\uff0c\u89e6\u53d1\u5356\u51fa\u4fe1\u53f7\u3002<\/p>\n\n\n\n<p><strong>\u8ba2\u5355\u6d41\u5b8c\u80dc\u4f20\u7edf\u6307\u6807<\/strong>\uff1aMACD\u57284\u6708\u9707\u8361\u5e02\u4e2d\u8fde\u7eed\u5047\u4fe1\u53f7\uff0c\u800c\u8ba2\u5355\u6d41\u53ea\u5728\u5173\u952e\u4f4d\u51fa\u624b\u3002<\/p>\n\n\n\n<p><strong>\u7b56\u7565\u7684\u7075\u6d3b\u6027\uff1a<\/strong>\u8fd9\u5957\u7b56\u7565\u4e0d\u4ec5\u9650\u4e8eAAPL\uff0c\u8fd8\u80fd\u7528\u4e8e\u5176\u4ed6\u80a1\u7968\uff08\u5982TSLA)\uff0c\u4e5f\u9002\u7528\u4e8e\u4e0d\u540c\u65f6\u95f4\u6846\u67b6\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5206\u949f\u56fe<\/strong>\uff1a\u9002\u5408\u65e5\u5185\u4ea4\u6613\uff0c\u7a97\u53e350\u671f\uff0c\u5bb9\u5dee0.1%\u3002<\/li>\n\n\n\n<li><strong>\u5468\u7ebf\u56fe<\/strong>\uff1a\u9002\u5408\u6ce2\u6bb5\u4ea4\u6613\uff0c\u7a97\u53e310\u5468\uff0c\u5bb9\u5dee0.5%\u3002<\/li>\n\n\n\n<li><strong>\u6708\u7ebf\u56fe<\/strong>\uff1a\u9002\u5408\u957f\u671f\u6295\u8d44\uff0c\u7a97\u53e36\u4e2a\u6708\uff0c\u5bb9\u5dee1%\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u77ed\u65f6\u95f4\u6846\u67b6\u4fe1\u53f7\u591a\u4f46\u566a\u97f3\u5927\uff0c\u9700\u5feb\u901f\u6267\u884c\uff1b\u957f\u65f6\u95f4\u6846\u67b6\u4fe1\u53f7\u5c11\u4f46\u8d8b\u52bf\u6e05\u6670\uff0c\u9700\u8010\u5fc3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u624b\u628a\u624b\u4ee3\u7801\u6559\u5b66<\/strong><\/h2>\n\n\n\n<p>\u4e0d\u9700\u8981\u590d\u6742\u7684\u7f16\u7a0b\uff0c\u6211\u4eec\u7528Python\u514d\u8d39\u5e93\u5c31\u80fd\u6355\u6349\u4e3b\u529b\u75d5\u8ff9\u3002<strong>\u73af\u5883\u914d\u7f6e\u4ec5\u97003\u884c\u547d\u4ee4<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install yfinance pandas numpy matplotlib  # \u5b89\u88c5\u57fa\u7840\u5e93<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9aa41\uff1a\u6570\u636e\u6293\u53d6\u4e0e\u6e05\u6d17\uff08\u5173\u952e\u9632\u5751\uff09<\/strong><\/h3>\n\n\n\n<p>\u5343\u4e07\u907f\u5f00\u672a\u6765\u51fd\u6570\u9677\u9631\uff01\u7528<code>tz_localize(None)<\/code>\u6e05\u9664\u65f6\u533a\u4fe1\u606f\uff0c\u786e\u4fdd\u4e0d\u5077\u770b\u672a\u6765\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import yfinance as yf\n\ndef get_clean_data(ticker, start, end):\n    data = yf.download(ticker, start=start, end=end, interval=\"1d\")\n    data.index = data.index.tz_localize(None)  # \u6e05\u9664\u65f6\u533a\u907f\u514d\u672a\u6765\u6570\u636e\n    data = data&#91;&#91;'Open','High','Low','Close','Volume']]  # \u53ea\u4fdd\u7559\u5fc5\u8981\u5b57\u6bb5\n    return data.ffill()  # \u5411\u524d\u586b\u5145\u7f3a\u5931\u503c\n\ndata = get_clean_data(\"AAPL\", \"2025-04-01\", \"2025-05-23\")<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9aa42\uff1a\u8ba2\u5355\u6d41\u8ba1\u7b97\uff08\u6838\u5fc3\u903b\u8f91\uff09<\/strong><\/h3>\n\n\n\n<p>\u7528\u6210\u4ea4\u91cf\u7ed9\u591a\u7a7a\u65b9\u201c\u8ba1\u5206\u201d\uff0c\u770b\u61c2\u4e3b\u529b\u5e95\u724c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8ba1\u7b97\u4ef7\u683c\u65b9\u5411\uff08\u6da8\u8dcc\uff09\ndata&#91;'Price_Change'] = data&#91;'Close'].diff()  \n\n# \u5206\u914d\u6210\u4ea4\u91cf\uff1a\u4e0a\u6da8\u65e5\u91cf\u80fd\u7b97\u591a\u5934\uff0c\u4e0b\u8dcc\u65e5\u7b97\u7a7a\u5934\ndata&#91;'Buy_Volume'] = data&#91;'Volume'].where(data&#91;'Price_Change'] &gt; 0, 0)\ndata&#91;'Sell_Volume'] = data&#91;'Volume'].where(data&#91;'Price_Change'] &lt; 0, 0)\n\n# \u8ba1\u7b97\u7d2f\u79ef\u80fd\u91cf\u5dee\uff08\u7ea2\u7eff\u519b\u6bd4\u5206\u724c\uff09\ndata&#91;'Buy_Cumulative'] = data&#91;'Buy_Volume'].cumsum()\ndata&#91;'Sell_Cumulative'] = data&#91;'Sell_Volume'].cumsum()\ndata&#91;'Order_Flow'] = data&#91;'Buy_Cumulative'] - data&#91;'Sell_Cumulative']  # \u591a\u7a7a\u80fd\u91cf\u5dee<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u8981\u7d20<\/strong><\/th><th><strong>\u8ba1\u7b97\u903b\u8f91<\/strong><\/th><th><strong>\u5e02\u573a\u542b\u4e49<\/strong><\/th><th>\u4ee3\u7801\u5bf9\u5e94\u5217<\/th><\/tr><\/thead><tbody><tr><td>\u4ef7\u683c\u65b9\u5411<\/td><td>\u5f53\u65e5\u6536\u76d8\u4ef7\u53d8\u52a8<\/td><td>\u591a\u7a7a\u5f53\u65e5\u80dc\u8d1f<\/td><td><code>Price_Change<\/code><\/td><\/tr><tr><td>\u6210\u4ea4\u91cf\u5206\u914d<\/td><td>\u4e0a\u6da8\u91cf\u5f52\u4e70\u65b9\/\u4e0b\u8dcc\u91cf\u5f52\u5356\u65b9<\/td><td>\u591a\u7a7a\u5b9e\u9645\u6295\u5165\u5175\u529b<\/td><td><code>Buy_Volume\/Sell_Volume<\/code><\/td><\/tr><tr><td>\u7d2f\u79ef\u80fd\u91cf\u5dee<\/td><td>\u4e70\u5356\u91cf\u7d2f\u8ba1\u5dee\u503c<\/td><td>\u591a\u7a7a\u957f\u671f\u6218\u529b\u5bf9\u6bd4<\/td><td><code>Order_Flow<\/code><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><em>\u8ba2\u5355\u6d41\u4e09\u5927\u6838\u5fc3\u8981\u7d20\u89e3\u6790<\/em>\u8868<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9aa43\uff1a\u52a8\u6001\u652f\u6491\u963b\u529b\uff08\u667a\u80fd\u753b\u7ebf\uff09<\/strong><\/h3>\n\n\n\n<p>\u8ba9\u7b97\u6cd5\u81ea\u52a8\u6807\u8bb0\u6218\u573a\u5173\u952e\u4f4d\uff0c\u907f\u514d\u4e3b\u89c2\u753b\u7ebf\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def find_key_levels(data, window=20, min_gap=1.0):\n    # \u6eda\u52a8\u7a97\u53e3\u627e\u8fd1\u671f\u9ad8\u4f4e\u70b9\uff08\u6218\u573a\u8fb9\u754c\uff09\n    data&#91;'Support'] = data&#91;'Close'].rolling(window).min()  \n    data&#91;'Resistance'] = data&#91;'Close'].rolling(window).max()\n    \n    # \u5408\u5e76\u76f8\u8fd1\u4ef7\u4f4d\uff08\u907f\u514d\u91cd\u590d\u9632\u7ebf\uff09\n    levels = sorted(set(data&#91;'Support']) | set(data&#91;'Resistance']))\n    filtered = &#91;]\n    for price in levels:\n        if not filtered or abs(price - filtered&#91;-1]) &gt;= min_gap:\n            filtered.append(price)\n    return filtered\n\nkey_levels = find_key_levels(data)  # \u83b7\u5f97\u5173\u952e\u4ef7\u4f4d\u5217\u8868<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6b65\u9aa44\uff1a\u4ea4\u6613\u4fe1\u53f7\u751f\u6210\uff08\u9ec4\u91d1\u4e70\u70b9\uff09<\/strong><\/h3>\n\n\n\n<p>\u5f53\u4ef7\u683c\u62b5\u8fbe\u6218\u573a\u8fb9\u754c\u4e14\u80fd\u91cf\u53cd\u8f6c\u65f6\uff0c\u5c31\u662f\u6263\u6273\u673a\u65f6\u523b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>data&#91;'Buy_Signal'] = False\ndata&#91;'Sell_Signal'] = False\n\nfor i in range(1, len(data)):\n    close = data&#91;'Close'].iloc&#91;i]\n    flow = data&#91;'Order_Flow'].iloc&#91;i]\n    \n    # \u4e70\u70b9\uff1a\u4ef7\u683c\u5728\u652f\u6491\u533a + \u7a7a\u5934\u529b\u7aed\uff08\u7eff\u8f6c\u7ea2\uff09\n    for support in key_levels:\n        if support * 0.998 &lt;= close &lt;= support * 1.002 and flow &lt; 0:\n            data.loc&#91;data.index&#91;i], 'Buy_Signal'] = True\n    \n    # \u5356\u70b9\uff1a\u4ef7\u683c\u5728\u538b\u529b\u533a + \u591a\u5934\u529b\u7aed\uff08\u7ea2\u8f6c\u7eff\uff09\n    for resistance in key_levels:\n        if resistance * 0.998 &lt;= close &lt;= resistance * 1.002 and flow &gt; 0:\n            data.loc&#91;data.index&#91;i], 'Sell_Signal'] = True<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u8fdb\u9636\u6280\u5de7\u4e0e\u6ce8\u610f\u4e8b\u9879<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>4.1 \u7b56\u7565\u7684\u7075\u6d3b\u6027<\/strong><\/h3>\n\n\n\n<p>\u591a\u5468\u671f\u5b9e\u6218\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4ece\u5206\u949f\u7ebf\u5230\u5468\u7ebf\u7684\u53c2\u6570\u8fdb\u884c\u5168\u5468\u671f\u8c03\u6821\u3002\u8ba9\u540c\u4e00\u5957\u903b\u8f91\u901a\u5403\u6240\u6709\u5468\u671f\uff0c\u4ec5\u9700\u8c03\u6574\u4e09\u53c2\u6570\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u5468\u671f\u7c7b\u578b<\/strong><\/th><th><strong>\u6570\u636e\u83b7\u53d6\u4ee3\u7801<\/strong><\/th><th><strong>\u7a97\u53e3\u53c2\u6570<\/strong><\/th><th><strong>\u4ef7\u683c\u5bb9\u5fcd\u5ea6<\/strong><\/th><th><strong>\u9002\u7528\u573a\u666f<\/strong><\/th><\/tr><\/thead><tbody><tr><td>\u5206\u949f\u7ebf(5\u5206\u949f)<\/td><td><code>yf.download(interval=\"5m\")<\/code><\/td><td>50\u6839K\u7ebf<\/td><td>0.1%<\/td><td>\u65e5\u5185\u9ad8\u9891\u6293\u53cd\u8f6c<\/td><\/tr><tr><td>\u65e5\u7ebf<\/td><td><code>yf.download(interval=\"1d\")<\/code><\/td><td>20\u65e5<\/td><td>0.2%<\/td><td>\u6ce2\u6bb5\u4ea4\u6613\uff08\u63a8\u8350\uff09<\/td><\/tr><tr><td>\u5468\u7ebf<\/td><td><code>yf.download(interval=\"1wk\")<\/code><\/td><td>10\u5468<\/td><td>0.5%<\/td><td>\u957f\u7ebf\u5e03\u5c40<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><em>\u8868\uff1a\u5404\u5468\u671f\u9ec4\u91d1\u53c2\u6570\u914d\u7f6e<\/em><\/figcaption><\/figure>\n\n\n\n<p><strong>\u6848\u4f8b\uff1a\u4e13\u4e1a\u4eba\u58eb\u8fd9\u6837\u7528<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u83b7\u53d65\u5206\u949f\u7ebf\nminute_data = yf.download(\"AAPL\", period=\"1mo\", interval=\"5m\")\n\n# \u8c03\u6574\u53c2\u6570\uff1a\u77ed\u7a97\u53e3+\u7a84\u5bb9\u5fcd\nkey_levels = find_key_levels(minute_data, window=50, min_gap=0.001)  <\/code><\/pre>\n\n\n\n<p>\u65f6\u95f4\u6846\u67b6\u4fe1\u53f7\u591a\u4f46\u566a\u97f3\u5927\uff0c\u9700\u5feb\u901f\u6267\u884c\uff1b\u957f\u65f6\u95f4\u6846\u67b6\u4fe1\u53f7\u5c11\u4f46\u8d8b\u52bf\u6e05\u6670\uff0c\u9700\u8010\u5fc3\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.2 \u907f\u5f00\u8ba2\u5355\u6d41\u7684\u4e09\u5927\u6697\u7901<\/strong><\/h3>\n\n\n\n<p><strong>1. \u4e3b\u529b\u5047\u52a8\u4f5c\u8bc6\u522b<\/strong><\/p>\n\n\n\n<p>\u5f53\u5de8\u91cf\u7a81\u7834\u652f\u6491\u4f4d\u4f46\u8ba2\u5355\u6d41\u672a\u7ffb\u7eff\uff0c\u53ef\u80fd\u662f\u8bf1\u7a7a\u9677\u9631\uff08\u89c2\u5bdf\u672a\u5e73\u4ed3\u5408\u7ea6\u53d8\u5316\uff09\u3002<\/p>\n\n\n\n<p><strong>2. \u6781\u7aef\u884c\u60c5\u8fc7\u6ee4<\/strong><\/p>\n\n\n\n<p>\u589e\u52a0\u6ce2\u52a8\u7387\u8fc7\u6ee4\u5668\uff0c\u907f\u5f00\u8df3\u7a7a\u7f3a\u53e3\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>data&#91;'Volatility'] = data&#91;'High']\/data&#91;'Low'] - 1  # \u5f53\u65e5\u6ce2\u52a8\u7387\nvalid_buy = data&#91;'Buy_Signal'] &amp; (data&#91;'Volatility'] &lt; 0.03)  # \u8fc7\u6ee4\u9ad8\u6ce2\u52a8\u65e5<\/code><\/pre>\n\n\n\n<p><strong>3. \u677f\u5757\u8f6e\u52a8\u52a0\u6301<\/strong><\/p>\n\n\n\n<p>\u53ef\u4ee5\u7528XtQuant\u83b7\u53d6\u4e3b\u529b\u8d44\u91d1\u677f\u5757\u6d41\u5411\uff0c\u53ea\u505a\u8d44\u91d1\u6d41\u5165\u7684\u884c\u4e1a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from xtquant import xtdata\nxtdata.download_sector_data()  # \u4e0b\u8f7d\u677f\u5757\u6570\u636e\ntech_stocks = xtdata.get_stock_list_in_sector(\"\u534a\u5bfc\u4f53\")  # \u83b7\u53d6\u6210\u5206\u80a1<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.3 \u98ce\u9669\u63a7\u5236\u5efa\u8bae<\/strong><\/h3>\n\n\n\n<p>\u867d\u7136\u56de\u6d4b\u7ed3\u679c\u4eae\u773c\uff0c\u4f46\u5e02\u573a\u77ac\u606f\u4e07\u53d8\uff0c\u5386\u53f2\u8868\u73b0\u4e0d\u4ee3\u8868\u672a\u6765\u7ed3\u679c\u3002\u6b64\u5916\uff0c\u4ea4\u6613\u8d39\u7528\u548c\u4ef7\u683c\u8df3\u7a7a\u4f1a\u5f71\u54cd\u5b9e\u9645\u6536\u76ca\u3002\u5efa\u8bae\u7ed3\u5408\u4e13\u4e1a\u7814\u7a76\u5e76\u8c28\u614e\u64cd\u4f5c\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u591a\u54c1\u79cd\u6d4b\u8bd5 <\/strong>\uff1a\u5728\u6caa\u6df1300\u3001\u521b\u4e1a\u677f\u7b49\u6307\u6570\u9a8c\u8bc1\u7b56\u7565\u3002<\/li>\n\n\n\n<li><strong>\u6b62\u635f\u673a\u5236 <\/strong>\uff1a\u5355\u7b14\u4e8f\u635f\u8d853%\u5f3a\u5236\u5e73\u4ed3\u3002<\/li>\n\n\n\n<li><strong>\u4ed3\u4f4d\u7ba1\u7406 <\/strong>\uff1a\u6bcf\u6b21\u6295\u5165\u4e0d\u8d85\u8fc7\u603b\u8d44\u91d120%\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>\u8ba2\u5355\u6d41\u4ea4\u6613\u901a\u8fc7\u5206\u6790\u4e70\u5356\u8ba2\u5355\u548c\u4ef7\u683c\u6c34\u5e73\uff0c\u5e2e\u4f60\u63d0\u524d\u6355\u6349\u5e02\u573a\u673a\u4f1a\u3002\u901a\u8fc7Python\u4ee3\u7801\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u5e76\u9a8c\u8bc1\u8fd9\u5957\u7b56\u7565\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u8981\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8ba2\u5355\u6d41\u8ba1\u7b97<\/strong>\uff1a\u901a\u8fc7\u4ef7\u683c\u53d8\u5316\u5206\u914d\u6210\u4ea4\u91cf\uff0c\u8ba1\u7b97\u5931\u8861\u503c\u3002<\/li>\n\n\n\n<li><strong>\u652f\u6491\u963b\u529b<\/strong>\uff1a\u752820\u5929\u6eda\u52a8\u7a97\u53e3\u786e\u5b9a\u5173\u952e\u4ef7\u683c\u6c34\u5e73\u3002<\/li>\n\n\n\n<li><strong>\u4e70\u5356\u4fe1\u53f7<\/strong>\uff1a\u7ed3\u5408\u4ef7\u683c\u548c\u8ba2\u5355\u6d41\u5931\u8861\u751f\u6210\u9ad8\u6982\u7387\u4fe1\u53f7\u3002<\/li>\n\n\n\n<li><strong>\u56de\u6d4b\u7ed3\u679c<\/strong>\uff1aAAPL\u4e0a21.49%\u56de\u62a5\u7387\uff0c\u80dc\u738766.67%\u3002<\/li>\n\n\n\n<li><strong>\u7075\u6d3b\u6027<\/strong>\uff1a\u9002\u7528\u4e8e\u4e0d\u540c\u80a1\u7968\u548c\u65f6\u95f4\u6846\u67b6\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/06\/1748830663224-955x1024.png\" alt=\"\" class=\"wp-image-5411\"\/><\/figure>\n\n\n\n<p>\u5feb\u8bd5\u8bd5\u8fd9\u5957\u7b56\u7565\u5de5\u5177\u5427\uff01\u9700\u8981\u5b8c\u6574\u6e90\u4ee3\u7801\u8bf7\u540e\u53f0\u7559\u8a00\uff01<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><em>\u8bfb\u5230\u6700\u540e\uff0c\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u4e3a\u60a8\u5e26\u6765\u4e86\u65b0\u7684\u542f\u53d1\u548c\u5b9e\u7528\u7684\u77e5\u8bc6\uff01\u5982\u679c\u89c9\u5f97\u6709\u5e2e\u52a9\uff0c\u8bf7\u4e0d\u541d\u70b9\u8d5e\u548c\u5206\u4eab\uff0c\u60a8\u7684\u652f\u6301\u662f\u6211\u6301\u7eed\u521b\u4f5c\u7684\u52a8\u529b\u3002\u795d\u60a8\u6295\u8d44\u987a\u5229\uff0c\u6536\u76ca\u957f\u8679\uff01\u5982\u679c\u5bf9\u6587\u4e2d\u5185\u5bb9\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u6b22\u8fce\u7559\u8a00\uff0c\u6211\u4f1a\u5c3d\u5feb\u56de\u590d\uff01<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\">\u672c\u6587\u5185\u5bb9\u4ec5\u9650\u6280\u672f\u63a2\u8ba8\u548c\u5b66\u4e60\uff0c\u4e0d\u6784\u6210\u4efb\u4f55\u6295\u8d44\u5efa\u8bae\u3002<\/p>\n\n\n\n<p><\/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\/2025\/06\/05\/%e5%ad%a6%e5%ba%84%e5%ae%b6%e7%94%a8%e8%b5%84%e9%87%91%e8%b6%b3%e8%bf%b9%e6%8a%93%e5%8f%8d%e8%bd%ac%ef%bc%9a%e8%ae%a2%e5%8d%95%e6%b5%81%e8%a7%a3%e7%a0%8121%e5%a4%a966%e8%83%9c\/\">Continue reading<span class=\"screen-reader-text\">\u5b66\u5e84\u5bb6\u7528\u201c\u8d44\u91d1\u8db3\u8ff9\u201d\u6293\u53cd\u8f6c\uff1a\u8ba2\u5355\u6d41\u89e3\u780121\u592966%\u80dc\u7387\u7684\u91cf\u5316\u7b56\u7565<\/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":[4,5,6],"class_list":{"0":"post-2342","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","9":"tag-6","10":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2342","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=2342"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2342\/revisions"}],"predecessor-version":[{"id":2343,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2342\/revisions\/2343"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=2342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=2342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=2342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}