{"id":2278,"date":"2025-05-17T07:04:00","date_gmt":"2025-05-16T23:04:00","guid":{"rendered":"https:\/\/blog.laoyulaoyu.top\/?p=2278"},"modified":"2025-05-08T16:05:45","modified_gmt":"2025-05-08T08:05:45","slug":"rsistochastic%ef%bc%8c%e7%9c%8b%e9%87%8f%e5%8c%96%e9%ab%98%e6%89%8b%e5%a6%82%e4%bd%95%e7%94%a8%e3%80%90%e5%8f%8c%e7%ba%bf%e7%8c%8e%e6%89%8b%e3%80%91%e8%bd%bb%e6%9d%be%e8%b7%91%e8%b5%a2%e5%a4%a7","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/05\/17\/rsistochastic%ef%bc%8c%e7%9c%8b%e9%87%8f%e5%8c%96%e9%ab%98%e6%89%8b%e5%a6%82%e4%bd%95%e7%94%a8%e3%80%90%e5%8f%8c%e7%ba%bf%e7%8c%8e%e6%89%8b%e3%80%91%e8%bd%bb%e6%9d%be%e8%b7%91%e8%b5%a2%e5%a4%a7\/","title":{"rendered":"RSI+Stochastic\uff0c\u770b\u91cf\u5316\u9ad8\u624b\u5982\u4f55\u7528\u3010\u53cc\u7ebf\u730e\u624b\u3011\u8f7b\u677e\u8dd1\u8d62\u5927\u76d8 4 \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\/05\/09d601a8b1e03da24e52a2b9cba0c4a1a0b42e4d.webp\" alt=\"\" class=\"wp-image-5158\"\/><\/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>\u56e2\u961f\u82b1\u4e861\u4e2a\u6708\u6d4b\u8bd5\u51e0\u5341\u79cd\u6307\u6807\u7ec4\u5408\uff0c\u7ec8\u4e8e\u627e\u5230\u8fd9\u4e2a<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><strong>\u2018\u50bb\u74dc\u5f0f\u2019\u8d5a\u94b1\u65b9\u6cd5\u2014\u2014\u7528RSI\u548c\u968f\u673a\u6307\u6807\u53cc\u786e\u8ba4\u4e70\u5356\u70b9\u3002\u56de\u6d4b\u82f9\u679c\u80a1\u7968\u6536\u76ca69.8%\uff0c\u8dd1\u8d62\u5927\u76d84\u500d\u591a\uff01<\/strong><\/mark>\u4eca\u5929\u4e0d\u4ec5\u516c\u5f00\u7b56\u7565\u539f\u7406\uff0c\u8fd8\u4f1a\u624b\u628a\u624b\u6559\u4f60\u4ece\u73af\u5883\u642d\u5efa\u3001\u4ee3\u7801\u5b9e\u6218\u5230\u56de\u6d4b\u89e3\u8bfb\uff0c\u9644\u53ef\u89c6\u5316\u56fe\u793a\u548c\u4f18\u5316\u5efa\u8bae\uff0c\u96f6\u57fa\u7840\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u7b56\u7565\u539f\u7406<\/strong><\/h2>\n\n\n\n<p>\u5927\u591a\u6570\u6563\u6237\u7684\u65e5\u5e38\uff1a\u770b\u5230\u91d1\u53c9\u5c31\u51b2\u8fdb\u53bb\uff0c\u7ed3\u679c\u4e70\u5728\u5c71\u8170\uff1b\u53d1\u73b0\u6b7b\u53c9\u8d76\u7d27\u8dd1\uff0c\u5356\u5b8c\u5c31\u66b4\u6da8&#8230; \u5176\u5b9e\u4e0d\u662f\u6307\u6807\u6ca1\u7528\uff0c\u800c\u662f\u4f60\u5c11\u4e86\u4e2a&#8221;\u53cc\u4fdd\u9669&#8221;\uff01<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1 \u4e3a\u4ec0\u4e48\u8981\u7528\u53cc\u6307\u6807\uff1f<\/strong><\/h3>\n\n\n\n<p><strong>\u4f20\u7edf\u505a\u6cd5\u7684\u95ee\u9898<\/strong>\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u64cd\u4f5c\u65b9\u5f0f<\/th><th>\u80dc\u7387<\/th><th>\u5e74\u5e73\u5747\u6536\u76ca<\/th><th>\u6700\u5927\u56de\u64a4<\/th><\/tr><\/thead><tbody><tr><td>\u53ea\u770bRSI<\/td><td>52%<\/td><td>8%<\/td><td>-35%<\/td><\/tr><tr><td>\u53ea\u770b\u968f\u673a\u6307\u6807<\/td><td>49%<\/td><td>6%<\/td><td>-42%<\/td><\/tr><tr><td>\u6211\u4eec\u7684\u53cc\u6307\u6807\u6cd5<\/td><td>87%<\/td><td>23%<\/td><td>-24%<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5355\u7528 RSI \u6216\u968f\u673a\u5f80\u5f80\u4fe1\u53f7\u591a\u5374\u771f\u5047\u96be\u8fa8\uff1b\u800c\u53cc\u6307\u6807\u7ed3\u5408\uff0c\u65e2\u770b\u5927\u52bf\uff0c\u53c8\u6293\u52a8\u91cf\uff0c\u5c11\u9519\u8fc7\u4e5f\u5c11\u88ab\u5957\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>RSI\uff08\u529b\u5ea6\u6307\u6807\uff09<\/strong>\uff1a\u597d\u6bd4\u4f53\u6e29\u8ba1\uff0c\u544a\u8bc9\u4f60\u5e02\u573a\u662f\u5426&#8221;\u53d1\u70e7&#8221;\uff08\u8d85\u4e70\uff09\u6216&#8221;\u611f\u5192&#8221;\uff08\u8d85\u5356\uff09\u3002<\/li>\n\n\n\n<li><strong>\u968f\u673a\u6307\u6807<\/strong>\uff1a\u50cf\u901f\u5ea6\u8868\uff0c\u663e\u793a\u4ef7\u683c\u51b2\u5f97\u592a\u5feb\u8fd8\u662f\u5239\u8f66\u7ad9\u7a33\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u53cc\u6307\u6807 \u201c\u4e92\u76f8\u6253\u64c2\u201d \u540e\uff0c\u53ea\u6709\u5e7f\u4e49\u548c\u5fae\u89c2\u540c\u65f6\u6ee1\u8db3\uff0c\u4fe1\u53f7\u624d\u771f\u6b63\u9760\u8c31\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>1.2 RSI\uff1a\u4ef7\u683c\u7684\u201c\u60c5\u7eea\u6674\u96e8\u8868\u201d<\/strong><\/h3>\n\n\n\n<p>RSI\uff08\u76f8\u5bf9\u5f3a\u5f31\u6307\u6570\uff09\u662f\u4e00\u4e2a\u52a8\u91cf\u6307\u6807\uff0c\u7528\u6765\u5224\u65ad\u4ef7\u683c\u6da8\u8dcc\u7684\u529b\u5ea6\u3002\u5b83\u7684\u503c\u57280\u5230100\u4e4b\u95f4\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9ad8\u4e8e70<\/strong>\uff1a\u5e02\u573a\u201c\u8d85\u4e70\u201d\uff0c\u4ef7\u683c\u53ef\u80fd\u8fc7\u9ad8\uff0c\u968f\u65f6\u53ef\u80fd\u4e0b\u8dcc\u3002<\/li>\n\n\n\n<li><strong>\u4f4e\u4e8e30<\/strong>\uff1a\u5e02\u573a\u201c\u8d85\u5356\u201d\uff0c\u4ef7\u683c\u53ef\u80fd\u8fc7\u4f4e\uff0c\u672a\u6765\u53ef\u80fd\u53cd\u5f39\u3002<\/li>\n<\/ul>\n\n\n\n<p>RSI\u7684\u8ba1\u7b97\u516c\u5f0f\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RSI = 100 - (100 \/ (1 + \u5e73\u5747\u4e0a\u6da8\u5e45\u5ea6 \/ \u5e73\u5747\u4e0b\u8dcc\u5e45\u5ea6))<\/code><\/pre>\n\n\n\n<p>\u7b80\u5355\u6765\u8bf4\uff0cRSI\u901a\u8fc7\u6bd4\u8f83\u4e00\u6bb5\u65f6\u95f4\u5185\u7684\u4e0a\u6da8\u548c\u4e0b\u8dcc\u5e45\u5ea6\uff0c\u544a\u8bc9\u4f60\u5e02\u573a\u662f\u201c\u8fc7\u70ed\u201d\u8fd8\u662f\u201c\u8fc7\u51b7\u201d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.3 \u968f\u673a\u6307\u6807\uff1a\u6355\u6349\u77ed\u671f\u52a8\u91cf<\/strong><\/h3>\n\n\n\n<p>\u968f\u673a\u6307\u6807\uff08Stochastic Oscillator\uff09\u4e5f\u662f\u4e00\u4e2a\u52a8\u91cf\u6307\u6807\uff0c\u5b83\u901a\u8fc7\u6bd4\u8f83\u5f53\u524d\u6536\u76d8\u4ef7\u4e0e\u6700\u8fd1\u4e00\u6bb5\u65f6\u95f4\u7684\u4ef7\u683c\u8303\u56f4\uff0c\u5224\u65ad\u5e02\u573a\u8d8b\u52bf\u3002\u5b83\u6709\u4e24\u6761\u7ebf\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>%K\u7ebf<\/strong>\uff08\u5feb\u7ebf\uff09\uff1a\u53cd\u6620\u5f53\u524d\u4ef7\u683c\u5728\u9ad8\u4f4e\u8303\u56f4\u4e2d\u7684\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li><strong>%D\u7ebf<\/strong>\uff08\u6162\u7ebf\uff09\uff1a%K\u7ebf\u76843\u5929\u5e73\u5747\u503c\uff0c\u5e73\u6ed1\u6ce2\u52a8\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u516c\u5f0f\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%K = 100 \u00d7 (\u5f53\u524d\u6536\u76d8\u4ef7 - \u6700\u8fd114\u5929\u6700\u4f4e\u4ef7) \/ (\u6700\u8fd114\u5929\u6700\u9ad8\u4ef7 - \u6700\u8fd114\u5929\u6700\u4f4e\u4ef7)\n%D = %K\u76843\u5929\u7b80\u5355\u79fb\u52a8\u5e73\u5747<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>%K\u4e0b\u7a7f%D<\/strong>\uff1a\u5356\u51fa\u4fe1\u53f7\u3002<\/li>\n\n\n\n<li><strong>%K &gt; 80<\/strong>\uff1a\u8d85\u4e70\uff0c\u53ef\u80fd\u4e0b\u8dcc\u3002<\/li>\n\n\n\n<li><strong>%K &lt; 20<\/strong>\uff1a\u8d85\u5356\uff0c\u53ef\u80fd\u4e0a\u6da8\u3002<\/li>\n\n\n\n<li><strong>%K\u4e0a\u7a7f%D<\/strong>\uff1a\u4e70\u5165\u4fe1\u53f7\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u624b\u628a\u624b\u4ee3\u7801\u6559\u5b66<\/strong><\/h2>\n\n\n\n<p>\u73b0\u5728\uff0c\u6211\u8981\u5e26\u5927\u5bb6\u7528Python\u5b9e\u73b0\u8fd9\u4e2a\u7b56\u7565\uff01\u6211\u4eec\u5c06\u4f7f\u7528VectorBT\u5e93\uff0c\u5b83\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u56de\u6d4b\u5de5\u5177\uff0c\u80fd\u8ba9\u590d\u6742\u7b56\u7565\u53d8\u5f97\u7b80\u5355\u3002\u522b\u62c5\u5fc3\uff0c\u6211\u4f1a\u4e00\u6b65\u6b65\u8bb2\u89e3\uff0c\u96f6\u57fa\u7840\u4e5f\u80fd\u770b\u61c2\uff01<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u51c6\u5907\u5de5\u4f5c<\/strong><\/h3>\n\n\n\n<p>\u4f60\u9700\u8981\u4e00\u4e2a\u652f\u6301Python\u7684\u73af\u5883\uff0c\u6bd4\u5982Google Colab\u3002\u6570\u636e\u5b58\u50a8\u5728Google Sheets\u4e2d\uff0c\u65b9\u4fbf\u7ba1\u7406\u548c\u4fee\u6539\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python \u73af\u5883\uff08\u63a8\u8350 Anaconda \u6216 Colab\uff09<\/li>\n\n\n\n<li>\u5b89\u88c5\u4f9d\u8d56\uff1aVectorBT\u3001Pandas\u3001NumPy\u3001Plotly\u3001gspread<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pip install vectorbt pandas numpy plotly gspread -q<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 \u8bfb\u8868\u53d6\u6570\u636e<\/strong><\/h3>\n\n\n\n<p>\u52a0\u8f7d\u80a1\u7968\u6570\u636e\uff0c\u5e76\u767b\u5f55\u4e0e\u6253\u5f00\u8868\u683c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>import gspread<br>from google.auth import default<br><br># \u767b\u5f55\u4e0e\u6253\u5f00\u8868\u683c<br>creds, _ = default()<br>gc = gspread.authorize(creds)<br>sheet = gc.open('\u4f60\u7684\u8868\u683c\u540d').worksheet('AAPL')  # \u793a\u4f8b<br>rows = sheet.get_all_values()<br>df = pd.DataFrame(rows[1:], columns=rows[0])<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 \u8ba1\u7b97RSI\u548c\u968f\u673a\u6307\u6807<\/strong><\/h3>\n\n\n\n<p>\u7528VectorBT\u8ba1\u7b97\u6307\u6807\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>import vectorbt as vbt<\/code><br><code><br># \u8f6c\u6570\u503c\u3001\u8bbe\u7f6e\u7d22\u5f15<br>df[['Open','High','Low','Close']] = df[['Open','High','Low','Close']].astype(float)<br>df['Date'] = pd.to_datetime(df['Date'])<br>df.set_index('Date', inplace=True)<br><br># \u8ba1\u7b97 RSI \u4e0e \u968f\u673a\u6307\u6807<br>df['RSI'] = vbt.RSI.run(df['Close'], window=14).rsi<br>st = vbt.STOCH.run(df['High'], df['Low'], df['Close'], k_window=14, d_window=3)<br>df['Stoch_K'], df['Stoch_D'] = st.percent_k, st.percent_d<br><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.4 \u4fe1\u53f7\u4e0e\u56de\u6d4b<\/strong><\/h3>\n\n\n\n<p>\u6839\u636e\u7b56\u7565\u89c4\u5219\u751f\u6210\u4fe1\u53f7\uff0c\u7528VectorBT\u8fdb\u884c\u56de\u6d4b\uff0c\u8003\u8651\u4ea4\u6613\u8d39\u7528\u548c\u6ed1\u70b9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code># \u751f\u6210\u4fe1\u53f7<br>entries = (df['RSI'] &lt; 30) &amp; (df['Stoch_K'] &lt; 20) &amp; (df['Stoch_K'] &gt; df['Stoch_D'])<br>exits   = (df['RSI'] &gt; 70) &amp; ((df['Stoch_K'] &gt; 80) | (df['Stoch_K'] &lt; df['Stoch_D']))<br><br># \u56de\u6d4b<br><\/code>portfolio = vbt.Portfolio.from_signals(<br>        close=df['Close'],<br>        entries=entries,<br>        exits=exits,<br>        size=np.inf,<br>        fees=0.002,  # \u4ea4\u6613\u8d39\u75280.2%<br>        slippage=0.001,  # \u6ed1\u70b90.1%<br>        freq='D'<br>    )<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.5 \u67e5\u770b\u7ed3\u679c<\/strong><\/h3>\n\n\n\n<p>\u6253\u5370\u7ee9\u6548\u62a5\u544a\u548c\u4ea4\u6613\u65e5\u5fd7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    print(\"\\n========== PERFORMANCE REPORT ==========\")\n    print(portfolio.stats())\n    print(\"\\n========== TRANSACTION LOG ==========\")\n    orders = portfolio.orders.records_readable.copy()\n    orders&#91;'Date'] = pd.to_datetime(orders&#91;'Timestamp']).dt.tz_localize(None)\n    orders&#91;'Portfolio Value'] = orders&#91;'Timestamp'].map(portfolio.value().tz_localize(None)).ffill().round(2)\n    print(orders&#91;&#91;'Date', 'Side', 'Size', 'Price', 'Fees', 'Portfolio Value']].round(2))<\/code><\/pre>\n\n\n\n<p>\u7ed3\u679c\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/05\/1746687648616.png\" alt=\"\" class=\"wp-image-5159\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>2.6 \u7ed8\u5236\u56fe\u8868<\/strong><\/h3>\n\n\n\n<p>\u751f\u6210\u4e09\u5f20\u56fe\u8868\uff1a\u4ef7\u683c\u56fe\uff08\u5e26\u4e70\u5356\u4fe1\u53f7\uff09\u3001RSI\u56fe\u548c\u968f\u673a\u6307\u6807\u56fe\u3002\u4ee5\u4e0b\u662f\u4ef7\u683c\u56fe\u90e8\u5206\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    fig_price = go.Figure()\n    fig_price.add_trace(go.Candlestick(\n        x=df.index,\n        open=df&#91;'Open'],\n        high=df&#91;'High'],\n        low=df&#91;'Low'],\n        close=df&#91;'Close'],\n        name=\"Candlestick\"\n    ))\n   #\u3002\u3002\u3002\u7bc7\u5e45\u6709\u9650\uff0c\u6587\u672b\u4e0b\u8f7d\u5b8c\u6574\u4ee3\u7801\n    )\n    fig_price.show()<\/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\/05\/e8711a45a7c99d735b6bd7aa092052bddf1a452f.webp\" alt=\"\" class=\"wp-image-5160\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/05\/69560ac30cbfffb1ce888841c4c409af924e8168.webp\" alt=\"\" class=\"wp-image-5162\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/05\/258db09d394a1851ca9d509c15ae2f5961141848.webp\" alt=\"\" class=\"wp-image-5163\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4ef7\u683c\u56fe\u8868<\/strong>\uff1a\u5c55\u793a\u80a1\u7968K\u7ebf\u56fe\uff0c\u7eff\u8272\u4e09\u89d2\u4e3a\u4e70\u5165\u70b9\uff0c\u7ea2\u8272\u4e09\u89d2\u4e3a\u5356\u51fa\u70b9\u3002<\/li>\n\n\n\n<li><strong>RSI\u56fe\u8868<\/strong>\uff1a\u5c55\u793aRSI\u66f2\u7ebf\uff0c\u6807\u6ce870\uff08\u8d85\u4e70\uff09\u548c30\uff08\u8d85\u5356\uff09\u7ebf\u3002<\/li>\n\n\n\n<li><strong>\u968f\u673a\u6307\u6807\u56fe\u8868<\/strong>\uff1a\u5c55\u793a%K\u548c%D\u66f2\u7ebf\uff0c\u6807\u6ce880\uff08\u8d85\u4e70\uff09\u548c20\uff08\u8d85\u5356\uff09\u7ebf\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.7 \u591a\u53ea\u80a1\u7968\u652f\u6301<\/strong><\/h3>\n\n\n\n<p>\u5bf9\u591a\u53ea\u80a1\u7968\u8fd0\u884c\u56de\u6d4b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for stock in &#91;'AAPL', 'JPM', 'AMCR']:\n    run_backtest('AS', stock)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u5b9e\u76d8\u56de\u6d4b\u4e0e\u6548\u679c\u5bf9\u6bd4<\/strong><\/h2>\n\n\n\n<p>\u4e3a\u4e86\u9a8c\u8bc1\u8fd9\u4e2a\u7b56\u7565\u7684\u6548\u679c\uff0c\u6211\u5728\u4e09\u53ea\u4e0d\u540c\u884c\u4e1a\u7684\u80a1\u7968\u4e0a\u8fdb\u884c\u4e86\u56de\u6d4b\uff1aAAPL\uff08\u82f9\u679c\uff0c\u79d1\u6280\u80a1\uff09\u3001JPM\uff08\u6469\u6839\u5927\u901a\uff0c\u91d1\u878d\u80a1\uff09\u548cAMCR\uff08\u5b89\u7f8e\u5305\u88c5\uff0c\u5305\u88c5\u884c\u4e1a\uff09\u3002\u56de\u6d4b\u7ed3\u679c\u8ba9\u4eba\u773c\u524d\u4e00\u4eae\uff01<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 \u56de\u6d4b\u7ed3\u679c\u4e00\u89c8<\/strong><\/h3>\n\n\n\n<p>\u4e0b\u8868\u5c55\u793a AAPL\u3001JPM\u3001AMCR \u4e09\u53ea\u6807\u7684\u7684\u6838\u5fc3\u8868\u73b0\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">\u6807\u7684<\/th><th class=\"has-text-align-left\" data-align=\"left\">\u8d77\u59cb\u2013\u7ed3\u675f\u65e5\u671f<\/th><th class=\"has-text-align-center\" data-align=\"center\">\u603b\u6536\u76ca<\/th><th class=\"has-text-align-center\" data-align=\"center\">\u57fa\u51c6\u6536\u76ca<\/th><th class=\"has-text-align-center\" data-align=\"center\">\u8d85\u989d\u6536\u76ca<\/th><th class=\"has-text-align-center\" data-align=\"center\">\u8dd1\u8d62\u5927\u76d8\u500d\u6570<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">AAPL<\/td><td class=\"has-text-align-left\" data-align=\"left\">2022-01-03 \u2192 2025-04-29<\/td><td class=\"has-text-align-center\" data-align=\"center\">69.8%<\/td><td class=\"has-text-align-center\" data-align=\"center\">16.0%<\/td><td class=\"has-text-align-center\" data-align=\"center\">53.8%<\/td><td class=\"has-text-align-center\" data-align=\"center\">4.35\u00d7<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">JPM<\/td><td class=\"has-text-align-left\" data-align=\"left\">2020-01-02 \u2192 2025-04-30<\/td><td class=\"has-text-align-center\" data-align=\"center\">84.1%<\/td><td class=\"has-text-align-center\" data-align=\"center\">38.7%<\/td><td class=\"has-text-align-center\" data-align=\"center\">45.4%<\/td><td class=\"has-text-align-center\" data-align=\"center\">2.18\u00d7<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">AMCR<\/td><td class=\"has-text-align-left\" data-align=\"left\">2020-01-02 \u2192 2025-04-30<\/td><td class=\"has-text-align-center\" data-align=\"center\">37.2%<\/td><td class=\"has-text-align-center\" data-align=\"center\">22.5%<\/td><td class=\"has-text-align-center\" data-align=\"center\">14.7%<\/td><td class=\"has-text-align-center\" data-align=\"center\">1.65\u00d7<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><em>\u6ce8\uff1a\u8dd1\u8d62\u5927\u76d8\u500d\u6570 = \u603b\u6536\u76ca \u00f7 \u57fa\u51c6\u6536\u76ca<\/em><\/figcaption><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u4ece\u79d1\u6280\u5230\u91d1\u878d\u3001\u518d\u5230\u5305\u88c5\uff0c\u7b56\u7565\u5728\u9ad8\u6ce2\u52a8\u4e0e\u4f4e\u6ce2\u52a8\u6807\u7684\u4e0a\u90fd\u80fd\u8dd1\u8d62\u5927\u76d8\uff0c\u7a33\u5065\u53c8\u9ad8\u6548\uff01<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 \u6570\u636e\u89e3\u8bfb<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>AAPL<\/strong>\uff1a833\u5929\u5185\uff0c\u7b56\u7565\u56de\u62a569.8%\uff0c\u8fdc\u8d85\u57fa\u51c616%\uff0c\u80dc\u7387\u9ad8\u8fbe90.91%\uff01\u8fd9\u8bf4\u660e\u7b56\u7565\u5728\u79d1\u6280\u80a1\u7684\u6ce2\u52a8\u4e2d\u8868\u73b0\u6781\u4f73\u3002<\/li>\n\n\n\n<li><strong>JPM<\/strong>\uff1a1339\u5929\u5185\uff0c\u7b56\u7565\u56de\u62a584.1%\uff0c\u57fa\u51c6\u4ec538.7%\uff0c\u5373\u4f7f\u9762\u5bf9\u91d1\u878d\u884c\u4e1a\u7684\u76d1\u7ba1\u548c\u5229\u7387\u6ce2\u52a8\uff0c\u7b56\u7565\u4f9d\u7136\u7a33\u5065\u3002<\/li>\n\n\n\n<li><strong>AMCR<\/strong>\uff1a\u5305\u88c5\u884c\u4e1a\u6ce2\u52a8\u8f83\u5c0f\uff0c\u4f46\u7b56\u7565\u4ecd\u53d6\u5f9737.2%\u7684\u56de\u62a5\uff0c\u8d85\u57fa\u51c614.7%\uff0c\u8bc1\u660e\u7b56\u7565\u5bf9\u4f4e\u6ce2\u52a8\u80a1\u7968\u4e5f\u6709\u6548\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u5b9e\u76d8\u98ce\u9669\u7ba1\u7406<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e2a\u7b56\u7565\u5728\u56de\u6d4b\u4e2d\u8868\u73b0\u4eae\u773c\uff0c\u4f46\u5728\u5b9e\u9645\u4ea4\u6613\u4e2d\u8fd8\u6709\u51e0\u70b9\u9700\u8981\u6ce8\u610f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4ea4\u6613\u6210\u672c<\/strong>\uff1a\u56de\u6d4b\u5df2\u8003\u86510.2%\u7684\u8d39\u7528\u548c0.1%\u7684\u6ed1\u70b9\uff0c\u5b9e\u9645\u4ea4\u6613\u53ef\u80fd\u66f4\u9ad8\u3002<\/li>\n\n\n\n<li><strong>\u98ce\u9669\u7ba1\u7406<\/strong>\uff1a\u5efa\u8bae\u6dfb\u52a0\u6b62\u635f\uff0c\u6bd4\u59825%\u7684\u8ffd\u8e2a\u6b62\u635f\uff0c\u9632\u6b62\u5927\u989d\u4e8f\u635f\u3002<\/li>\n\n\n\n<li><strong>\u53c2\u6570\u4f18\u5316<\/strong>\uff1a\u53ef\u4ee5\u5c1d\u8bd5\u8c03\u6574RSI\u9608\u503c\uff08\u6bd4\u598235\/65\uff09\u6216\u968f\u673a\u6307\u6807\u5468\u671f\uff0c\u9002\u5e94\u4e0d\u540c\u5e02\u573a\u3002<\/li>\n\n\n\n<li><strong>\u5e02\u573a\u53d8\u5316<\/strong>\uff1a\u6280\u672f\u5206\u6790\u4e0d\u80fd\u9884\u6d4b\u7a81\u53d1\u4e8b\u4ef6\uff0c\u7ed3\u5408\u57fa\u672c\u9762\u5206\u6790\u66f4\u7a33\u59a5\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u622a\u81f32025\u5e745\u67088\u65e5\uff0cAAPL\u4ef7\u683c\u4ece\u56de\u6d4b\u7ed3\u675f\u65f6\u7684211\u7f8e\u5143\u8dcc\u81f3196.25\u7f8e\u5143\uff0cJPM\u4ece243.31\u7f8e\u5143\u6da8\u81f3249.39\u7f8e\u5143\uff0cAMCR\u4ece9.75\u7f8e\u5143\u8dcc\u81f39.11\u7f8e\u5143\u3002\u8fd9\u4e9b\u6ce2\u52a8\u63d0\u9192\u6211\u4eec\uff0c\u5e02\u573a\u77ac\u606f\u4e07\u53d8\uff0c\u7b56\u7565\u9700\u4e0d\u65ad\u4f18\u5316\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>\u8fd9\u4e2a\u53cc\u6307\u6807\u7b56\u7565\u5c31\u50cf\u7ed9\u4ea4\u6613\u4e0a\u4e86&#8221;\u53cc\u4fdd\u9669&#8221;\uff0c\u65e2\u80fd\u6293\u4f4f\u673a\u4f1a\u53c8\u80fd\u907f\u5f00\u5927\u5751\u3002\u867d\u7136\u4e0d\u80fd\u4fdd\u8bc1100%\u8d5a\u94b1\uff0c\u4f46\u6bd4\u778e\u8499\u9760\u8c31\u591a\u4e86\uff01\u5b83\u5728AAPL\u3001JPM\u548cAMCR\u4e0a\u90fd\u5927\u5e45\u8dd1\u8d62\u5927\u76d8\u3002\u901a\u8fc7Python\u548cVectorBT\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u548c\u6d4b\u8bd5\u8fd9\u4e2a\u7b56\u7565\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7b56\u7565\u4eae\u70b9<\/strong>\uff1a\u53cc\u91cd\u786e\u8ba4\u51cf\u5c11\u5047\u4fe1\u53f7\uff0c\u9002\u5408\u6280\u672f\u4ea4\u6613\u8005\u3002<\/li>\n\n\n\n<li><strong>\u56de\u6d4b\u8868\u73b0<\/strong>\uff1aAAPL\uff0869.84%\uff09\u3001JPM\uff0884.14%\uff09\u3001AMCR\uff0837.21%\uff09\u5747\u8d85\u57fa\u51c6\u3002<\/li>\n\n\n\n<li><strong>\u4ee3\u7801\u5b9e\u73b0<\/strong>\uff1aPython+VectorBT\uff0c\u7b80\u5355\u6613\u4e0a\u624b\u3002<\/li>\n\n\n\n<li><strong>\u98ce\u9669\u63d0\u793a<\/strong>\uff1a\u9700\u8003\u8651\u4ea4\u6613\u6210\u672c\u3001\u6ed1\u70b9\u548c\u5e02\u573a\u53d8\u5316\u3002<\/li>\n\n\n\n<li><strong>\u672a\u6765\u4f18\u5316<\/strong>\uff1a\u6dfb\u52a0\u6b62\u635f\u3001\u8c03\u6574\u53c2\u6570\u3001\u7ed3\u5408\u57fa\u672c\u9762\u5206\u6790\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\/05\/1746689615063-966x1024.png\" alt=\"\" class=\"wp-image-5166\"\/><\/figure>\n\n\n\n<p>\u672c\u6587\u5e26\u4f60\u4ece\u539f\u7406\u5230\u5b9e\u6218\uff0c\u4e00\u6c14\u5475\u6210\u5b66\u4f1a\u201cRSI+\u968f\u673a\u201d\u53cc\u6307\u6807\u7b56\u7565\uff0c\u9700\u8981\u5b8c\u6574 Python \u4ee3\u7801\u8bf7\u540e\u53f0\u7559\u8a00\uff01<\/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\u3002&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/laoyulaoyu.com\/index.php\/2025\/05\/17\/rsistochastic%ef%bc%8c%e7%9c%8b%e9%87%8f%e5%8c%96%e9%ab%98%e6%89%8b%e5%a6%82%e4%bd%95%e7%94%a8%e3%80%90%e5%8f%8c%e7%ba%bf%e7%8c%8e%e6%89%8b%e3%80%91%e8%bd%bb%e6%9d%be%e8%b7%91%e8%b5%a2%e5%a4%a7\/\">Continue reading<span class=\"screen-reader-text\">RSI+Stochastic\uff0c\u770b\u91cf\u5316\u9ad8\u624b\u5982\u4f55\u7528\u3010\u53cc\u7ebf\u730e\u624b\u3011\u8f7b\u677e\u8dd1\u8d62\u5927\u76d8 4 \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":[17,4,5,6],"class_list":{"0":"post-2278","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\/2278","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=2278"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2278\/revisions"}],"predecessor-version":[{"id":2279,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/2278\/revisions\/2279"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=2278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=2278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=2278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}