{"id":1166131,"date":"2025-01-15T15:28:38","date_gmt":"2025-01-15T07:28:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1166131.html"},"modified":"2025-01-15T15:28:41","modified_gmt":"2025-01-15T07:28:41","slug":"wind-python%e6%8e%a5%e5%8f%a3%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1166131.html","title":{"rendered":"wind python\u63a5\u53e3\u5982\u4f55\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25210324\/fa641aab-7ad0-4e93-82dd-b7cb35a349fd.webp\" alt=\"wind python\u63a5\u53e3\u5982\u4f55\u4f7f\u7528\u6559\u7a0b\" \/><\/p>\n<p><p> <strong>\u4e00\u3001\u5b89\u88c5 WindPy \u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u4f7f\u7528 Wind Python \u63a5\u53e3\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5 WindPy \u6a21\u5757\u3002<strong>\u4f7f\u7528 pip \u5b89\u88c5 WindPy \u6a21\u5757\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u5bfc\u5165 WindPy \u6a21\u5757<\/strong>\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5 WindPy\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install WindPy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>WindPy \u6a21\u5757\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u8fd8\u9700\u8981\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u5e76\u786e\u4fdd\u7cfb\u7edf\u80fd\u591f\u627e\u5230 WindPy \u5e93\u6587\u4ef6\u3002\u7136\u540e\uff0c\u5728 Python \u811a\u672c\u4e2d\u5bfc\u5165 WindPy \u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from WindPy import w<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5176\u4e2d\u7684\u4e00\u70b9\uff1a<strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong>\u3002<\/p>\n<\/p>\n<p><p><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong>\uff1a\u5728\u5b89\u88c5 WindPy \u6a21\u5757\u540e\uff0c\u60a8\u9700\u8981\u5c06 WindPy \u5b89\u88c5\u76ee\u5f55\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684 PATH \u73af\u5883\u53d8\u91cf\u4e2d\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u7cfb\u7edf\u80fd\u591f\u627e\u5230 WindPy \u7684\u52a8\u6001\u94fe\u63a5\u5e93\u6587\u4ef6\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u754c\u9762\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u627e\u5230\u540d\u4e3a <code>PATH<\/code> \u7684\u53d8\u91cf\uff0c\u53cc\u51fb\u8fdb\u884c\u7f16\u8f91\u3002<\/li>\n<li>\u5c06 WindPy \u5b89\u88c5\u76ee\u5f55\uff08\u4f8b\u5982 <code>C:\\Program Files (x86)\\Wind\\Wind.NET.Client<\/code>\uff09\u6dfb\u52a0\u5230 PATH \u53d8\u91cf\u4e2d\u3002<\/li>\n<li>\u4fdd\u5b58\u66f4\u6539\u5e76\u91cd\u65b0\u542f\u52a8\u7ec8\u7aef\u6216 IDE\u3002<\/li>\n<\/ol>\n<p><p><strong>\u4e8c\u3001\u8fde\u63a5 Wind \u670d\u52a1\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528 WindPy \u8fdb\u884c\u6570\u636e\u67e5\u8be2\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u8fde\u63a5\u5230 Wind \u670d\u52a1\u5668\u3002\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528 <code>w.start()<\/code> \u65b9\u6cd5\u6765\u5efa\u7acb\u8fde\u63a5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">w.start()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7 <code>w.isconnected()<\/code> \u65b9\u6cd5\u6765\u68c0\u67e5\u8fde\u63a5\u72b6\u6001\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if w.isconnected():<\/p>\n<p>    print(&quot;Connected to Wind server&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;F<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led to connect to Wind server&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4e09\u3001\u67e5\u8be2\u6570\u636e<\/strong><\/p>\n<\/p>\n<p><p>WindPy \u63d0\u4f9b\u4e86\u591a\u79cd\u6570\u636e\u67e5\u8be2\u65b9\u6cd5\uff0c\u4f8b\u5982 <code>w.wsd<\/code>\u3001<code>w.wsi<\/code>\u3001<code>w.wst<\/code> \u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u6570\u636e\u67e5\u8be2\u65b9\u6cd5\u53ca\u5176\u4f7f\u7528\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>wsd<\/strong>\uff1a\u7528\u4e8e\u83b7\u53d6\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u4f8b\u5982\u80a1\u7968\u65e5\u7ebf\u6570\u636e\u3002<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">data = w.wsd(&quot;000001.SZ&quot;, &quot;close,open,high,low,volume&quot;, &quot;2022-01-01&quot;, &quot;2022-12-31&quot;, &quot;&quot;)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>wsi<\/strong>\uff1a\u7528\u4e8e\u83b7\u53d6\u5206\u949f\u7ea7\u522b\u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">data = w.wsi(&quot;000001.SZ&quot;, &quot;close,open,high,low,volume&quot;, &quot;2022-01-01 09:00:00&quot;, &quot;2022-01-01 15:00:00&quot;, &quot;&quot;)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>wst<\/strong>\uff1a\u7528\u4e8e\u83b7\u53d6\u9010\u7b14\u6210\u4ea4\u6570\u636e\u3002<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">data = w.wst(&quot;000001.SZ&quot;, &quot;tradecode,price,volume&quot;, &quot;2022-01-01 09:30:00&quot;, &quot;2022-01-01 15:00:00&quot;, &quot;&quot;)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u56db\u3001\u6570\u636e\u5904\u7406<\/strong><\/p>\n<\/p>\n<p><p>\u83b7\u53d6\u5230\u6570\u636e\u540e\uff0c\u901a\u5e38\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u5904\u7406\u548c\u5206\u6790\u3002WindPy \u8fd4\u56de\u7684\u6570\u636e\u7ed3\u6784\u4e3a <code>WindData<\/code> \u5bf9\u8c61\uff0c\u5305\u542b\u4e24\u4e2a\u5c5e\u6027\uff1a<code>ErrorCode<\/code> \u548c <code>Data<\/code>\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8bbf\u95ee\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if data.ErrorCode != 0:<\/p>\n<p>    print(&quot;Error:&quot;, data.ErrorCode)<\/p>\n<p>else:<\/p>\n<p>    print(data.Data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u53ef\u4ee5\u5c06\u6570\u636e\u8f6c\u6362\u4e3a Pandas DataFrame \u8fdb\u884c\u8fdb\u4e00\u6b65\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>df = pd.DataFrame(data.Data, index=data.Fields, columns=data.Times).T<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4e94\u3001\u5176\u4ed6\u5e38\u89c1\u529f\u80fd<\/strong><\/p>\n<\/p>\n<ol>\n<li><strong>\u83b7\u53d6\u5b9e\u65f6\u884c\u60c5\u6570\u636e<\/strong><\/li>\n<\/ol>\n<p><p>WindPy \u63d0\u4f9b\u4e86 <code>w.wsq<\/code> \u65b9\u6cd5\u7528\u4e8e\u83b7\u53d6\u5b9e\u65f6\u884c\u60c5\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">data = w.wsq(&quot;000001.SZ&quot;, &quot;rt_last,rt_open,rt_high,rt_low,rt_vol&quot;)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u83b7\u53d6\u8d22\u52a1\u6570\u636e<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7 <code>w.wss<\/code> \u65b9\u6cd5\u83b7\u53d6\u8d22\u52a1\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">data = w.wss(&quot;000001.SZ&quot;, &quot;eps_basic,roe,roa&quot;)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u83b7\u53d6\u5e02\u573a\u7edf\u8ba1\u6570\u636e<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7 <code>w.edb<\/code> \u65b9\u6cd5\u83b7\u53d6\u5b8f\u89c2\u7ecf\u6d4e\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">data = w.edb(&quot;M0000013&quot;, &quot;2022-01-01&quot;, &quot;2022-12-31&quot;, &quot;&quot;)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"4\">\n<li><strong>\u8ba1\u7b97\u6307\u6807<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528 <code>w.tdays<\/code> \u65b9\u6cd5\u83b7\u53d6\u4ea4\u6613\u65e5\u5386\uff0c\u5e76\u8ba1\u7b97\u76f8\u5173\u6307\u6807\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">trade_days = w.tdays(&quot;2022-01-01&quot;, &quot;2022-12-31&quot;, &quot;&quot;).Data[0]<\/p>\n<p>print(trade_days)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u516d\u3001\u4f7f\u7528 WindPy \u8fdb\u884c\u7b56\u7565\u56de\u6d4b<\/strong><\/p>\n<\/p>\n<p><p>WindPy \u8fd8\u53ef\u4ee5\u4e0e\u5176\u4ed6\u56de\u6d4b\u6846\u67b6\uff08\u5982 QuantLib\u3001Backtrader \u7b49\uff09\u7ed3\u5408\u4f7f\u7528\uff0c\u8fdb\u884c\u7b56\u7565\u56de\u6d4b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528 WindPy \u83b7\u53d6\u6570\u636e\u5e76\u8fdb\u884c\u7b56\u7565\u56de\u6d4b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5\u6240\u9700\u7684\u5e93\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">pip install backtrader<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u7f16\u5199\u7b56\u7565\u56de\u6d4b\u811a\u672c\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import backtrader as bt<\/p>\n<p>from WindPy import w<\/p>\n<p>import pandas as pd<\/p>\n<h2><strong>\u5b9a\u4e49\u7b56\u7565<\/strong><\/h2>\n<p>class SimpleStrategy(bt.Strategy):<\/p>\n<p>    def __init__(self):<\/p>\n<p>        self.sma = bt.indicators.SimpleMovingAverage(self.data.close, period=10)<\/p>\n<p>    def next(self):<\/p>\n<p>        if self.data.close[0] &gt; self.sma[0]:<\/p>\n<p>            self.buy(size=100)<\/p>\n<p>        elif self.data.close[0] &lt; self.sma[0]:<\/p>\n<p>            self.sell(size=100)<\/p>\n<h2><strong>\u83b7\u53d6\u6570\u636e<\/strong><\/h2>\n<p>w.start()<\/p>\n<p>data = w.wsd(&quot;000001.SZ&quot;, &quot;close,open,high,low,volume&quot;, &quot;2022-01-01&quot;, &quot;2022-12-31&quot;, &quot;&quot;)<\/p>\n<p>df = pd.DataFrame(data.Data, index=data.Fields, columns=data.Times).T<\/p>\n<h2><strong>\u8f6c\u6362\u4e3a Backtrader \u6570\u636e\u683c\u5f0f<\/strong><\/h2>\n<p>data_feed = bt.feeds.PandasData(dataname=df)<\/p>\n<h2><strong>\u521b\u5efa\u56de\u6d4b\u5f15\u64ce<\/strong><\/h2>\n<p>cerebro = bt.Cerebro()<\/p>\n<p>cerebro.addstrategy(SimpleStrategy)<\/p>\n<p>cerebro.adddata(data_feed)<\/p>\n<h2><strong>\u8fd0\u884c\u56de\u6d4b<\/strong><\/h2>\n<p>cerebro.run()<\/p>\n<p>cerebro.plot()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4e03\u3001WindPy \u5e38\u89c1\u9519\u8bef\u5904\u7406<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528 WindPy \u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u7684\u9519\u8bef\u548c\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u9519\u8bef\u53ca\u5176\u5904\u7406\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u8fde\u63a5\u9519\u8bef<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u65e0\u6cd5\u8fde\u63a5\u5230 Wind \u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u662f\u5426\u6b63\u5e38\uff0c\u786e\u4fdd\u9632\u706b\u5899\u6ca1\u6709\u963b\u6b62\u8fde\u63a5\uff0c\u5e76\u786e\u8ba4 WindPy \u5b89\u88c5\u76ee\u5f55\u5df2\u6b63\u786e\u914d\u7f6e\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6570\u636e\u8bf7\u6c42\u9519\u8bef<\/strong><\/li>\n<\/ol>\n<p><p>\u5982\u679c\u6570\u636e\u8bf7\u6c42\u8fd4\u56de\u9519\u8bef\u4ee3\u7801\uff0c\u53ef\u4ee5\u53c2\u8003 WindPy \u5b98\u65b9\u6587\u6863\u4e2d\u7684\u9519\u8bef\u4ee3\u7801\u8bf4\u660e\uff0c\u68c0\u67e5\u8bf7\u6c42\u53c2\u6570\u662f\u5426\u6b63\u786e\uff0c\u5e76\u786e\u4fdd\u6240\u8bf7\u6c42\u7684\u6570\u636e\u5728 Wind \u6570\u636e\u5e93\u4e2d\u5b58\u5728\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u6570\u636e\u5904\u7406\u9519\u8bef<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5904\u7406\u6570\u636e\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6570\u636e\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u6570\u636e\u7f3a\u5931\u7684\u95ee\u9898\u3002\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5 <code>WindData<\/code> \u5bf9\u8c61\u7684 <code>ErrorCode<\/code> \u5c5e\u6027\u6765\u5224\u65ad\u8bf7\u6c42\u662f\u5426\u6210\u529f\uff0c\u5e76\u4f7f\u7528 Pandas \u7b49\u5de5\u5177\u5bf9\u6570\u636e\u8fdb\u884c\u9884\u5904\u7406\u548c\u6e05\u6d17\u3002<\/p>\n<\/p>\n<p><p><strong>\u516b\u3001WindPy \u4e0e\u5176\u4ed6\u6570\u636e\u6e90\u7684\u6bd4\u8f83<\/strong><\/p>\n<\/p>\n<p><p>WindPy \u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u91d1\u878d\u6570\u636e\u63a5\u53e3\uff0c\u4f46\u5728\u9009\u62e9\u6570\u636e\u6e90\u65f6\uff0c\u4e5f\u53ef\u4ee5\u8003\u8651\u5176\u4ed6\u9009\u62e9\uff0c\u5982 Tushare\u3001Yahoo Finance\u3001Alpha Vantage \u7b49\u3002\u4ee5\u4e0b\u662f WindPy \u4e0e\u5176\u4ed6\u6570\u636e\u6e90\u7684\u6bd4\u8f83\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u8986\u76d6\u8303\u56f4<\/strong><\/li>\n<\/ol>\n<p><p>WindPy \u63d0\u4f9b\u4e86\u5e7f\u6cdb\u7684\u91d1\u878d\u6570\u636e\uff0c\u5305\u62ec\u80a1\u7968\u3001\u503a\u5238\u3001\u671f\u8d27\u3001\u57fa\u91d1\u3001\u5916\u6c47\u3001\u5b8f\u89c2\u7ecf\u6d4e\u6570\u636e\u7b49\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0cTushare \u4e3b\u8981\u63d0\u4f9b\u4e2d\u56fd\u5e02\u573a\u7684\u6570\u636e\uff0cYahoo Finance \u548c Alpha Vantage \u5219\u4e3b\u8981\u63d0\u4f9b\u5168\u7403\u5e02\u573a\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6570\u636e\u66f4\u65b0\u9891\u7387<\/strong><\/li>\n<\/ol>\n<p><p>WindPy \u63d0\u4f9b\u7684\u5b9e\u65f6\u6570\u636e\u66f4\u65b0\u9891\u7387\u8f83\u9ad8\uff0c\u9002\u5408\u9ad8\u9891\u4ea4\u6613\u548c\u5b9e\u65f6\u76d1\u63a7\u3002\u800c Tushare\u3001Yahoo Finance \u548c Alpha Vantage \u7684\u6570\u636e\u66f4\u65b0\u9891\u7387\u76f8\u5bf9\u8f83\u4f4e\uff0c\u9002\u5408\u4e2d\u957f\u7ebf\u6295\u8d44\u8005\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u6570\u636e\u8d28\u91cf<\/strong><\/li>\n<\/ol>\n<p><p>WindPy \u63d0\u4f9b\u7684\u6570\u636e\u8d28\u91cf\u8f83\u9ad8\uff0c\u7ecf\u8fc7\u4e25\u683c\u5ba1\u6838\u548c\u6e05\u6d17\uff0c\u9002\u5408\u4e13\u4e1a\u6295\u8d44\u8005\u548c\u673a\u6784\u4f7f\u7528\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0cTushare\u3001Yahoo Finance \u548c Alpha Vantage \u7684\u6570\u636e\u8d28\u91cf\u76f8\u5bf9\u8f83\u4f4e\uff0c\u53ef\u80fd\u5b58\u5728\u6570\u636e\u7f3a\u5931\u6216\u9519\u8bef\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<ol start=\"4\">\n<li><strong>\u4f7f\u7528\u6210\u672c<\/strong><\/li>\n<\/ol>\n<p><p>WindPy \u662f\u4e00\u6b3e\u5546\u4e1a\u8f6f\u4ef6\uff0c\u9700\u8981\u8d2d\u4e70\u6388\u6743\u624d\u80fd\u4f7f\u7528\u3002\u800c Tushare \u63d0\u4f9b\u514d\u8d39\u548c\u4ed8\u8d39\u7248\u672c\uff0cYahoo Finance \u548c Alpha Vantage \u63d0\u4f9b\u514d\u8d39\u7684 API \u670d\u52a1\uff0c\u4f46\u53d7\u9650\u4e8e\u8c03\u7528\u6b21\u6570\u548c\u6570\u636e\u8303\u56f4\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e5d\u3001\u603b\u7ed3<\/strong><\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u8be6\u7ec6\u8bb2\u89e3\u4e86 WindPy \u7684\u5b89\u88c5\u3001\u914d\u7f6e\u3001\u8fde\u63a5\u3001\u6570\u636e\u67e5\u8be2\u3001\u6570\u636e\u5904\u7406\u3001\u7b56\u7565\u56de\u6d4b\u4ee5\u53ca\u5e38\u89c1\u9519\u8bef\u5904\u7406\u7b49\u65b9\u9762\u7684\u5185\u5bb9\u3002WindPy \u4f5c\u4e3a\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u91d1\u878d\u6570\u636e\u63a5\u53e3\uff0c\u9002\u5408\u4e13\u4e1a\u6295\u8d44\u8005\u548c\u673a\u6784\u4f7f\u7528\uff0c\u4f46\u5728\u9009\u62e9\u6570\u636e\u6e90\u65f6\uff0c\u4e5f\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8003\u8651\u5176\u4ed6\u9009\u62e9\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u60a8\u5728\u4f7f\u7528 WindPy \u8fdb\u884c\u91d1\u878d\u6570\u636e\u5206\u6790\u548c\u7b56\u7565\u56de\u6d4b\u65f6\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5b89\u88c5Wind Python\u63a5\u53e3\uff1f<\/strong><br \/>\u8981\u4f7f\u7528Wind Python\u63a5\u53e3\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u60a8\u5df2\u7ecf\u5728\u60a8\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86Python\u73af\u5883\u3002\u63a5\u4e0b\u6765\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7Wind\u8d44\u8baf\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7dWindPy\u5e93\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f7f\u7528pip\u547d\u4ee4\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u884c\u4e2d\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u5305\uff0c\u4f8b\u5982 <code>pip install numpy pandas<\/code>\u3002\u786e\u4fdd\u5728Python\u811a\u672c\u4e2d\u6b63\u786e\u5bfc\u5165WindPy\u5e93\uff0c\u901a\u5e38\u662f\u4f7f\u7528 <code>from WindPy import *<\/code>\u3002<\/p>\n<p><strong>Wind Python\u63a5\u53e3\u63d0\u4f9b\u4e86\u54ea\u4e9b\u4e3b\u8981\u529f\u80fd\uff1f<\/strong><br \/>Wind Python\u63a5\u53e3\u63d0\u4f9b\u4e86\u591a\u79cd\u529f\u80fd\uff0c\u5305\u62ec\u83b7\u53d6\u5b9e\u65f6\u884c\u60c5\u3001\u5386\u53f2\u6570\u636e\u3001\u8d22\u52a1\u6570\u636e\u548c\u5b8f\u89c2\u7ecf\u6d4e\u6570\u636e\u7b49\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u63a5\u53e3\u8fdb\u884c\u6570\u636e\u5206\u6790\u3001\u91cf\u5316\u6295\u8d44\u3001\u56de\u6d4b\u7b56\u7565\u7b49\u64cd\u4f5c\uff0c\u9002\u7528\u4e8e\u91d1\u878d\u5206\u6790\u5e08\u3001\u91cf\u5316\u7814\u7a76\u5458\u548c\u6295\u8d44\u8005\u3002\u63a5\u53e3\u8fd8\u652f\u6301\u591a\u79cd\u5e02\u573a\uff0c\u5305\u62ecA\u80a1\u3001\u6e2f\u80a1\u548c\u7f8e\u80a1\uff0c\u80fd\u591f\u6ee1\u8db3\u4e0d\u540c\u7528\u6237\u7684\u9700\u6c42\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Wind Python\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e\uff1f<\/strong><br \/>Wind Python\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e\u901a\u5e38\u4ee5\u6570\u636e\u6846\uff08DataFrame\uff09\u7684\u5f62\u5f0f\u5448\u73b0\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Pandas\u5e93\u5bf9\u5176\u8fdb\u884c\u5904\u7406\u3002\u901a\u8fc7\u6307\u5b9a\u5217\u548c\u884c\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u8fdb\u884c\u6570\u636e\u7b5b\u9009\u3001\u6e05\u6d17\u548c\u5206\u6790\u3002\u540c\u65f6\uff0cWindPy\u63a5\u53e3\u652f\u6301\u591a\u79cd\u6570\u636e\u683c\u5f0f\u7684\u8f6c\u6362\uff0c\u786e\u4fdd\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8f93\u51fa\u6240\u9700\u7684\u6570\u636e\u7c7b\u578b\uff0c\u4f8b\u5982CSV\u6216Excel\u683c\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e00\u3001\u5b89\u88c5 WindPy \u6a21\u5757 \u8981\u4f7f\u7528 Wind Python \u63a5\u53e3\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5 WindPy \u6a21\u5757\u3002\u4f7f\u7528 p [&hellip;]","protected":false},"author":3,"featured_media":1166139,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1166131"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1166131"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1166131\/revisions"}],"predecessor-version":[{"id":1166141,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1166131\/revisions\/1166141"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1166139"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1166131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1166131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1166131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}