{"id":2978,"date":"2025-11-18T07:43:00","date_gmt":"2025-11-17T23:43:00","guid":{"rendered":"https:\/\/www.laoyulaoyu.com\/?p=2978"},"modified":"2025-11-03T17:44:32","modified_gmt":"2025-11-03T09:44:32","slug":"%e5%91%8a%e5%88%ab%e9%9f%ad%e8%8f%9c%e5%91%bd%e8%bf%90%ef%bc%81%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e7%94%a8ai%e6%89%93%e9%80%a0%e7%a7%81%e4%ba%ba%e6%8a%95%e8%b5%84%e9%a1%be%e9%97%ae","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/11\/18\/%e5%91%8a%e5%88%ab%e9%9f%ad%e8%8f%9c%e5%91%bd%e8%bf%90%ef%bc%81%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e7%94%a8ai%e6%89%93%e9%80%a0%e7%a7%81%e4%ba%ba%e6%8a%95%e8%b5%84%e9%a1%be%e9%97%ae\/","title":{"rendered":"\u544a\u522b\u97ed\u83dc\u547d\u8fd0\uff01\u624b\u628a\u624b\u6559\u4f60\u7528AI\u6253\u9020\u79c1\u4eba\u6295\u8d44\u987e\u95ee"},"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:\/\/blog.laoyulaoyu.top\/wp-content\/uploads\/2025\/11\/2025-11-03_153638_229.png\" alt=\"\" class=\"wp-image-3026\"\/><\/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>\u672c\u6587\u5c06\u6559\u5927\u5bb6\u5b66\u4f1a\u7528Python\u6293\u53d6\u8d22\u52a1\u6570\u636e\uff0c\u518d\u8ba9ChatGPT\u8fdb\u884c\u5b8c\u6574\u7684\u4ef7\u503c\u5206\u6790\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u4e0d\u9700\u8981\u91d1\u878d\u80cc\u666f\uff0c\u4e5f\u4e0d\u7528\u82b1\u94b1\u4e70\u8f6f\u4ef6<\/mark>\uff0c\u5c31\u80fd\u8ba9\u60a8\u4ece\"\u4ef7\u683c\u6295\u673a\u8005\"\u53d8\u6210\"\u4ef7\u503c\u6295\u8d44\u8005\"\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\ud83d\udea8 \u95ee\u9898\uff1a\u5728\u6570\u5b57\u6d77\u6d0b\u4e2d\u8ff7\u5931\u65b9\u5411<\/strong><\/h2>\n\n\n\n<p>&#8220;\u80a1\u5e02\u91cc\u5230\u5904\u90fd\u662f\u77e5\u9053\u6bcf\u6837\u4e1c\u897f\u4ef7\u683c\u3001\u5374\u4e0d\u77e5\u9053\u4efb\u4f55\u4e1c\u897f\u4ef7\u503c\u7684\u4eba\u3002&#8221; \u2014\u2014 \u83f2\u5229\u666e\u00b7\u8d39\u96ea\uff08\u5df4\u83f2\u7279\u7684\u8001\u5e08\uff09<\/p>\n\n\n\n<p>\u5927\u591a\u6570\u6563\u6237\u521a\u5f00\u59cb\u7092\u80a1\u7684\u65f6\u5019\uff0c\u4f1a\u4e00\u76f4\u5728\u76ef\u7740\u4ef7\u683c\u770b\uff0c\u5f88\u5c11\u53bb\u5173\u5fc3\u4ef7\u503c\u3002\u800c\u8d22\u52a1\u6570\u636e\uff1a\u8425\u6536\u3001\u503a\u52a1\u6bd4\u7387\u3001\u76c8\u5229\u80fd\u529b\u7b49\u80fd\u591f\u63ed\u793a\u516c\u53f8\u771f\u5b9e\u6545\u4e8b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\ud83d\udcb8 \u4f20\u7edf\u83b7\u53d6\u8d22\u52a1\u6570\u636e\u7684\u75db\u70b9<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e13\u4e1a\u91d1\u878d\u6570\u636e\u5e73\u53f0\u52a8\u8f84\u6bcf\u6708\u51e0\u5343\u5143\uff1b<\/li>\n\n\n\n<li>\u514d\u8d39\u6570\u636e\u6765\u6e90\u6742\u4e71\u4e0d\u582a\u3001\u6570\u636e\u4e0d\u5b8c\u6574\uff1b<\/li>\n\n\n\n<li>\u9700\u8981\u82b1\u8d39\u5927\u91cf\u65f6\u95f4\u624b\u52a8\u6574\u7406\u548c\u5206\u6790\uff1b<\/li>\n\n\n\n<li>\u7f3a\u4e4f\u4e13\u4e1a\u5206\u6790\u80fd\u529b\uff0c\u770b\u4e0d\u61c2\u6570\u636e\u80cc\u540e\u7684\u610f\u4e49\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\ud83d\udca1 \u89e3\u51b3\u65b9\u6848\uff1aPython+\u6570\u636e\u63a5\u53e3+ChatGPT\u7ec4\u5408\u62f3<\/strong><\/h2>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u6559\u7a0b\u4e2d\uff0c\u4f60\u5c06\u5b66\u4f1a\u5982\u4f55\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\ud83c\udfaf \u4e09\u5927\u6838\u5fc3\u529f\u80fd<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7528Python\u83b7\u53d6\u5b9e\u65f6\u8d22\u52a1\u6570\u636e<\/strong>&nbsp;&#8211; \u4e0d\u518d\u4f9d\u8d56\u6602\u8d35\u7684\u4ed8\u8d39\u5e73\u53f0\u3002<\/li>\n\n\n\n<li><strong>\u642d\u5efa\u53ef\u89c6\u5316\u6295\u8d44\u770b\u677f<\/strong>&nbsp;&#8211; \u8ba9\u590d\u6742\u6570\u636e\u4e00\u76ee\u4e86\u7136\u3002<\/li>\n\n\n\n<li><strong>\u501f\u52a9ChatGPT\u751f\u6210AI\u5206\u6790\u62a5\u544a<\/strong>&nbsp;&#8211; \u628a\u51b7\u51b0\u51b0\u7684\u6570\u5b57\u53d8\u6210\u6295\u8d44\u5efa\u8bae\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u5b8c\u6210\u540e\uff0c\u4f60\u5c06\u62e5\u6709\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684&#8221;\u8ff7\u4f60AI\u8d22\u52a1\u5206\u6790\u5e08&#8221;\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\ud83d\udee0\ufe0f&nbsp;6\u6b65\u5b9e\u6218\u6559\u7a0b\uff1a\u4ece\u96f6\u642d\u5efaAI\u6295\u8d44\u7cfb\u7edf<\/strong><\/h2>\n\n\n\n<p><strong>\u7b2c1\u6b65\uff1a\u83b7\u53d6EODHD\u6570\u636e\u63a5\u53e3\u5bc6\u94a5 \ud83d\udd11<\/strong><\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u53ef\u9760\u7684\u8d22\u52a1\u6570\u636e\u6765\u6e90\u3002EODHD\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u57fa\u672c\u9762\u6570\u636e\u63a5\u53e3\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8bbf\u95ee EODHD \u57fa\u672c\u9762\u6570\u636e\u9875\u9762\uff1b<\/li>\n\n\n\n<li>\u6ce8\u518c\u4e00\u4e2a\u514d\u8d39\u8d26\u6237\u5e76\u83b7\u53d6API\u5bc6\u94a5\uff1b<\/li>\n\n\n\n<li>\u7acb\u5373\u6d4b\u8bd5\u63a5\u53e3\u662f\u5426\u6b63\u5e38\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;eodhd.com\/api\/fundamentals\/AAPL.US?api_token=\u4f60\u7684\u5bc6\u94a5&amp;fmt=json<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4f60\u770b\u5230JSON\u683c\u5f0f\u7684\u56de\u5e94\u6570\u636e\uff0c\u8bf4\u660e\u4e00\u5207\u51c6\u5907\u5c31\u7eea\uff01<\/p>\n\n\n\n<p><strong>\u7b2c2\u6b65\uff1a\u8fde\u63a5\u8d22\u52a1\u6570\u636e\u63a5\u53e3 \ud83c\udf10<\/strong><\/p>\n\n\n\n<p>\u8ba9\u6211\u4eec\u4ece\u4e00\u4e2a\u7b80\u5355\u7684&#8221;Hello World&#8221;\u5f00\u59cb\uff0c\u4f53\u9a8c\u5b9e\u65f6\u91d1\u878d\u6570\u636e\u7684\u9b45\u529b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import requests \nAPI_TOKEN = \"YOUR_TOKEN\"\n symbol = \"AAPL.US\"\n url = f \"https:\/\/eodhd.com\/api\/fundamentals\/{symbol}?api_token={API_TOKEN}&amp;fmt=json\"\n r = requests.get (url) \ndata = r.json() \nprint( data &#91; \"General\" ]&#91; \"Name\" ]) \nprint( data &#91; \"Highlights\" ]&#91; \"MarketCapitalization\" ])<\/code><\/pre>\n\n\n\n<p>\u2705 \u8fd0\u884c\u8fd9\u6bb5\u4ee3\u7801\uff0c\u4f60\u5c31\u80fd\u83b7\u53d6\u5230\u516c\u53f8\u540d\u79f0\u548c\u5e02\u503c\u4e86\u3002<\/p>\n\n\n\n<p><strong>\u7b2c3\u6b65\uff1a\u63d0\u53d6\u6838\u5fc3\u8d22\u52a1\u6307\u6807 \ud83d\udcca<\/strong><\/p>\n\n\n\n<p>JSON\u6570\u636e\u5305\u542b\u51e0\u5341\u4e2a\u90e8\u5206\uff0c\u4f46\u6211\u4eec\u91cd\u70b9\u5173\u6ce8\u6295\u8d44\u8005\u771f\u6b63\u9700\u8981\u7684\u5173\u952e\u6307\u6807\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u6307\u6807\u540d\u79f0<\/strong><\/th><th><strong>\u4e2d\u6587\u8bf4\u660e<\/strong><\/th><th><strong>\u6295\u8d44\u610f\u4e49<\/strong><\/th><\/tr><\/thead><tbody><tr><td>MarketCapitalization<\/td><td>\u603b\u5e02\u503c<\/td><td>\u516c\u53f8\u89c4\u6a21\u5927\u5c0f\uff0c\u53cd\u6620\u5e02\u573a\u5bf9\u516c\u53f8\u7684\u6574\u4f53\u4f30\u503c<\/td><\/tr><tr><td>TrailingPE<\/td><td>\u5e02\u76c8\u7387<\/td><td>\u4f30\u503c\u9ad8\u4f4e\u6307\u6807\uff0c\u6570\u503c\u8d8a\u4f4e\u901a\u5e38\u8868\u793a\u8d8a\u4fbf\u5b9c<\/td><\/tr><tr><td>PriceBookMRQ<\/td><td>\u5e02\u51c0\u7387<\/td><td>\u80a1\u4ef7\u4e0e\u8d26\u9762\u4ef7\u503c\u7684\u5bf9\u6bd4\uff0c\u4ef7\u503c\u6295\u8d44\u91cd\u8981\u6307\u6807<\/td><\/tr><tr><td>ReturnOnEquityTTM<\/td><td>\u51c0\u8d44\u4ea7\u6536\u76ca\u7387(ROE)<\/td><td>\u516c\u53f8\u8d5a\u94b1\u6548\u7387\uff0c\u6570\u503c\u8d8a\u9ad8\u8bf4\u660e\u7ba1\u7406\u5c42\u8d8a\u4f1a\u8d5a\u94b1<\/td><\/tr><tr><td>DividendYield<\/td><td>\u80a1\u606f\u7387<\/td><td>\u5206\u7ea2\u6536\u76ca\u7387\uff0c\u9002\u5408\u8ffd\u6c42\u7a33\u5b9a\u6536\u5165\u7684\u6295\u8d44\u8005<\/td><\/tr><tr><td>QuarterlyRevenueGrowthYOY<\/td><td>\u5b63\u5ea6\u8425\u6536\u589e\u957f\u7387<\/td><td>\u516c\u53f8\u6210\u957f\u6027\u6307\u6807\uff0c\u53cd\u6620\u4e1a\u52a1\u6269\u5f20\u80fd\u529b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4e0b\u9762\u7684\u4ee3\u7801\u5c55\u793a\u5982\u4f55\u63d0\u53d6\u8fd9\u4e9b\u5173\u952e\u6307\u6807\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>fields = &#91;\"MarketCapitalization\",&nbsp;\"TrailingPE\",&nbsp;\"PriceBookMRQ\",<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"ReturnOnEquityTTM\",&nbsp;\"DividendYield\",&nbsp;\"QuarterlyRevenueGrowthYOY\"]<\/code><code>fundamentals = {}<\/code><code>for&nbsp;f&nbsp;in&nbsp;fields:<\/code><code>&nbsp; &nbsp; fundamentals&#91;f] = (<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;data.get(\"Highlights\", {}).get(f)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; or&nbsp;data.get(\"Valuation\", {}).get(f)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; or None<\/code><code>&nbsp; &nbsp; )<\/code><code>print(fundamentals)<\/code><\/code><\/pre>\n\n\n\n<p>\u73b0\u5728\u4f60\u5c31\u6709\u4e86\u6574\u7406\u597d\u7684\u3001\u7ed3\u6784\u5316\u7684\u6838\u5fc3\u8d22\u52a1\u6570\u636e\uff01<\/p>\n\n\n\n<p><strong>\u7b2c4\u6b65\uff1a\u642d\u5efa\u53ef\u89c6\u5316\u770b\u677f<\/strong><\/p>\n\n\n\n<p><strong> \ud83d\udcc8<\/strong>&#8220;\u5bf9\u77e5\u8bc6\u7684\u6295\u8d44\u56de\u62a5\u7387\u6700\u9ad8\u3002&#8221; \u2014\u2014 \u672c\u6770\u660e\u00b7\u5bcc\u5170\u514b\u6797<\/p>\n\n\n\n<p>\u53ef\u89c6\u5316\u770b\u677f\u8ba9\u4f60\u7684\u5206\u6790\u66f4\u76f4\u89c2\u3001\u66f4\u6709\u8bf4\u670d\u529b\u3002\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u80fd\u591f\u5e76\u6392\u6bd4\u8f83\u591a\u5bb6\u516c\u53f8\u7684\u4ea4\u4e92\u5f0f\u770b\u677f\u3002<\/p>\n\n\n\n<p><strong>\u5b89\u88c5\u5fc5\u9700\u7684\u5de5\u5177\u5305\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip&nbsp;install streamlit pandas requests<\/code><\/pre>\n\n\n\n<p>\u521b\u5efa\u6587\u4ef6&nbsp;<code>f<\/code><code>dashboard.py<\/code>\uff0c\u5b8c\u6574\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>import&nbsp;streamlit&nbsp;as&nbsp;st<\/code><code>import&nbsp;pandas&nbsp;as&nbsp;pd<\/code><code>import&nbsp;requests<\/code><code>st.title(\"\ud83d\udcca Financial Data Dashboard with EODHD\")<\/code><code>api_token = st.text_input(\"Enter your EODHD API token\", type=\"password\")<\/code><code>tickers_input = st.text_area(\"Enter tickers (comma-separated, e.g. AAPL.US, MSFT.US)\")<\/code><code>if&nbsp;api_token and tickers_input:<\/code><code>&nbsp; &nbsp; tickers = &#91;t.strip()&nbsp;for&nbsp;t&nbsp;in&nbsp;tickers_input.split(\",\")&nbsp;if&nbsp;t.strip()]<\/code><code>&nbsp; &nbsp; data_rows = &#91;]<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;t&nbsp;in&nbsp;tickers:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; url = f\"https:\/\/eodhd.com\/api\/fundamentals\/{t}?api_token={api_token}&amp;fmt=json\"<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; r = requests.get(url)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;r.ok:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d = r.json()<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data_rows.append({<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"Ticker\": t,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"MarketCap\": d&#91;\"Highlights\"].get(\"MarketCapitalization\"),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"P\/E\": d&#91;\"Valuation\"].get(\"TrailingPE\"),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"P\/B\": d&#91;\"Valuation\"].get(\"PriceBookMRQ\"),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"ROE\": d&#91;\"Highlights\"].get(\"ReturnOnEquityTTM\"),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"DivYield\": d&#91;\"Highlights\"].get(\"DividendYield\"),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\"RevGrowthQ\": d&#91;\"Highlights\"].get(\"QuarterlyRevenueGrowthYOY\"),<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<\/code><code>&nbsp; &nbsp; df = pd.DataFrame(data_rows)<\/code><code>&nbsp; &nbsp; st.dataframe(df)<\/code><code>&nbsp; &nbsp; st.bar_chart(df.set_index(\"Ticker\")&#91;&#91;\"ROE\",&nbsp;\"DivYield\",&nbsp;\"RevGrowthQ\"]].fillna(0))<\/code><\/code><\/pre>\n\n\n\n<p><strong>\u8fd0\u884c\u770b\u677f\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>streamlit&nbsp;run fdashboard.py<\/code><\/pre>\n\n\n\n<p>\u51e0\u79d2\u949f\u5185\uff0c\u4f60\u5c31\u80fd\u770b\u5230\u591a\u5bb6\u516c\u53f8\u7684\u8d22\u52a1\u6570\u636e\u5e76\u6392\u5c55\u793a\uff0c\u8fd8\u6709\u76f4\u89c2\u7684\u5bf9\u6bd4\u56fe\u8868\uff01<\/p>\n\n\n\n<p><strong>\u7b2c5\u6b65\uff1a\u63a5\u5165ChatGPT\u667a\u80fd\u5206\u6790 \ud83e\udd16<\/strong><\/p>\n\n\n\n<p>\u6211\u4eec\u8981\u8ba9ChatGPT\u628a\u51b7\u51b0\u51b0\u7684\u8d22\u52a1\u6570\u636e\u8f6c\u5316\u4e3a\u901a\u4fd7\u6613\u61c2\u7684\u6295\u8d44\u5206\u6790\u3002<\/p>\n\n\n\n<p><strong>\u5b89\u88c5OpenAI\u5de5\u5177\u5305\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip&nbsp;install openai<\/code><\/pre>\n\n\n\n<p><strong>\u8ba9AI\u8bfb\u61c2\u8d22\u52a1\u6570\u636e\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>from openai import OpenAI<\/code><code>import json<\/code><code>client = OpenAI(api_key=\"YOUR_OPENAI_KEY\")<\/code><code>prompt = f\"\"\"<\/code><code>You are a financial analyst. Based on this data:<\/code><code>{json.dumps(fundamentals, indent=2)}<\/code><code>Explain in under 100 words whether this stock appears undervalued or overvalued.<\/code><code>\"\"\"<\/code><code>completion = client.chat.completions.create(<\/code><code>&nbsp; &nbsp; model=\"gpt-4-turbo\",<\/code><code>&nbsp; &nbsp; messages=&#91;{\"role\":&nbsp;\"user\",&nbsp;\"content\": prompt}]<\/code><code>)<\/code><code>print(completion.choices&#91;0].message.content)<\/code><\/code><\/pre>\n\n\n\n<p><strong>\u793a\u4f8b\u8f93\u51fa\u6548\u679c\uff1a<\/strong><\/p>\n\n\n\n<p><strong>\ud83e\udd16 AI\u5206\u6790\u5e08\u89c2\u70b9\uff1a<\/strong>&#8220;\u82f9\u679c\u516c\u53f8\u51c0\u8d44\u4ea7\u6536\u76ca\u7387\u8d85\u8fc7140%\uff0c\u8bf4\u660e\u8d5a\u94b1\u80fd\u529b\u6781\u5f3a\uff0c\u7ba1\u7406\u5c42\u975e\u5e38\u4f1a\u4e3a\u80a1\u4e1c\u521b\u9020\u4ef7\u503c\u3002\u4f46\u5e02\u76c8\u7387\u8d85\u8fc730\u500d\uff0c\u76f8\u6bd4\u5386\u53f2\u6c34\u5e73\u504f\u8d35\u3002\u80a1\u606f\u7387\u8f83\u4f4e\uff0c\u66f4\u9002\u5408\u8ffd\u6c42\u6210\u957f\u800c\u975e\u6536\u5165\u7684\u6295\u8d44\u8005\u3002\u5efa\u8bae\u7b49\u5f85\u66f4\u597d\u7684\u4e70\u5165\u65f6\u673a\u3002&#8221;<\/p>\n\n\n\n<p>\ud83c\udf89 \u606d\u559c\uff01\u4f60\u521a\u521a\u628a\u8d22\u52a1\u6570\u636e\u8f6c\u5316\u4e3a\u4e86\u4e13\u4e1a\u7684\u6295\u8d44\u89c1\u89e3\u3002<\/p>\n\n\n\n<p><strong>\u7b2c6\u6b65\uff1a\u8fdb\u9636\u529f\u80fd\u6269\u5c55 \ud83c\udfaf<\/strong><\/p>\n\n\n\n<p>\u606d\u559c\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u6838\u5fc3\u529f\u80fd\uff01\u4e0b\u9762\u662f\u4e00\u4e9b\u6269\u5c55\u65b9\u5411\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u529f\u80fd\u6a21\u5757<\/strong><\/th><th><strong>\u5b9e\u73b0\u96be\u5ea6<\/strong><\/th><th><strong>\u5b9e\u7528\u4ef7\u503c<\/strong><\/th><th><strong>\u9002\u7528\u4eba\u7fa4<\/strong><\/th><\/tr><\/thead><tbody><tr><td>\u5386\u53f2\u8d70\u52bf\u56fe\u8868<\/td><td>\u2605\u2605\u2606\u2606\u2606<\/td><td>\u2605\u2605\u2605\u2605\u2606<\/td><td>\u6240\u6709\u6295\u8d44\u8005<\/td><\/tr><tr><td>PDF\u6295\u8d44\u62a5\u544a<\/td><td>\u2605\u2605\u2605\u2606\u2606<\/td><td>\u2605\u2605\u2605\u2605\u2605<\/td><td>\u4e13\u4e1a\u6295\u8d44\u8005<\/td><\/tr><tr><td>\u884c\u4e1a\u677f\u5757\u5bf9\u6bd4<\/td><td>\u2605\u2605\u2605\u2605\u2606<\/td><td>\u2605\u2605\u2605\u2605\u2606<\/td><td>\u7ec4\u5408\u6295\u8d44\u8005<\/td><\/tr><tr><td>\u6307\u6807\u9884\u8b66\u7cfb\u7edf<\/td><td>\u2605\u2605\u2605\u2606\u2606<\/td><td>\u2605\u2605\u2605\u2605\u2605<\/td><td>\u957f\u671f\u6295\u8d44\u8005<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\ud83c\udfa8 \u8fdb\u9636\u529f\u80fd\u4ee3\u7801\u793a\u4f8b<\/strong><\/h3>\n\n\n\n<p><strong>\u6dfb\u52a0\u5386\u53f2\u4ef7\u683c\u8d70\u52bf\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u83b7\u53d6\u5386\u53f2\u4ef7\u683c\u6570\u636e&nbsp;<\/code><code>price_url&nbsp;= f\"https:\/\/eodhd.com\/api\/eod\/{ticker}?api_token={api_token}&amp;period=d&amp;from=2023-01-01\"&nbsp;price_data = requests.get(price_url).json()&nbsp;<\/code><code><\/code><code># \u7528streamlit\u521b\u5efa\u4ef7\u683c\u8d70\u52bf\u56fe&nbsp;<\/code><code>price_df&nbsp;= pd.DataFrame(price_data) st.line_chart(price_df.set_index('date')&#91;'close'])<\/code><\/code><\/pre>\n\n\n\n<p><strong>\u751f\u6210PDF\u62a5\u544a\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>from&nbsp;reportlab.pdfgen&nbsp;import&nbsp;canvas&nbsp;# \u521b\u5efaPDF\u62a5\u544a\uff0c\u7ed3\u5408\u8d22\u52a1\u6307\u6807\u548cAI\u5206\u6790&nbsp;<\/code><code>def&nbsp;generate_report(company_data, ai_analysis): c = canvas.Canvas(f\"{ticker}_\u6295\u8d44\u5206\u6790\u62a5\u544a.pdf\")&nbsp;<\/code><code><\/code><code># \u6dfb\u52a0\u8d22\u52a1\u6570\u636e\u548cAI\u5206\u6790\u5185\u5bb9&nbsp;<\/code><code>c.drawString(100,&nbsp;750,&nbsp;f\"{ticker}&nbsp;\u6295\u8d44\u5206\u6790\u62a5\u544a\")&nbsp;# ... \u66f4\u591aPDF\u751f\u6210\u4ee3\u7801<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\ud83d\udd25 \u5b9e\u6218\u6848\u4f8b\uff1a\u82f9\u679cvs\u5fae\u8f6f\u8d22\u52a1\u5bf9\u51b3<\/strong><\/h2>\n\n\n\n<p>\u8ba9\u6211\u4eec\u7528\u521a\u624d\u642d\u5efa\u7684\u7cfb\u7edf\u6765\u5b9e\u9645\u5206\u6790\u82f9\u679c\u548c\u5fae\u8f6f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u8d22\u52a1\u6307\u6807<\/strong><\/th><th><strong>\u82f9\u679c(AAPL)<\/strong><\/th><th><strong>\u5fae\u8f6f(MSFT)<\/strong><\/th><th><strong>AI\u5206\u6790\u7ed3\u8bba<\/strong><\/th><\/tr><\/thead><tbody><tr><td>\u5e02\u76c8\u7387<\/td><td>32\u500d<\/td><td>35\u500d<\/td><td>\u4e24\u5bb6\u4f30\u503c\u90fd\u4e0d\u4fbf\u5b9c\uff0c\u5904\u4e8e\u5386\u53f2\u8f83\u9ad8\u6c34\u5e73<\/td><\/tr><tr><td>ROE\u51c0\u8d44\u4ea7\u6536\u76ca\u7387<\/td><td>147%<\/td><td>42%<\/td><td>\u82f9\u679c\u7684\u8d5a\u94b1\u6548\u7387\u660e\u663e\u66f4\u9ad8\uff0c\u8d44\u672c\u8fd0\u7528\u66f4\u9ad8\u6548<\/td><\/tr><tr><td>\u80a1\u606f\u7387<\/td><td>0.5%<\/td><td>0.8%<\/td><td>\u5fae\u8f6f\u5206\u7ea2\u66f4\u6177\u6168\uff0c\u9002\u5408\u6536\u5165\u578b\u6295\u8d44\u8005<\/td><\/tr><tr><td>\u8425\u6536\u589e\u957f\u7387<\/td><td>8%<\/td><td>16%<\/td><td>\u5fae\u8f6f\u589e\u957f\u66f4\u5feb\uff0c\u4e91\u8ba1\u7b97\u4e1a\u52a1\u63a8\u52a8\u5f3a\u52b2\u589e\u957f<\/td><\/tr><tr><td>\u603b\u5e02\u503c<\/td><td>3.1\u4e07\u4ebf\u7f8e\u5143<\/td><td>2.8\u4e07\u4ebf\u7f8e\u5143<\/td><td>\u4e24\u5bb6\u90fd\u662f\u5de8\u578b\u516c\u53f8\uff0c\u82f9\u679c\u7565\u80dc\u4e00\u7b79<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\ud83e\udd16 AI\u7efc\u5408\u5206\u6790\u7ed3\u8bba<\/strong><\/h3>\n\n\n\n<p><strong>\u82f9\u679c\uff1a<\/strong>\u76c8\u5229\u80fd\u529b\u6781\u5f3a\uff0cROE\u9ad8\u8fbe147%\u8bf4\u660e\u7ba1\u7406\u5c42\u975e\u5e38\u4f1a\u8d5a\u94b1\uff0c\u4f46\u4f30\u503c\u504f\u8d35\u4e14\u589e\u957f\u653e\u7f13\uff0c\u9002\u5408\u957f\u671f\u4ef7\u503c\u6295\u8d44\u8005\u5728\u5408\u9002\u4ef7\u4f4d\u4e70\u5165\u3002<\/p>\n\n\n\n<p><strong>\u5fae\u8f6f\uff1a<\/strong>\u589e\u957f\u52bf\u5934\u66f4\u5f3a\u52b2\uff0c\u4e91\u8ba1\u7b97Azure\u4e1a\u52a1\u9a71\u52a8\u8425\u6536\u5feb\u901f\u589e\u957f\uff0c\u5206\u7ea2\u653f\u7b56\u66f4\u53cb\u597d\uff0c\u867d\u7136\u4f30\u503c\u4e0d\u4fbf\u5b9c\u4f46\u6210\u957f\u6027\u66f4\u597d\u3002<\/p>\n\n\n\n<p><strong>\u6295\u8d44\u5efa\u8bae\uff1a<\/strong>\u6210\u957f\u578b\u6295\u8d44\u8005\u53ef\u5173\u6ce8\u5fae\u8f6f\uff0c\u4ef7\u503c\u578b\u6295\u8d44\u8005\u53ef\u7b49\u5f85\u82f9\u679c\u56de\u8c03\u673a\u4f1a\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\ud83d\udcdd \u603b\u7ed3\u4e0e\u5c55\u671b<\/strong><\/h2>\n\n\n\n<p>\u901a\u8fc7\u8fd9\u4e2a\u6559\u7a0b\uff0c\u6211\u4eec\u6210\u529f\u6253\u9020\u4e86\u4e00\u4e2a\u96c6\u6570\u636e\u83b7\u53d6\u3001\u53ef\u89c6\u5316\u5c55\u793a\u3001AI\u667a\u80fd\u5206\u6790\u4e8e\u4e00\u4f53\u7684\u6295\u8d44\u5206\u6790\u7cfb\u7edf\u3002\u8fd9\u5957\u5de5\u5177\u4e0d\u4ec5\u8ba9\u666e\u901a\u6295\u8d44\u8005\u80fd\u591f\u83b7\u53d6\u4e13\u4e1a\u7ea7\u7684\u8d22\u52a1\u6570\u636e\uff0c\u66f4\u91cd\u8981\u7684\u662f\u901a\u8fc7ChatGPT\u7684\u52a0\u6301\uff0c\u8ba9\u6bcf\u4e2a\u4eba\u90fd\u80fd\u7406\u89e3\u8fd9\u4e9b\u6570\u636e\u80cc\u540e\u7684\u6295\u8d44\u542b\u4e49\uff0c\u771f\u6b63\u5b9e\u73b0\u4ece&#8221;\u770b\u4ef7\u683c&#8221;\u5230&#8221;\u770b\u4ef7\u503c&#8221;\u7684\u6295\u8d44\u7406\u5ff5\u8f6c\u53d8\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\ud83c\udfaf \u6838\u5fc3\u8981\u70b9\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u6280\u672f\u6808\u7ec4\u5408\uff1a<\/strong>Python + EODHD\u6570\u636e\u63a5\u53e3 + Streamlit\u53ef\u89c6\u5316 + ChatGPT\u5206\u6790\uff0c\u56db\u8005\u7ed3\u5408\u5a01\u529b\u65e0\u7a77<\/li>\n\n\n\n<li><strong>\u5173\u952e\u8d22\u52a1\u6307\u6807\uff1a<\/strong>\u91cd\u70b9\u5173\u6ce8\u5e02\u76c8\u7387(\u4f30\u503c)\u3001ROE(\u76c8\u5229\u6548\u7387)\u3001\u8425\u6536\u589e\u957f(\u6210\u957f\u6027)\u3001\u80a1\u606f\u7387(\u5206\u7ea2)\u56db\u5927\u6838\u5fc3\u6307\u6807<\/li>\n\n\n\n<li><strong>\u5de5\u5177\u7279\u70b9\uff1a<\/strong>\u514d\u8d39\u5f00\u6e90\u3001\u64cd\u4f5c\u7b80\u5355\u3001\u5206\u6790\u4e13\u4e1a\u3001\u9002\u5408\u521d\u5b66\u8005\u5feb\u901f\u4e0a\u624b\u4ef7\u503c\u6295\u8d44<\/li>\n\n\n\n<li><strong>\u9002\u7528\u4eba\u7fa4\uff1a<\/strong>\u60f3\u8981\u544a\u522b\u97ed\u83dc\u547d\u8fd0\u7684\u666e\u901a\u6295\u8d44\u8005\u3001\u5bf9\u91cf\u5316\u6295\u8d44\u611f\u5174\u8da3\u7684\u7a0b\u5e8f\u5458\u3001\u8ffd\u6c42\u7406\u6027\u6295\u8d44\u7684\u4ef7\u503c\u6295\u8d44\u8005<\/li>\n\n\n\n<li><strong>\u5b66\u4e60\u5efa\u8bae\uff1a<\/strong>\u4ece\u6a21\u4eff\u5f00\u59cb\uff0c\u9010\u6b65\u7406\u89e3\u6bcf\u4e2a\u6307\u6807\u7684\u542b\u4e49\uff0c\u7ed3\u5408AI\u5206\u6790\u57f9\u517b\u6295\u8d44\u76f4\u89c9\uff0c\u6700\u7ec8\u5f62\u6210\u81ea\u5df1\u7684\u6295\u8d44\u4f53\u7cfb<\/li>\n<\/ol>\n\n\n\n<p>&#8220;\u5728\u6295\u8d44\u4e2d\uff0c\u8212\u9002\u7684\u5f80\u5f80\u4e0d\u8d5a\u94b1\u3002&#8221; \u2014\u2014 \u7f57\u4f2f\u7279\u00b7\u963f\u8bfa\u7279<\/p>\n\n\n\n<p>\u5927\u591a\u6570\u4eba\u88ab\u6570\u5b57\u6df9\u6ca1\uff0c\u53ea\u6709\u5c11\u6570\u4eba\u628a\u6570\u5b57\u8f6c\u5316\u4e3a\u77e5\u8bc6\u3002\u800c\u73b0\u5728\uff0c\u501f\u52a9Python\u548cChatGPT\u7684\u529b\u91cf\uff0c\u4f60\u4e5f\u53ef\u4ee5\u6210\u4e3a\u90a3\u5c11\u6570\u4eba\u4e2d\u7684\u4e00\u5458\u3002<\/p>\n\n\n\n<p><strong>\u8bb0\u4f4f\uff1a<\/strong>\u5de5\u5177\u53ea\u662f\u8f85\u52a9\uff0c\u771f\u6b63\u7684\u6295\u8d44\u667a\u6167\u6765\u81ea\u4e8e\u6301\u7eed\u5b66\u4e60\u548c\u7406\u6027\u601d\u8003\u3002\u613f\u8fd9\u5957\u5de5\u5177\u80fd\u5e2e\u4f60\u5728\u6295\u8d44\u8def\u4e0a\u8d70\u5f97\u66f4\u7a33\u3001\u770b\u5f97\u66f4\u8fdc\uff01<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>#Python\u91cf\u5316\u6295\u8d44&nbsp;#ChatGPT&nbsp;#\u80a1\u7968\u5206\u6790&nbsp;#\u57fa\u672c\u9762\u5206\u6790&nbsp;#AI\u6295\u8d44&nbsp;#\u91cf\u5316\u4ea4\u6613&nbsp;#\u8d22\u52a1\u6570\u636e\u5206\u6790&nbsp;#\u4ef7\u503c\u6295\u8d44&nbsp;#ROE&nbsp;#\u5e02\u76c8\u7387<\/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\/11\/18\/%e5%91%8a%e5%88%ab%e9%9f%ad%e8%8f%9c%e5%91%bd%e8%bf%90%ef%bc%81%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e7%94%a8ai%e6%89%93%e9%80%a0%e7%a7%81%e4%ba%ba%e6%8a%95%e8%b5%84%e9%a1%be%e9%97%ae\/\">Continue reading<span class=\"screen-reader-text\">\u544a\u522b\u97ed\u83dc\u547d\u8fd0\uff01\u624b\u628a\u624b\u6559\u4f60\u7528AI\u6253\u9020\u79c1\u4eba\u6295\u8d44\u987e\u95ee<\/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-2978","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\/2978","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=2978"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2978\/revisions"}],"predecessor-version":[{"id":2979,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2978\/revisions\/2979"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=2978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=2978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=2978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}