{"id":1932,"date":"2025-02-28T07:02:00","date_gmt":"2025-02-27T23:02:00","guid":{"rendered":"https:\/\/blog.laoyulaoyu.top\/?p=1932"},"modified":"2025-01-26T17:40:40","modified_gmt":"2025-01-26T09:40:40","slug":"%e4%bd%a0%e5%bf%85%e9%a1%bb%e7%9f%a5%e9%81%93%e7%9a%84yfinance%e4%b8%89%e5%a4%a7%e6%9b%b4%e6%96%b0%ef%bc%9a%e8%ae%a9%e6%99%ba%e8%83%bd%e9%87%91%e8%9e%8d%e5%88%86%e6%9e%90%e6%95%88%e7%8e%87%e7%bf%bb","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/02\/28\/%e4%bd%a0%e5%bf%85%e9%a1%bb%e7%9f%a5%e9%81%93%e7%9a%84yfinance%e4%b8%89%e5%a4%a7%e6%9b%b4%e6%96%b0%ef%bc%9a%e8%ae%a9%e6%99%ba%e8%83%bd%e9%87%91%e8%9e%8d%e5%88%86%e6%9e%90%e6%95%88%e7%8e%87%e7%bf%bb\/","title":{"rendered":"\u4f60\u5fc5\u987b\u77e5\u9053\u7684YFinance\u4e09\u5927\u66f4\u65b0\uff1a\u8ba9\u667a\u80fd\u91d1\u878d\u5206\u6790\u6548\u7387\u7ffb\u500d\uff01"},"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\/01\/0_zz57CFa6Xsl8f-K7-1.jpg\" alt=\"\" class=\"wp-image-4096\"\/><\/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>\u6211\u53d1\u73b0YFinance\u6700\u65b0\u7248\u672c\u5e26\u6765\u4e86\u4e09\u5927\u5173\u952e\u66f4\u65b0\uff1a\u591a\u7d22\u5f15\u6570\u636e\u7ed3\u6784\u3001\u8c03\u6574\u540e\u6536\u76d8\u4ef7\u79fb\u9664\u53ca\u81ea\u52a8\u8c03\u6574\u529f\u80fd\u3002<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u8fd9\u4e9b\u53d8\u9769\u6781\u5927\u63d0\u5347\u4e86\u91d1\u878d\u6570\u636e\u7684\u5904\u7406\u6548\u7387\u548c\u51c6\u786e\u6027\uff0c\u8ba9\u6570\u636e\u83b7\u53d6\u66f4\u4fbf\u6377\u9ad8\u6548\uff0c\u5206\u6790\u6df1\u5ea6\u548c\u7075\u6d3b\u6027\u589e\u5f3a\u3002<\/mark>\u8fd9\u5bf9\u667a\u6167\u91d1\u878d\u7231\u597d\u8005\u6765\u8bf4\u662f\u91cd\u5927\u5229\u597d\u3002\u5982\u679c\u4f60\u60f3\u5feb\u901f\u638c\u63e1\u8fd9\u4e9b\u53d8\u5316\uff0c\u8fd9\u7bc7\u6587\u7ae0\u503c\u5f97\u4e00\u8bfb\uff01<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4ec0\u4e48\u662f YFinance\uff1f<\/strong><\/h2>\n\n\n\n<p>YFinance \u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u4e14\u7b80\u5355\u6613\u7528\u7684\u91d1\u878d\u6570\u636e\u63a5\u53e3\u5e93\uff0c\u80fd\u591f\u4ece\u96c5\u864e\u8d22\u7ecf\uff08Yahoo Finance\uff09\u7b49\u6570\u636e\u6e90\u5feb\u901f\u83b7\u53d6\u91d1\u878d\u6570\u636e\u3002\u65e0\u8bba\u662f\u91d1\u878d\u5206\u6790\u5e08\u3001\u4ea4\u6613\u5458\u3001\u5b66\u672f\u7814\u7a76\u8005\uff0c\u8fd8\u662f\u6570\u636e\u79d1\u5b66\u5bb6\u548c\u673a\u5668\u5b66\u4e60\u5de5\u7a0b\u5e08\uff0c\u90fd\u53ef\u4ee5\u501f\u52a9 YFinance \u8fdb\u884c\u91d1\u878d\u6570\u636e\u5206\u6790\u3001\u91cf\u5316\u4ea4\u6613\u548c\u6295\u8d44\u7ec4\u5408\u7ba1\u7406\u3002\u4f5c\u4e3a\u5168\u7403\u8c03\u7528\u91cf\u6700\u9ad8\u7684\u91d1\u878d API \u4e4b\u4e00\uff0cYFinance \u5df2\u7ecf\u6210\u4e3a\u91d1\u878d\u79d1\u6280\u9886\u57df\u4e0d\u53ef\u6216\u7f3a\u7684\u5de5\u5177\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/01\/\u4ec0\u4e48\u662fyFinance\uff1f-visual-selection.png\" alt=\"\" class=\"wp-image-4097\"\/><\/figure>\n\n\n\n<p>YFinance \u7684\u6700\u65b0\u7248\u672c 0.2.51\uff08\u53d1\u5e03\u4e8e\u4e0a\u6708\uff09\u5e26\u6765\u4e86\u91cd\u5927\u66f4\u65b0\u3002\u867d\u7136\u8fd9\u4e9b\u53d8\u5316\u8ba9\u90e8\u5206\u7528\u6237\u611f\u5230\u56f0\u60d1\uff0c\u4f46\u4e5f\u5f15\u5165\u4e86\u8bb8\u591a\u4ee4\u4eba\u5174\u594b\u7684\u529f\u80fd\u6539\u8fdb\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8\u8fd9\u4e9b\u66f4\u65b0\u7684\u6838\u5fc3\u5185\u5bb9\uff0c\u5206\u4eab\u5e94\u5bf9\u7b56\u7565\uff0c\u5e76\u901a\u8fc7\u5b9e\u7528\u7684\u4ee3\u7801\u793a\u4f8b\u5e2e\u52a9\u4f60\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n\n\n\n<p>YFinance \u662f\u4e00\u4e2a\u57fa\u4e8e Python \u7684\u5f00\u6e90\u5e93\uff0c\u7528\u4e8e\u4ece\u96c5\u864e\u8d22\u7ecf\uff08Yahoo Finance\uff09\u83b7\u53d6\u91d1\u878d\u6570\u636e\u3002\u5b83\u5e76\u4e0d\u662f\u4e00\u4e2a\u72ec\u7acb\u7684 API \u670d\u52a1\uff0c\u56e0\u6b64\u6ca1\u6709\u76f4\u63a5\u7684\u8c03\u7528\u5730\u5740\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7 Python \u7684&nbsp;<code>pip<\/code>&nbsp;\u5b89\u88c5\u5e76\u4f7f\u7528\u5b83\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u5982\u4f55\u5b89\u88c5 YFinance \uff1f<\/strong><\/h2>\n\n\n\n<p>\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 YFinance\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install yfinance<\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684 Python \u8c03\u7528\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u4f7f\u7528 YFinance \u83b7\u53d6\u80a1\u7968\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import yfinance as yf\n\n# \u83b7\u53d6\u82f9\u679c\u516c\u53f8\uff08AAPL\uff09\u7684\u5386\u53f2\u6570\u636e\ndata = yf.download(\"AAPL\", start=\"2023-01-01\", end=\"2025-1-31\")\n\n# \u6253\u5370\u6570\u636e\nprint(data.head())<\/code><\/pre>\n\n\n\n<p>\u5b98\u65b9\u8d44\u6e90\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>GitHub \u4ed3\u5e93<\/strong>\uff1a<a href=\"https:\/\/github.com\/ranaroussi\/yfinance\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/ranaroussi\/yfinance<\/a><\/li>\n\n\n\n<li><strong>\u6587\u6863<\/strong>\uff1a<a href=\"https:\/\/pypi.org\/project\/yfinance\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/pypi.org\/project\/yfinance\/<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u5982\u679c\u4f60\u9700\u8981\u66f4\u591a\u5e2e\u52a9\uff0c\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\u6216\u793e\u533a\u8d44\u6e90\u3002YFinance \u7684\u5f3a\u5927\u529f\u80fd\u548c\u6613\u7528\u6027\u4f7f\u5176\u6210\u4e3a\u91d1\u878d\u6570\u636e\u5206\u6790\u7684\u9996\u9009\u5de5\u5177\u4e4b\u4e00\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001YFinance \u7684\u4e3b\u8981\u66f4\u65b0<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>3.1 \u6570\u636e\u7ed3\u6784\u5347\u7ea7\uff1a\u591a\u7d22\u5f15\u529f\u80fd\u4e0a\u7ebf<\/strong><\/h3>\n\n\n\n<p>\u5728\u4e4b\u524d\u7684\u7248\u672c\u4e2d\uff0cYFinance \u63d0\u4f9b\u7684 DataFrame \u4ec5\u5305\u542b\u7b80\u5355\u7684\u6570\u636e\u5217\uff0c\u4f8b\u5982\u5f00\u76d8\u4ef7\u3001\u6700\u9ad8\u4ef7\u3001\u6700\u4f4e\u4ef7\u3001\u6536\u76d8\u4ef7\u3001\u8c03\u6574\u540e\u6536\u76d8\u4ef7\u548c\u6210\u4ea4\u91cf\u3002\u7136\u800c\uff0c\u6700\u65b0\u7248\u672c\u5f15\u5165\u4e86\u591a\u7d22\u5f15\u6570\u636e\u7ed3\u6784\uff0c\u5f7b\u5e95\u6539\u53d8\u4e86\u6570\u636e\u7684\u7ec4\u7ec7\u65b9\u5f0f\u3002\u8fd9\u4e00\u5347\u7ea7\u4f7f\u7528\u6237\u80fd\u591f\u66f4\u7075\u6d3b\u5730\u5904\u7406\u590d\u6742\u6570\u636e\u96c6\uff0c\u5c24\u5176\u662f\u5728\u5206\u6790\u591a\u7ef4\u5ea6\u91d1\u878d\u6570\u636e\u65f6\uff0c\u663e\u8457\u63d0\u5347\u4e86\u6548\u7387\u548c\u6e05\u6670\u5ea6\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u7b80\u5316\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u4f7f\u7528 Pandas \u7684&nbsp;<code>xs<\/code>&nbsp;\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import yfinance as yf\n\n# Retrieve financial data\ndata = yf.download(&#91;'AAPL', 'TSLA'], start=\"2024-01-01\", end=\"2024-12-31\")\n\n# Initial view with Multi-Index\nprint(data.head())\n\n# Flatten columns using xs\napple_data = data.xs('AAPL', axis=1, level=1)  # Retrieves only Apple data\nprint(apple_data.head())<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/01\/\u5fae\u4fe1\u56fe\u7247_20250126164815.png\" alt=\"\" class=\"wp-image-4098\"\/><\/figure>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u6cd5\u7279\u522b\u9002\u5408\u5904\u7406\u5355\u4e00\u8d44\u4ea7\u6570\u636e\u3002\u4f46\u5982\u679c\u4f60\u9700\u8981\u540c\u65f6\u5206\u6790\u591a\u79cd\u8d44\u4ea7\uff0c\u4fdd\u7559\u591a\u91cd\u7d22\u5f15\u7ed3\u6784\u5c06\u6709\u52a9\u4e8e\u4fdd\u6301\u6570\u636e\u7684\u6e05\u6670\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 \u79fb\u9664\u8c03\u6574\u540e\u6536\u76d8\u4ef7\u5217<\/strong><\/h3>\n\n\n\n<p>YFinance \u5728\u65b0\u7248\u672c\u4e2d\u79fb\u9664\u4e86\u201c\u8c03\u6574\u540e\u6536\u76d8\u4ef7\u201d\u8fd9\u4e00\u5217\uff0c\u73b0\u5728\u6240\u6709\u503c\uff08\u5f00\u76d8\u4ef7\u3001\u6700\u9ad8\u4ef7\u3001\u6700\u4f4e\u4ef7\u3001\u6536\u76d8\u4ef7\uff09\u90fd\u4f1a\u6839\u636e\u80a1\u606f\u548c\u62c6\u5206\u7b49\u56e0\u7d20\u81ea\u52a8\u8c03\u6574\u3002\u8fd9\u4e00\u53d8\u5316\u53ef\u80fd\u4f1a\u5f71\u54cd\u4f9d\u8d56\u8be5\u6570\u636e\u7684\u7528\u6237\uff0c\u4f46\u540c\u65f6\u4e5f\u7b80\u5316\u4e86\u6570\u636e\u7ed3\u6784\uff0c\u8ba9\u7528\u6237\u80fd\u591f\u66f4\u4e13\u6ce8\u4e8e\u6838\u5fc3\u4ef7\u683c\u6570\u636e\u7684\u5206\u6790\u3002<\/p>\n\n\n\n<p>\u800c\u5bf9\u5e94\u7684\u89e3\u51b3\u65b9\u6848\u662f\u7981\u7528\u81ea\u52a8\u8c03\u6574\u529f\u80fd\u3002\u5982\u679c\u4f60\u9700\u8981\u83b7\u53d6\u672a\u7ecf\u8c03\u6574\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u5728\u4e0b\u8f7d\u6570\u636e\u65f6\u4f7f\u7528 <code>auto_adjust=False<\/code> \u53c2\u6570\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Data with automatic adjustment enabled\nadjusted_data = yf.download('AAPL', start=\"2024-01-01\", end=\"2024-12-31\")\nprint(adjusted_data.head())\n\n# Data without automatic adjustment\nraw_data = yf.download('AAPL', start=\"2024-01-01\", end=\"2024-12-31\", auto_adjust=False)\nprint(raw_data.head())<\/code><\/pre>\n\n\n\n<p>\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Price         Volume  <br>Ticker          AAPL  <br>Date                  <br>2024-01-02  82488700  <br>2024-01-03  58414500  <br>2024-01-04  71983600  <br>2024-01-05  62303300  <br>2024-01-08  59144500<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.3 \u65b0\u589e\u8c03\u6574\u7cfb\u6570\u8ba1\u7b97\u529f\u80fd<\/strong><\/h3>\n\n\n\n<p>YFinance \u6700\u65b0\u7248\u672c\u5f15\u5165\u4e86\u8c03\u6574\u7cfb\u6570\u8ba1\u7b97\u529f\u80fd\uff0c\u7528\u6237\u53ef\u4ee5\u624b\u52a8\u8ba1\u7b97\u4ef7\u683c\u8c03\u6574\u7684\u6bd4\u4f8b\u3002\u8fd9\u4e00\u529f\u80fd\u4e3a\u9700\u8981\u7cbe\u786e\u8c03\u6574\u6570\u636e\u7684\u7528\u6237\u63d0\u4f9b\u4e86\u66f4\u5927\u7684\u7075\u6d3b\u6027\u548c\u63a7\u5236\u6743\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u60f3\u4e86\u89e3\u8c03\u6574\u7cfb\u6570\u7684\u8ba1\u7b97\u65b9\u6cd5\uff0c\u53ef\u4ee5\u901a\u8fc7\u5bf9\u6bd4\u8c03\u6574\u540e\u548c\u672a\u8c03\u6574\u7684\u6570\u636e\u6765\u63a8\u5bfc\u7cfb\u6570\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>factor = adjusted_data&#91;'Close'] \/ raw_data&#91;'Close']\nprint(factor.head())<\/code><\/pre>\n\n\n\n<p>\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Ticker          AAPL<br>Date                <br>2024-01-02  0.995125<br>2024-01-03  0.995125<br>2024-01-04  0.995125<br>2024-01-05  0.995125<br>2024-01-08  0.995125<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3.4 \u4e3a\u5565\u8fd9\u4e9b\u53d8\u5316\u5f88\u91cd\u8981\uff1f<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e9b\u53d8\u5316\u4e4b\u6240\u4ee5\u91cd\u8981\uff0c\u662f\u56e0\u4e3a\u5b83\u4eec\u4ece\u6839\u672c\u4e0a\u63d0\u5347\u4e86 YFinance \u7684\u529f\u80fd\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002\u591a\u7d22\u5f15\u6570\u636e\u7ed3\u6784\u8ba9\u590d\u6742\u6570\u636e\u7684\u5904\u7406\u66f4\u52a0\u7075\u6d3b\u9ad8\u6548\uff0c\u79fb\u9664\u8c03\u6574\u540e\u6536\u76d8\u4ef7\u5217\u7b80\u5316\u4e86\u6570\u636e\u7ed3\u6784\uff0c\u800c\u8c03\u6574\u7cfb\u6570\u8ba1\u7b97\u529f\u80fd\u5219\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7684\u6570\u636e\u63a7\u5236\u6743\u3002<\/p>\n\n\n\n<p>YFinance \u7684\u66f4\u65b0\u65e8\u5728\u63d0\u5347\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u51c6\u786e\u6027\uff0c\u5c24\u5176\u662f\u5728\u4ef7\u683c\u8c03\u6574\u81f3\u5173\u91cd\u8981\u7684\u573a\u666f\u4e2d\u3002\u4f8b\u5982\uff0c\u5728\u8fdb\u884c\u5386\u53f2\u8d22\u52a1\u6570\u636e\u5206\u6790\u6216\u6218\u7565\u5efa\u6a21\u65f6\uff0c\u6839\u636e\u80a1\u606f\u548c\u80a1\u7968\u62c6\u5206\u8c03\u6574\u6570\u636e\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u5e38\u89c1\u9519\u8bef\uff0c\u786e\u4fdd\u5206\u6790\u7ed3\u679c\u7684\u53ef\u9760\u6027\u3002\u8fd9\u4e9b\u6539\u8fdb\u8ba9 YFinance \u6210\u4e3a\u66f4\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u6ee1\u8db3\u4e13\u4e1a\u7528\u6237\u7684\u9ad8\u7cbe\u5ea6\u9700\u6c42\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e9b\u66f4\u65b0\u4e0d\u4ec5\u63d0\u5347\u4e86\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u51c6\u786e\u6027\uff0c\u8fd8\u5927\u5e45\u4f18\u5316\u4e86\u7528\u6237\u4f53\u9a8c\u3002\u65e0\u8bba\u662f\u91d1\u878d\u5206\u6790\u5e08\u3001\u6570\u636e\u79d1\u5b66\u5bb6\uff0c\u8fd8\u662f\u91cf\u5316\u4ea4\u6613\u5458\uff0c\u90fd\u80fd\u4ece\u4e2d\u53d7\u76ca\u3002\u5982\u679c\u4f60\u60f3\u5feb\u901f\u638c\u63e1\u8fd9\u4e9b\u53d8\u5316\uff0c\u672c\u6587\u63d0\u4f9b\u7684\u4ee3\u7801\u793a\u4f8b\u548c\u5b9e\u7528\u5efa\u8bae\u5c06\u5e2e\u52a9\u4f60\u8f7b\u677e\u4e0a\u624b\u3002YFinance \u4f9d\u7136\u662f\u5168\u7403\u6700\u53d7\u6b22\u8fce\u7684\u91d1\u878d API \u4e4b\u4e00\uff0c\u8fd9\u6b21\u66f4\u65b0\u8fdb\u4e00\u6b65\u5de9\u56fa\u4e86\u5b83\u7684\u5730\u4f4d\u3002<\/p>\n\n\n\n<p>\u6b63\u5982\u7231\u56e0\u65af\u5766\u6240\u8a00\uff1a\u201c\u8861\u91cf\u667a\u6167\u7684\u6807\u51c6\u662f\u6539\u53d8\u7684\u80fd\u529b\u3002\u201d\u501f\u52a9\u8fd9\u4e9b\u65b0\u529f\u80fd\uff0c\u4f60\u53ef\u4ee5\u83b7\u5f97\u66f4\u51c6\u786e\u3001\u66f4\u9ad8\u6548\u7684\u6d1e\u5bdf\u3002\u5229\u7528\u672c\u6587\u63d0\u4f9b\u7684\u793a\u4f8b\u4ee3\u7801\u8fdb\u884c\u5b9e\u9a8c\uff0c\u5e76\u6839\u636e\u4f60\u7684\u9879\u76ee\u9700\u6c42\u7075\u6d3b\u8c03\u6574\uff0c\u5145\u5206\u53d1\u6325 YFinance \u8fd9\u4e00\u5f3a\u5927\u5de5\u5177\u7684\u4f18\u52bf\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u591a\u7d22\u5f15\u6570\u636e\u7ed3\u6784<\/strong>\uff1a\u8ba9\u590d\u6742\u6570\u636e\u7684\u5904\u7406\u66f4\u52a0\u7075\u6d3b\u9ad8\u6548\uff0c\u5c24\u5176\u9002\u5408\u591a\u7ef4\u5ea6\u5206\u6790\u3002<\/li>\n\n\n\n<li><strong>\u79fb\u9664\u8c03\u6574\u540e\u6536\u76d8\u4ef7\u5217<\/strong>\uff1a\u7b80\u5316\u4e86\u6570\u636e\u7ed3\u6784\uff0c\u7528\u6237\u53ef\u901a\u8fc7 <code>auto_adjust=False<\/code> \u83b7\u53d6\u672a\u8c03\u6574\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u8c03\u6574\u7cfb\u6570\u8ba1\u7b97\u529f\u80fd<\/strong>\uff1a\u5141\u8bb8\u7528\u6237\u624b\u52a8\u8ba1\u7b97\u4ef7\u683c\u8c03\u6574\u6bd4\u4f8b\uff0c\u63d0\u4f9b\u66f4\u9ad8\u7684\u6570\u636e\u63a7\u5236\u6743\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><em>\u611f\u8c22\u60a8\u9605\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\" id=\"a1c6\">\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","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\/02\/28\/%e4%bd%a0%e5%bf%85%e9%a1%bb%e7%9f%a5%e9%81%93%e7%9a%84yfinance%e4%b8%89%e5%a4%a7%e6%9b%b4%e6%96%b0%ef%bc%9a%e8%ae%a9%e6%99%ba%e8%83%bd%e9%87%91%e8%9e%8d%e5%88%86%e6%9e%90%e6%95%88%e7%8e%87%e7%bf%bb\/\">Continue reading<span class=\"screen-reader-text\">\u4f60\u5fc5\u987b\u77e5\u9053\u7684YFinance\u4e09\u5927\u66f4\u65b0\uff1a\u8ba9\u667a\u80fd\u91d1\u878d\u5206\u6790\u6548\u7387\u7ffb\u500d\uff01<\/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":[3,5,7],"class_list":{"0":"post-1932","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","9":"tag-7","10":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1932","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=1932"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1932\/revisions"}],"predecessor-version":[{"id":1933,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1932\/revisions\/1933"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=1932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=1932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=1932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}