{"id":3138,"date":"2025-12-09T07:40:00","date_gmt":"2025-12-08T23:40:00","guid":{"rendered":"https:\/\/www.laoyulaoyu.com\/?p=3138"},"modified":"2025-11-26T22:42:24","modified_gmt":"2025-11-26T14:42:24","slug":"%e6%88%91%e7%94%a8ai%e6%b5%81%e7%a8%8b%e5%9b%be%e6%a1%86%e6%9e%b6%ef%bc%8c%e9%80%a0%e4%ba%86%e4%b8%80%e4%b8%aa%e8%83%bd%e8%87%aa%e6%88%91%e6%80%9d%e8%80%83%e7%9a%84%e4%ba%a4%e6%98%93%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/12\/09\/%e6%88%91%e7%94%a8ai%e6%b5%81%e7%a8%8b%e5%9b%be%e6%a1%86%e6%9e%b6%ef%bc%8c%e9%80%a0%e4%ba%86%e4%b8%80%e4%b8%aa%e8%83%bd%e8%87%aa%e6%88%91%e6%80%9d%e8%80%83%e7%9a%84%e4%ba%a4%e6%98%93%e7%b3%bb%e7%bb%9f\/","title":{"rendered":"\u6211\u7528AI\u6d41\u7a0b\u56fe\u6846\u67b6\uff0c\u9020\u4e86\u4e00\u4e2a\u80fd\u81ea\u6211\u601d\u8003\u7684\u4ea4\u6613\u7cfb\u7edf"},"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 fetchpriority=\"high\" decoding=\"async\" width=\"900\" height=\"383\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/11\/1_UmbTX_5IvoisfjUuf-8uhA_\u526f\u672c.webp\" alt=\"\" class=\"wp-image-3139\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/11\/1_UmbTX_5IvoisfjUuf-8uhA_\u526f\u672c.webp 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/11\/1_UmbTX_5IvoisfjUuf-8uhA_\u526f\u672c-300x128.webp 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2025\/11\/1_UmbTX_5IvoisfjUuf-8uhA_\u526f\u672c-768x327.webp 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<pre class=\"wp-block-verse\"><strong>\u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a<\/strong>\u4eca\u5929\u6211\u6765\u5206\u4eab\u4e00\u4e2a\u6211\u7528LangGraph\u548cChatGPT\u642d\u5efa\u7684\u5b9e\u6218\u9879\u76ee\uff1a<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u4e00\u4e2a\u6709\u8bb0\u5fc6\u3001\u80fd\u81ea\u52a8\u5206\u6790\u80a1\u7968\u7684AI\u673a\u5668\u4eba\u3002\u5b83\u80fd\u81ea\u5df1\u601d\u8003\u3001\u81ea\u5df1\u884c\u52a8\u3001\u81ea\u5df1\u56de\u6d4b<\/mark>\uff0c\u5f7b\u5e95\u89e3\u653e\u4f60\u7684\u53cc\u624b\u3002\u6211\u4f1a\u7528\u5927\u767d\u8bdd\u8bb2\u900f\u6280\u672f\u539f\u7406\uff0c\u5e76\u7ed9\u51fa\u5b8c\u6574\u7684\u4ee3\u7801\u548c\u624b\u628a\u624b\u642d\u5efa\u6559\u7a0b\uff0c\u8ba9\u4f60\u4e5f\u80fd\u62e5\u6709\u81ea\u5df1\u7684\u667a\u80fd\u8d22\u5bcc\u52a9\u624b\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u544a\u522b\u201c\u62cd\u8111\u888b\u201d\ud83d\udd25\u00a0<\/strong><\/h2>\n\n\n\n<p>\u6709\u6ca1\u6709\u89c9\u5f97\u7092\u80a1\u8d8a\u6765\u8d8a\u96be\uff1f\u4e0d\u662f\u4f60\u4e0d\u591f\u52aa\u529b\uff0c\u800c\u662f\u5e02\u573a\u53d8\u5316\u592a\u5feb\uff0c\u4fe1\u606f\u91cf\u592a\u5927\u3002\u6211\u4eec\u666e\u901a\u4eba\u7684\u5927\u8111\uff0c\u6839\u672c\u5904\u7406\u4e0d\u8fc7\u6765\u3002\u66f4\u522b\u8bf4\uff0c\u4f60\u767d\u5929\u8fd8\u8981\u4e0a\u73ed\uff0c\u665a\u4e0a\u8fd8\u8981\u7761\u89c9\uff0c\u6839\u672c\u505a\u4e0d\u523024\u5c0f\u65f6\u76ef\u76d8\uff0c\u5bf9\u5427\uff1f<\/p>\n\n\n\n<p>\u6240\u4ee5\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u6709\u8bb0\u5fc6\u3001\u80fd\u601d\u8003\u3001\u4e0d\u77e5\u75b2\u5026\u7684\u201c\u8d85\u8111\u201d\u52a9\u624b\u3002\u8fd9\u4e2a\u52a9\u624b\u4e0d\u4ec5\u8981\u80fd\u6267\u884c\u6307\u4ee4\uff0c\u66f4\u5173\u952e\u7684\u662f\uff0c\u5b83\u5f97\u50cf\u4e2a\u8001\u9053\u7684\u57fa\u91d1\u7ecf\u7406\u4e00\u6837\uff0c\u81ea\u5df1\u51b3\u5b9a\u4e0b\u4e00\u6b65\u8be5\u505a\u4ec0\u4e48\u3002<\/p>\n\n\n\n<p>\u4ee5\u524d\u7684\u91cf\u5316\u7a0b\u5e8f\u662f\u201c\u6b7b\u201d\u7684\uff0c\u4f60\u8ba9\u5b83\u7b97\u4ec0\u4e48\u5b83\u5c31\u7b97\u4ec0\u4e48\u3002\u4f46\u662f\uff0c\u4eca\u5929\u8001\u4f59\u8981\u5206\u4eab\u7684\u8fd9\u4e2a\u7cfb\u7edf\u662f\u201c\u6d3b\u201d\u7684\uff0c\u5b83\u80fd\u50cf\u642d\u79ef\u6728\u4e00\u6837\uff0c\u81ea\u5df1\u5b8c\u6210\u590d\u6742\u7684\u91d1\u878d\u5206\u6790\u6d41\u7a0b\u3002\u54b1\u4eec\u4eca\u5929\u7528\u7684\u6838\u5fc3\u6b66\u5668\uff0c\u5c31\u662fAI\u9886\u57df\u7684\u6d41\u7a0b\u56fe\u6846\u67b6\u2014\u2014LangGraph\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001AI\u7684\u201c\u6d41\u7a0b\u56fe\u5927\u8111\u201d\ud83e\udde0\u00a0<\/strong><\/h2>\n\n\n\n<p>\u5927\u5bb6\u628a\u8fd9\u4e2aAI\u673a\u5668\u4eba\u60f3\u8c61\u6210\u4e00\u4e2a\u9ad8\u667a\u5546\u7684CEO\u3002\u4e00\u4e2aCEO\u600e\u4e48\u5de5\u4f5c\uff1f<\/p>\n\n\n\n<p>\u4ed6\u4e0d\u4f1a\u4e00\u53e3\u6c14\u628a\u6240\u6709\u4e8b\u60c5\u90fd\u505a\u4e86\uff0c\u800c\u662f\u5148\u201c\u601d\u8003\u201d\u2014\u2014\u5236\u5b9a\u8ba1\u5212\uff1b\u518d\u201c\u884c\u52a8\u201d\u2014\u2014\u8ba9\u4e0b\u5c5e\u53bb\u6267\u884c\uff1b\u6700\u540e\u6839\u636e\u4e0b\u5c5e\u7684\u6c47\u62a5\uff0c\u51b3\u5b9a\u662f\u7ee7\u7eed\u4e0b\u4e00\u6b65\uff0c\u8fd8\u662f\u7ed3\u675f\u5de5\u4f5c\u53bb\u559d\u8336\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2aAI\u4ea4\u6613\u7cfb\u7edf\u5c31\u662f\u57fa\u4e8e\u8fd9\u6837\u4e00\u4e2a\u201c\u601d\u8003-\u884c\u52a8-\u51b3\u7b56\u201d\u7684\u95ed\u73af\u642d\u5efa\u7684\uff0c\u6211\u4eec\u79f0\u4e4b\u4e3a\u201c\u72b6\u6001\u673a\u201d\u6216\u201c\u51b3\u7b56\u5faa\u73af\u201d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u72b6\u6001\u673a\u7684\u201c\u4e09\u5927\u4ef6\u201d\uff1a\u5185\u5b58\u3001\u601d\u8003\u3001\u884c\u52a8<\/strong><\/h3>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u6d41\u7a0b\u4e2d\uff0c\u6709\u4e09\u4e2a\u6838\u5fc3\u7ec4\u4ef6\u5728\u6253\u914d\u5408\uff0c\u8fd9\u662fAI\u80fd\u591f\u4fdd\u6301\u201c\u6709\u72b6\u6001\u201d\u548c\u201c\u6709\u8bb0\u5fc6\u201d\u7684\u5173\u952e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7ec4\u4ef6\u540d\u79f0\uff08\u901a\u4fd7\u7248\uff09<\/th><th>\u6280\u672f\u672f\u8bed\uff08\u539f\u7248\uff09<\/th><th>\u4f5c\u7528\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td><strong>AI\u7684\u8bb0\u4e8b\u672c<\/strong><\/td><td>AgentState (\u72b6\u6001)<\/td><td>\u8bb0\u5f55AI\u7684<strong>\u76ee\u6807<\/strong>\u3001<strong>\u5386\u53f2\u6267\u884c\u6b65\u9aa4<\/strong>\u548c<strong>\u6700\u65b0\u7ed3\u679c<\/strong>\u3002\u8fd9\u662fAI\u7684\u201c\u957f\u671f\u8bb0\u5fc6\u201d\uff0c\u786e\u4fdd\u5b83\u4e0d\u4f1a\u5fd8\u8bb0\u81ea\u5df1\u505a\u5230\u54ea\u4e00\u6b65\u4e86\u3002<\/td><\/tr><tr><td><strong>\u601d\u8003\u6a21\u5757<\/strong><\/td><td>Executor Node (\u6267\u884c\u5668)<\/td><td><strong>\u8d1f\u8d23\u51b3\u7b56\u3002<\/strong>\u5b83\u9605\u8bfb\u201c\u8bb0\u4e8b\u672c\u201d\u4e2d\u7684\u5386\u53f2\u8bb0\u5f55\uff0c\u7136\u540e\u8c03\u7528\u5927\u6a21\u578b\uff08\u6bd4\u5982GPT-4o\uff09\u6765\u751f\u6210\u4e0b\u4e00\u6b65\u7684\u5177\u4f53\u6307\u4ee4\u3002<\/td><\/tr><tr><td><strong>\u884c\u52a8\u6a21\u5757<\/strong><\/td><td>Tool Node (\u5de5\u5177)<\/td><td><strong>\u8d1f\u8d23\u6267\u884c\u3002<\/strong>\u5b83\u63a5\u6536\u201c\u601d\u8003\u6a21\u5757\u201d\u7684\u6307\u4ee4\uff0c\u5e76\u8c03\u7528\u5c01\u88c5\u597d\u7684\u91d1\u878d\u5de5\u5177\uff08\u5982\u83b7\u53d6\u80a1\u7968\u6570\u636e\u3001\u8ba1\u7b97\u6307\u6807\uff09\u53bb\u6267\u884c\uff0c\u628a\u6267\u884c\u7ed3\u679c\u5199\u56de\u201c\u8bb0\u4e8b\u672c\u201d\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6240\u4ee5\uff0c\u6574\u4e2a\u8fc7\u7a0b\u5c31\u662f\u4e00\u4e2a\u95ed\u73af\uff1a<strong>\u601d\u8003\uff08\u4e0b\u4e00\u6b65\u505a\u4ec0\u4e48\uff09 \u2192 \u884c\u52a8\uff08\u53bb\u505a\u4e86\uff09 \u2192 \u51b3\u7b56\uff08\u662f\u7ee7\u7eed\u601d\u8003\uff0c\u8fd8\u662f\u7ed3\u675f\uff09<\/strong>\u3002\u53ea\u8981\u76ee\u6807\u6ca1\u8fbe\u6210\uff0c\u8fd9\u4e2a\u5faa\u73af\u5c31\u4e0d\u4f1a\u505c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/Vk07qSNq7L2hOvHkicLUyU6dicicDldOzywfvOSq48zSOAHjL2SKhB0cDog13VYLnTL85VZJg0AQFd54gBHQ5w6GQ\/640?wx_fmt=jpeg&amp;from=appmsg\" alt=\"\" style=\"width:550px;height:auto\"\/><\/figure>\n\n\n\n<p><strong>\u56fe1\uff1a<\/strong>AI\u4ea4\u6613\u673a\u5668\u4eba\u7684\u201c\u601d\u8003-\u884c\u52a8\u201d\u6d41\u7a0b\u56fe\uff0c\u6e05\u6670\u7684\u5faa\u73af\u7ed3\u6784\u662f\u5b83\u81ea\u6211\u9a71\u52a8\u7684\u6838\u5fc3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u673a\u5668\u4eba\u7684\u601d\u7ef4\u548c\u5de5\u5177\u7bb1\ud83d\udee0\ufe0f\u00a0<\/strong><\/h2>\n\n\n\n<p>\u6211\u4eec\u7528\u4ee3\u7801\u5b9e\u73b0AI\u7684\u601d\u7ef4\u548c\u5de5\u5177\u7bb1\u3002<code>main.py<\/code>\u662f\u601d\u7ef4\uff0c<code>tools.py<\/code>\u662f\u5de5\u5177\u7bb1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 \u601d\u8003\u6a21\u5757\uff1a\u50cfCEO\u4e00\u6837\u4e0b\u547d\u4ee4\uff08`main.py`\uff09<\/strong><\/h3>\n\n\n\n<p>\u5728 `main.py` \u4e2d\uff0c\u6211\u4eec\u7ed9AI\u8bbe\u5b9a\u4e86\u660e\u786e\u7684\u201c\u76ee\u6807\u201d\u548c\u201c\u53ef\u7528\u547d\u4ee4\u201d\uff0c\u8ba9\u5b83\u6839\u636e\u5386\u53f2\u6b65\u9aa4\u6765\u53d1\u53f7\u65bd\u4ee4\u3002\u8fd9\u4e2a\u6307\u4ee4\u662f\u7cbe\u786e\u7684\u6587\u672c\u547d\u4ee4\uff0c\u6bd4\u5982\uff1a<code>FETCH \"TSLA\"<\/code>&nbsp;\u6216&nbsp;<code>INDICATOR \"TSLA\" \"SMA\"<\/code>\u3002<\/p>\n\n\n\n<p><strong>\u5173\u952e\u70b9\uff1a\u4f18\u96c5\u5730\u6536\u5c3e\uff01<\/strong><\/p>\n\n\n\n<p>\u5728\u201c\u884c\u52a8\u6a21\u5757\u201d\u5b8c\u6210\u540e\uff0c\u7cfb\u7edf\u4f1a\u542f\u52a8\u4e00\u4e2a\u201c\u6761\u4ef6\u5224\u65ad\u201d\u51fd\u6570\u3002\u5982\u679c\u53d1\u73b0AI\u6267\u884c\u4e86\u6700\u540e\u4e00\u4e2a\u6b65\u9aa4\u2014\u2014\u56de\u6d4b\uff08BACKTEST\uff09\uff0c\u90a3\u4e48\u7cfb\u7edf\u5c31\u4f1a\u81ea\u52a8\u751f\u6210\u4e00\u4e2a `FINISH` \u547d\u4ee4\uff0c\u5f3a\u884c\u7ec8\u6b62\u5faa\u73af\u3002\u8fd9\u6837\uff0cAI\u4e0d\u4f1a\u9677\u5165\u65e0\u9650\u5faa\u73af\uff0c\u800c\u662f\u6709\u59cb\u6709\u7ec8\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 \u884c\u52a8\u6a21\u5757\uff1a\u5f3a\u5927\u7684\u91d1\u878d\u5206\u6790\u5de5\u5177\u7bb1\uff08`tools.py`\uff09<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u662fAI\u7684\u201c\u624b\u811a\u201d\uff0c\u5b83\u8d1f\u8d23\u8fde\u63a5\u771f\u5b9e\u4e16\u754c\u7684\u91d1\u878d\u6570\u636e\u3002\u8001\u4f59\u5728\u8fd9\u4e2a\u9879\u76ee\u4e2d\u96c6\u6210\u4e86\u4ee5\u4e0b\u4e09\u4e2a\u6838\u5fc3\u529f\u80fd\uff0c\u90fd\u4f7f\u7528\u4e86Python\u793e\u533a\u6700\u5f3a\u5927\u7684\u5e93\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u83b7\u53d6 (`fetch_data`)\uff1a<\/strong>\u4f7f\u7528\u4e1a\u754c\u5e38\u7528\u7684 `yfinance` \u5e93\uff0c\u8f7b\u677e\u83b7\u53d6\u5168\u7403\u4e3b\u8981\u5e02\u573a\u7684\u5386\u53f2\u80a1\u7968\u4ef7\u683c\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u6307\u6807\u8ba1\u7b97 (`calculate_indicator`)\uff1a<\/strong>\u8ba1\u7b97\u5e38\u7528\u7684\u6280\u672f\u6307\u6807\uff0c\u6bd4\u5982\u79fb\u52a8\u5e73\u5747\u7ebf\uff08SMA\uff09\u3001\u76f8\u5bf9\u5f3a\u5f31\u6307\u6807\uff08RSI\uff09\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u7b56\u7565\u56de\u6d4b (`backtest_strategy`)\uff1a<\/strong>\u8fd9\u662f\u6700\u6fc0\u52a8\u4eba\u5fc3\u7684\u90e8\u5206\u3002AI\u4e0d\u4ec5\u80fd\u8ba1\u7b97\u56de\u62a5\u7387\uff0c\u8fd8\u80fd\u81ea\u52a8\u751f\u6210\u53ef\u89c6\u5316\u56fe\u8868\uff01<\/li>\n<\/ol>\n\n\n\n<p><strong>\u5b83\u80fd\u753b\u51fa\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ef7\u683c\u8d70\u52bf\u56fe\uff0c\u5e76\u7528\u7eff\u4e09\u89d2\u548c\u7ea2\u4e09\u89d2\u6807\u8bb0\u51fa\u4ea4\u6613\u70b9\u4f4d\u3002<\/li>\n\n\n\n<li>\u6536\u76ca\u66f2\u7ebf\u56fe\uff0c\u76f4\u89c2\u5bf9\u6bd4\u7b56\u7565\u8868\u73b0\u548c\u201c\u4e70\u5165\u5e76\u6301\u6709\u201d\u7b56\u7565\u7684\u6536\u76ca\u5dee\u5f02\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u56fe\u8868\u4f1a\u81ea\u52a8\u4fdd\u5b58\u5728\u672c\u5730\u6587\u4ef6\u5939\u4e2d\uff0c\u4e3a\u4f60\u63d0\u4f9b\u6700\u76f4\u89c2\u7684\u5206\u6790\u7ed3\u679c\uff0c\u65b9\u4fbf\u4f60\u8fdb\u884c\u4e8c\u6b21\u7814\u7a76\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L2hOvHkicLUyU6dicicDldOzywzNMcmT2lPKSg89iceYfnnhlB3CHCe5RBHicHtqdorcSDJcYOtsibT1RjA\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>\u56fe2\uff1a<\/strong>AI\u81ea\u52a8\u751f\u6210\u7684\u56de\u6d4b\u7ed3\u679c\u56fe\u793a\u4f8b\uff0c\u5305\u542b\u4e86\u4ef7\u683c\u3001\u4ea4\u6613\u70b9\u4f4d\u548c\u6536\u76ca\u66f2\u7ebf\u3002TSLA\u4ea4\u6613\u51c6\u786e\u738726.67% \u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u624b\u628a\u624b\u6559\u5b66\ud83d\ude80\u00a0<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e2a\u9879\u76ee\u90e8\u7f72\u8d77\u6765\u975e\u5e38\u7b80\u5355\uff0c\u5373\u4f7f\u4f60\u662fPython\u5c0f\u767d\u4e5f\u6ca1\u5173\u7cfb\uff0c\u56e0\u4e3a\u6211\u4eec\u4f7f\u7528Docker\u6280\u672f\uff0c\u4e00\u952e\u89e3\u51b3\u4e86\u73af\u5883\u914d\u7f6e\u7684\u70e6\u607c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u51c6\u5907\u5de5\u4f5c\uff1aOpenAI API Key \u548c Docker<\/strong><\/h3>\n\n\n\n<p>1. \u51c6\u5907\u5bc6\u94a5\uff1a \u7531\u4e8eAI\u9700\u8981\u8c03\u7528\u5927\u6a21\u578b\uff08ChatGPT\uff09\u8fdb\u884c\u201c\u601d\u8003\u201d\uff0c\u4f60\u9700\u8981\u4e00\u4e2a OpenAI API Key\u3002\u8fd9\u662f\u9879\u76ee\u7684\u201c\u71c3\u6cb9\u201d\u3002<\/p>\n\n\n\n<p>2. \u5b89\u88c5\u5de5\u5177\uff1a \u5728\u4f60\u7684\u7535\u8111\u4e0a\u5b89\u88c5\u597d Git \u548c Docker\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u5b9e\u6218\u6b65\u9aa4\uff08Clone \u2192 Build \u2192 Run\uff09<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><br><strong>\u7b2c\u4e00\u6b65\uff1a\u514b\u9686\u4ee3\u7801\uff08\u628a\u4ee3\u7801\u62ff\u5230\u624b\uff09<\/strong><\/h4>\n\n\n\n<p>\u6253\u5f00\u4f60\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff08Terminal\u6216CMD\uff09\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>git&nbsp;clone&nbsp;https:\/\/github.com\/rejith77\/SMA-Trading-Agent<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cd&nbsp;SMA-Trading-Agent<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u7b2c\u4e8c\u6b65\uff1a\u6784\u5efa\u955c\u50cf\uff08\u628a\u5de5\u5177\u6253\u5305\uff09<\/strong><\/h4>\n\n\n\n<p>\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6784\u5efaDocker\u955c\u50cf\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker&nbsp;build -t \u8001\u4f59ai-agent .<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u7b2c\u4e09\u6b65\uff1a\u8fd0\u884cAI\uff08\u8ba9\u5b83\u5f00\u59cb\u5de5\u4f5c\uff09<\/strong><\/h4>\n\n\n\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u8fd0\u884c\u8fd9\u4e2aAI\uff0c\u540c\u65f6\u628a\u4f60\u7684API Key\u4f20\u7ed9\u5b83\uff0c\u5e76\u544a\u8bc9\u5b83\u628a\u751f\u6210\u7684\u56fe\u8868\u653e\u5728\u4f60\u672c\u5730\u7684 `charts` \u6587\u4ef6\u5939\u91cc\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u8bf7\u628a YOUR_OPENAI_KEY \u66ff\u6362\u6210\u4f60\u771f\u5b9e\u7684\u5bc6\u94a5<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;docker run --rm&nbsp;-it \\<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-e OPENAI_API_KEY=\"YOUR_OPENAI_KEY\"&nbsp;\\<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-v $(pwd)\/charts:\/app\/charts \\<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\u8001\u4f59ai-agent<\/code><\/code><\/pre>\n\n\n\n<p>\u8fd0\u884c\u540e\uff0c\u4f60\u4f1a\u5728\u547d\u4ee4\u884c\u770b\u5230AI\u201c\u601d\u8003\u201d\u548c\u201c\u884c\u52a8\u201d\u7684\u5b9e\u65f6\u8fc7\u7a0b\u3002\u6700\u7ec8\uff0c\u4f60\u672c\u5730\u7684 `charts` \u6587\u4ef6\u5939\u5c31\u4f1a\u81ea\u52a8\u751f\u6210\u5e26\u4ea4\u6613\u6807\u8bb0\u7684\u5206\u6790\u56fe\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001\u603b\u7ed3\u4e0e\u5fe0\u544a\ud83d\udcb0\u00a0<\/strong><\/h2>\n\n\n\n<p>\u6211\u4eec\u7528 LangGraph \u6210\u529f\u642d\u5efa\u4e86\u4e00\u4e2a\u6709\u72b6\u6001\u3001\u53ef\u81ea\u9a71\u7684\u91d1\u878d\u5206\u6790AI\u3002\u8fd9\u5957\u7cfb\u7edf\u6700\u5f3a\u5927\u7684\u5730\u65b9\u5728\u4e8e\uff0c\u5b83\u5c06\u590d\u6742\u7684\u91d1\u878d\u5206\u6790\u8fc7\u7a0b\u53d8\u6210\u4e86\u4e00\u4e2a\u4e2a\u6a21\u5757\u5316\u7684\u79ef\u6728\uff0c\u8ba9AI\u80fd\u591f\u81ea\u5df1\u89c4\u5212\u3001\u81ea\u5df1\u6267\u884c\u3002<\/p>\n\n\n\n<p>\u26a0\ufe0f&nbsp;<strong>\u3010\u8001\u4f59\u7684\u4e25\u8083\u5fe0\u544a\u3011<\/strong>\uff1a\u8fd9\u4e2a\u9879\u76ee\u662f\u4e00\u4e2a\u9876\u7ea7\u7684AI\u67b6\u6784\u6f14\u793a\uff0c\u65e8\u5728\u6559\u4f1a\u5927\u5bb6\u5982\u4f55\u6784\u5efa\u590d\u6742\u4ee3\u7406\u3002\u4f46\u5176\u5185\u7f6e\u7684\u56de\u6d4b\u7b56\u7565\u662f<strong>\u6545\u610f\u7b80\u5316<\/strong>\u7684\uff0c\u8bf7\u52ff\u5c06\u6b64\u4ee3\u7801\u76f4\u63a5\u7528\u4e8e\u771f\u5b9e\u8d44\u91d1\u4ea4\u6613\uff01\u91d1\u878d\u5e02\u573a\u590d\u6742\u591a\u53d8\uff0c\u4efb\u4f55\u5b9e\u76d8\u4ea4\u6613\u90fd\u9700\u8981\u7ecf\u8fc7\u4e25\u8c28\u7684\u4e13\u4e1a\u7ea7\u9a8c\u8bc1\u548c\u98ce\u9669\u7ba1\u7406\u3002\u8bf7\u5c06\u5b83\u4f5c\u4e3a\u4f60\u7684AI\u5b66\u4e60\u5de5\u5177\uff0c\u800c\u975e\u6295\u8d44\u51b3\u7b56\u7684\u57fa\u7840\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6587\u7ae0\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528AI\u6d41\u7a0b\u56fe\u6846\u67b6LangGraph\u548cChatGPT\uff0c\u642d\u5efa\u4e00\u4e2a\u80fd\u81ea\u4e3b\u601d\u8003\u548c\u884c\u52a8\u7684\u667a\u80fd\u91d1\u878d\u5206\u6790\u4ee3\u7406\u3002\u8be5\u7cfb\u7edf\u901a\u8fc7\u201c\u601d\u8003-\u884c\u52a8\u201d\u7684\u95ed\u73af\u51b3\u7b56\uff0c\u5b9e\u73b0\u4e86\u81ea\u52a8\u5316\u83b7\u53d6\u6570\u636e\u3001\u8ba1\u7b97\u6307\u6807\u53ca\u7b56\u7565\u56de\u6d4b\uff0c\u4e3a\u6784\u5efa\u66f4\u590d\u6742\u7684AI\u4ea4\u6613\u7cfb\u7edf\u5960\u5b9a\u4e86\u575a\u5b9e\u7684\u57fa\u7840\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udd25 \u7cbe\u534e\u56de\u987e\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6838\u5fc3\u6846\u67b6\uff1a \u4f7f\u7528 LangGraph \u6784\u5efa AI \u7684\u201c\u6d41\u7a0b\u56fe\u5927\u8111\u201d\uff0c\u5b9e\u73b0\u201c\u6709\u8bb0\u5fc6\u201d\u7684\u81ea\u9a71\u5f0f\u51b3\u7b56\u3002<\/li>\n\n\n\n<li>\u5173\u952e\u673a\u5236\uff1a \u91c7\u7528\u201c\u72b6\u6001\u673a\u201d\u8bbe\u8ba1\uff0c\u5c06\u4efb\u52a1\u62c6\u5206\u4e3a\u201c\u601d\u8003\u6a21\u5757\u201d\u548c\u201c\u884c\u52a8\u6a21\u5757\u201d\uff0c\u5b9e\u73b0\u52a8\u6001\u5faa\u73af\u3002<\/li>\n\n\n\n<li>\u529f\u80fd\u5b9e\u73b0\uff1a \u7ed3\u5408 Python \u91d1\u878d\u5e93\uff08\u5982 yfinance\uff09\uff0c\u5b9e\u73b0\u4e86\u6570\u636e\u83b7\u53d6\u3001\u6307\u6807\u8ba1\u7b97\u3001\u548c\u81ea\u52a8\u56fe\u8868\u751f\u6210\u7684\u56de\u6d4b\u529f\u80fd\u3002<\/li>\n\n\n\n<li>\u5c0f\u767d\u53cb\u597d\uff1a \u63d0\u4f9b\u5b8c\u6574\u7684 Docker \u90e8\u7f72\u6559\u7a0b\uff0c\u4e09\u6b65\u5373\u53ef\u8fd0\u884c\uff0c\u6781\u5927\u5730\u964d\u4f4e\u4e86\u73af\u5883\u914d\u7f6e\u95e8\u69db\u3002<\/li>\n\n\n\n<li>\u98ce\u9669\u8b66\u793a\uff1a \u672c\u9879\u76ee\u4ec5\u4e3a\u6280\u672f\u6f14\u793a\u548c\u5b66\u4e60\u4e4b\u7528\uff0c\u4e25\u7981\u76f4\u63a5\u7528\u4e8e\u5b9e\u76d8\u4ea4\u6613\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>GitHub\u5730\u5740\uff1a<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/rejith77\/SMA-Trading-Agent\">https:\/\/github.com\/rejith77\/SMA-Trading-Agent<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u89c9\u5f97\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u8bb0\u5f97\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u670b\u53cb\u3002\u6709\u4ec0\u4e48\u95ee\u9898\u53ef\u4ee5\u5728\u8bc4\u8bba\u533a\u7559\u8a00\uff0c\u8001\u4f59\u4f1a\u4e00\u4e00\u89e3\u7b54\u3002\u8ba9\u6211\u4eec\u4e00\u8d77\u5728\u91cf\u5316\u4ea4\u6613\u7684\u9053\u8def\u4e0a\u8d8a\u8d70\u8d8a\u8fdc\uff01<\/p>\n\n\n\n<p>\u00a0<a>#AI\u7092\u80a1<\/a>\u00a0<a>#\u91cf\u5316\u4ea4\u6613<\/a>\u00a0<a>#LangGraph<\/a>\u00a0<a>#ChatGPT<\/a>\u00a0<a>#\u667a\u80fd\u4ee3\u7406<\/a>\u00a0<a>#\u81ea\u52a8\u5316\u5206\u6790<\/a>\u00a0<a>#\u8d22\u5bcc\u81ea\u7531<\/a>\u00a0<a>#Python\u7f16\u7a0b<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\">\u98ce\u9669\u63d0\u793a\uff1a\u6295\u8d44\u6709\u98ce\u9669\uff0c\u5165\u5e02\u9700\u8c28\u614e\u3002\u672c\u6587\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u4e0d\u6784\u6210\u6295\u8d44\u5efa\u8bae\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\u3002&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/laoyulaoyu.com\/index.php\/2025\/12\/09\/%e6%88%91%e7%94%a8ai%e6%b5%81%e7%a8%8b%e5%9b%be%e6%a1%86%e6%9e%b6%ef%bc%8c%e9%80%a0%e4%ba%86%e4%b8%80%e4%b8%aa%e8%83%bd%e8%87%aa%e6%88%91%e6%80%9d%e8%80%83%e7%9a%84%e4%ba%a4%e6%98%93%e7%b3%bb%e7%bb%9f\/\">Continue reading<span class=\"screen-reader-text\">\u6211\u7528AI\u6d41\u7a0b\u56fe\u6846\u67b6\uff0c\u9020\u4e86\u4e00\u4e2a\u80fd\u81ea\u6211\u601d\u8003\u7684\u4ea4\u6613\u7cfb\u7edf<\/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":{"0":"post-3138","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","10":"tag-6","11":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3138","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=3138"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3138\/revisions"}],"predecessor-version":[{"id":3140,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3138\/revisions\/3140"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=3138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=3138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=3138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}