{"id":1709,"date":"2024-12-12T07:58:00","date_gmt":"2024-12-11T23:58:00","guid":{"rendered":"https:\/\/blog.laoyulaoyu.top\/?p=1709"},"modified":"2024-11-18T14:46:52","modified_gmt":"2024-11-18T06:46:52","slug":"%e6%99%ba%e8%83%bd-ma-%e7%ae%97%e6%b3%95%e5%8a%a0%e6%8c%81%ef%bc%81%e8%bd%bb%e6%9d%be%e9%94%81%e5%ae%9a%e6%9c%80%e4%bd%b3%e7%9b%88%e5%88%a9%e5%8f%82%e6%95%b0","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2024\/12\/12\/%e6%99%ba%e8%83%bd-ma-%e7%ae%97%e6%b3%95%e5%8a%a0%e6%8c%81%ef%bc%81%e8%bd%bb%e6%9d%be%e9%94%81%e5%ae%9a%e6%9c%80%e4%bd%b3%e7%9b%88%e5%88%a9%e5%8f%82%e6%95%b0\/","title":{"rendered":"\u667a\u80fd MA \u7b97\u6cd5\u52a0\u6301\uff01\u8f7b\u677e\u9501\u5b9a\u6700\u4f73\u76c8\u5229\u53c2\u6570"},"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\/2024\/11\/1_Ns60P22c5sI4eWnXDvFzIw.jpg\" alt=\"\" class=\"wp-image-2996\"\/><\/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>\u4f60\u662f\u4e0d\u662f\u5df2\u7ecf\u538c\u5026\u4e86\u6bcf\u6b21\u4ea4\u6613\u65f6\u90fd\u8981\u5728\u4f17\u591a\u79fb\u52a8\u5e73\u5747\u7ebf\u4e2d\u505a\u51fa\u9009\u62e9\uff1f\u4eca\u5929\uff0c\u6211\u5c06\u5e26\u4f60\u63a2\u8ba8<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u5982\u4f55\u501f\u52a9\u7b97\u6cd5\u7684\u529b\u91cf\uff0c\u81ea\u52a8\u8c03\u6574\u548c\u4f18\u5316\u79fb\u52a8\u5e73\u5747\u7ebf\u4ea4\u6613\u7b56\u7565\u7684\u53c2\u6570<\/mark>\u3002\u6211\u4eec\u4f1a\u5b66\u4e60\u5982\u4f55\u8ba9\u8fd9\u4e9b\u7b56\u7565\u7075\u6d3b\u9002\u5e94\u5404\u79cd\u80a1\u7968\u548c\u5e02\u573a\u7684\u53d8\u5316\uff0c\u4ee5\u6b64\u6765\u63d0\u5347\u4f60\u7684\u4ea4\u6613\u6548\u7387\uff0c\u5e76\u6700\u5927\u5316\u6536\u76ca\u3002\u5728\u6587\u672b\u6211\u8fd8\u5c06\u4ee5\u7279\u65af\u62c9\u80a1\u7968\u4e3e\u4f8b\uff0c\u5e76\u63d0\u4f9b\u4e86\u5168\u90e8\u6e90\u4ee3\u7801\u4ee5\u53ca Google Colab \u7b14\u8bb0\u672c\u7684\u94fe\u63a5\uff0c\u4ee5\u4fbf\u60a8\u4eb2\u81ea\u8fdb\u884c\u5c1d\u8bd5\u3002<\/pre>\n<\/blockquote>\n\n\n\n<p>\u79fb\u52a8\u5e73\u5747\u7ebf\uff08Moving Average\uff0c\u7b80\u79f0MA\uff09\u662f\u4e00\u79cd\u5728\u6280\u672f\u5206\u6790\u9886\u57df\u5e7f\u6cdb\u4f7f\u7528\u7684\u6280\u672f\u6307\u6807\u3002\u5b83\u662f\u901a\u8fc7\u7edf\u8ba1\u5206\u6790\u7684\u65b9\u6cd5\uff0c\u5c06\u4e00\u5b9a\u65f6\u671f\u5185\u7684\u8bc1\u5238\u4ef7\u683c\u8fdb\u884c\u5e73\u5747\u8ba1\u7b97\uff0c\u5e76\u5c06\u8fd9\u4e9b\u4e0d\u540c\u65f6\u95f4\u7684\u5e73\u5747\u503c\u8fde\u63a5\u8d77\u6765\uff0c\u5f62\u6210\u4e00\u6761\u5e73\u6ed1\u7684\u66f2\u7ebf\u3002<\/p>\n\n\n\n<p>\u4f46\u95ee\u9898\u6765\u4e86\uff0c\u79fb\u52a8\u5e73\u5747\u7ebf\u7684\u4e00\u5b9a\u65f6\u671f\uff08\u65e5\u6570\uff09\u9009\u62e9\u6ca1\u6709\u6807\u51c6\u548c\u89c4\u5b9a\uff0c\u6295\u8d44\u8005\u9700\u8981\u6839\u636e\u81ea\u5df1\u7684\u6295\u8d44\u76ee\u6807\u548c\u5e02\u573a\u7279\u6027\u6765\u9009\u62e9\u3002\u800c\u4e14\u5728\u4ef7\u683c\u6ce2\u52a8\u8f83\u5927\u7684\u5e02\u573a\u4e2d\u79fb\u52a8\u5e73\u5747\u7ebf\u4f1a\u9891\u7e41\u4fe1\u53f7\uff1b\u5728\u4ef7\u683c\u6ce2\u5e45\u4e0d\u5927\u7684\u5e02\u573a\u4e2d\uff0c\u5e73\u5747\u7ebf\u53c8\u53ef\u80fd\u4f1a\u5728\u4ef7\u683c\u4e4b\u95f4\u4e0a\u4e0b\u4ea4\u9519\uff0c\u96be\u4ee5\u628a\u63e1\u6700\u4f73\u4ea4\u6613\u65f6\u673a\u3002\u6240\u6709\u8fd9\u4e9b\u4e0d\u540c\u7684\u9009\u62e9\u90fd\u53ef\u80fd\u4f1a\u5f71\u54cd\u79fb\u52a8\u5e73\u5747\u7ebf\u7684\u654f\u611f\u5ea6\u548c\u7a33\u5b9a\u6027\uff0c\u4ece\u800c\u5f71\u54cd\u6295\u8d44\u8005\u7684\u51b3\u7b56\u3002<\/p>\n\n\n\n<p>\u800c\u6709\u6ca1\u6709\u4e00\u79cd\u7b97\u6cd5\u80fd\u5728\u4efb\u4f55\u65f6\u95f4\u6bb5\u4e3a\u4efb\u4f55\u80a1\u7968\u81ea\u52a8\u627e\u5230\u6700\u4f73\u53c2\u6570\uff1f<\/p>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u6cd5\u9700\u8981\u65e2\u53ef\u4ee5\u6ee1\u8db3\u9ad8\u6ce2\u52a8\u6027\u79d1\u6280\u80a1\u3001\u53c8\u53ef\u4ee5\u9002\u5e94\u7a33\u5b9a\u7684\u84dd\u7b79\u80a1\uff0c\u5728\u4e0d\u540c\u7684\u5e02\u573a\u5468\u671f\u548c\u5404\u79cd\u65f6\u95f4\u8303\u56f4\u5185\u90fd\u80fd\u6839\u636e\u60a8\u7684\u60c5\u51b5\u627e\u5230\u4e13\u95e8\u4f18\u5316\u7684\u5b8c\u7f8e\u79fb\u52a8\u5e73\u5747\u53c2\u6570\uff01<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-85.png\" alt=\"\" class=\"wp-image-2997\"\/><\/figure>\n<\/div>\n\n\n<p>\u6211\u4eec\u4eca\u5929\u6765\u63a2\u7d22\u5b9e\u73b0\u5b83\uff0c\u76f4\u63a5\u4e0a\u5e72\u8d27\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4ee3\u7801\u5b9e\u73b0<\/strong><br><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1 \u6570\u636e\u6536\u96c6\u548c\u6e05\u7406&nbsp;<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_clean_financial_data(ticker, start_date, end_date):\n    # Download data using yfinance\n    data = yf.download(ticker, start=start_date, end=end_date)\n    \n    # Clean structure and handle missing values\n    data.columns = data.columns.get_level_values(0)\n    data = data.ffill()\n    \n    # Standardize timezone\n    data.index = data.index.tz_localize(None)\n    \n    return data<\/code><\/pre>\n\n\n\n<p id=\"1f48\"><strong>\u4f5c\u7528\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 yfinance \u4e0b\u8f7d\u80a1\u7968\u6570\u636e\uff1b<\/li>\n\n\n\n<li>\u81ea\u52a8\u5904\u7406\u7f3a\u5931\u503c\uff1b<\/li>\n\n\n\n<li>\u786e\u4fdd\u6570\u636e\u7ed3\u6784\u7b80\u6d01\u3001\u4e00\u81f4\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.2 \u6838\u5fc3\u6218\u7565\u5b9e\u65bd<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>def ma_crossover_strategy(data, short_window=5, long_window=20):\n    # Calculate moving averages\n    data&#91;'SMA_Short'] = data&#91;'Close'].rolling(window=short_window).mean()\n    data&#91;'SMA_Long'] = data&#91;'Close'].rolling(window=long_window).mean()\n    \n    # Generate signals\n    data.loc&#91;data&#91;'SMA_Short'] &gt; data&#91;'SMA_Long'], 'Position'] = 1  # Buy\n    data.loc&#91;data&#91;'SMA_Short'] &lt;= data&#91;'SMA_Long'], 'Position'] = 0  # Sell\n    \n    # Calculate returns\n    data&#91;'Returns'] = data&#91;'Close'].pct_change()\n    data&#91;'Strategy_Returns'] = data&#91;'Position'].shift(1) * data&#91;'Returns']\n    \n    return data<\/code><\/pre>\n\n\n\n<p><strong>1.2.1 \u4f5c\u7528\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8ba1\u7b97\u77ed\u671f\u548c\u957f\u671f\u79fb\u52a8\u5e73\u5747\u7ebf<\/li>\n\n\n\n<li>\u5728\u4ea4\u53c9\u70b9\u751f\u6210\u4e70\u5165\/\u5356\u51fa\u4fe1\u53f7<\/li>\n\n\n\n<li>\u8ddf\u8e2a\u4f4d\u7f6e\u56de\u62a5<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>data&#91;'Strategy_Returns'] = data&#91;'Position'].shift(1) * data&#91;'Returns']<\/code><\/pre>\n\n\n\n<p><strong>1.2.2 \u6218\u7565\u56de\u62a5\uff08\u8fd9\u4e00\u70b9\u81f3\u5173\u91cd\u8981\uff09\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Position.shift(1)<\/code>\uff1a\u4f7f\u7528\u6628\u5929\u7684\u4f4d\u7f6e\u8ba1\u7b97\u4eca\u5929\u7684\u6536\u76ca\uff1b<\/li>\n\n\n\n<li>\u5c06\u4f4d\u7f6e\uff081 \u6216 0\uff09\u4e58\u4ee5\u8fd4\u56de\u503c\uff1b<\/li>\n\n\n\n<li>\u4f4d\u7f6e = 1\uff1a\u83b7\u53d6\u5168\u90e8\u6536\u76ca\uff1b<\/li>\n\n\n\n<li>\u4ed3\u4f4d = 0\uff1a\u83b7\u5f97\u96f6\u6536\u76ca\uff08\u9000\u51fa\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>1.2.3 \u8981\u70b9\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<p id=\"76a8\"><strong>\u4f4d\u7f6e = 1 \u8868\u793a\uff1a<\/strong>\u7a7a\u4ed3 \u2192 \u4e70\u5165 \uff0c\u6301\u4ed3 \u2192 \u4fdd\u6301\u3002<\/p>\n\n\n\n<p id=\"7f70\"><strong>\u4f4d\u7f6e = 0 \u8868\u793a\uff1a<\/strong>\u6301\u4ed3 \u2192 \u5356\u51fa \uff0c\u7a7a\u4ed3 \u2192 \u4fdd\u6301\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Day    Position    Returns    Strategy Returns\n1      1          2%         0% (no previous position)\n2      1          -1%        -1% (in market, full loss)\n3      0          2%         2% (in market, full gain)\n4      0          -1%        0% (out of market, no loss)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.3 \u53c2\u6570\u4f18\u5316<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>def optimize_ma_windows(data):\n    best_return = -np.inf\n    best_params = None\n\n    for short_window in range(3, 15):\n        for long_window in range(short_window + 5, 200):\n            result = ma_crossover_strategy(data.copy(), short_window, long_window)\n            total_return = (1 + result&#91;'Strategy_Returns']).cumprod().iloc&#91;-1] - 1\n\n            if total_return &gt; best_return:\n                best_return = total_return\n                best_params = (short_window, long_window)\n\n    return best_params<\/code><\/pre>\n\n\n\n<p id=\"5978\"><strong>\u4f5c\u7528\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6d4b\u8bd5\u6570\u767e\u79cd MA \u7ec4\u5408\uff1b<\/li>\n\n\n\n<li>\u627e\u5230\u6536\u76ca\u6700\u5927\u7684\u4e00\u5bf9\uff1b<\/li>\n\n\n\n<li>\u786e\u4fdd\u77ed MA \u59cb\u7ec8\u77ed\u4e8e\u957f MA\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.4 \u7740\u773c\u4e8e\u73b0\u5b9e\u7684\u6536\u76ca\u8ddf\u8e2a<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>def calculate_performance(data, initial_capital=10000, transaction_fee=10):\n    # Track trades and capital\n    trade_details = &#91;]\n    capital = initial_capital\n\n    for buy_date, buy_row in buys.iterrows():\n        # Find next sell signal\n        sell = sells&#91;sells.index &gt; buy_date].iloc&#91;0]\n        \n        # Calculate position size and costs\n        num_shares = (capital - transaction_fee) \/\/ buy_row&#91;'Close']\n        profit = (sell&#91;'Close'] - buy_row&#91;'Close']) \/ buy_row&#91;'Close']\n        \n        # Update capital\n        capital += profit_after_fee\n        \n        # Track trade details...\n<\/code><\/pre>\n\n\n\n<p id=\"b04b\"><strong>\u4f5c\u7528\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7cbe\u786e\u8ddf\u8e2a\u6bcf\u7b14\u4ea4\u6613\uff1b<\/li>\n\n\n\n<li>\u4ea4\u6613\u8d39\u7528\uff1b<\/li>\n\n\n\n<li>\u4fdd\u6301\u57fa\u672c\u5efa\u8bbe\u6536\u652f\u5e73\u8861\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u5b9e\u9645\u5e94\u7528<\/strong><\/h2>\n\n\n\n<p>\u8ba9\u6211\u4eec\u7528\u7279\u65af\u62c9\u80a1\u7968\u4e3a\u4f8b\uff0c\u6765\u770b\u770b\u5b83\u7684\u5b9e\u9645\u6548\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Get the data\nTSLA = get_clean_financial_data('TSLA', '2023-01-01', datetime.now().strftime('%Y-%m-%d'))\n\n# Find optimal parameters\noptimal_short, optimal_long = optimize_ma_windows(TSLA)\n\n# Run strategy with optimal parameters\nresult = ma_crossover_strategy(TSLA.copy(), optimal_short, optimal_long)\n\n# Calculate performance\nperformance = calculate_performance(result)\n\nPerformance Metrics (Trade Details):\nBuy Date     Buy Price    Sell Date    Sell Price   Number of Shares  Profit   Transaction Fee Capital Change  Running Total Capital\n2023-01-18   128.78       2023-02-23   202.07       77                56.91%   $10             $5633.33         $15633.33            \n2023-03-20   183.25       2023-04-10   184.51       85                0.69%    $10             $97.1            $15730.43            \n2023-05-04   161.2        2023-06-27   250.21       97                55.22%   $10             $8623.97         $24354.4             \n2023-07-03   279.82       2023-07-24   269.06       87                -3.85%   $10             $-946.12         $23408.28            \n2023-08-25   238.59       2023-09-22   244.88       98                2.64%    $10             $606.42          $24014.7             \n2023-10-04   261.16       2023-10-17   254.85       91                -2.42%   $10             $-584.21         $23430.49            \n2023-11-06   219.27       2023-12-06   239.37       106               9.17%    $10             $2120.6          $25551.09            \n2023-12-11   239.74       2023-12-12   237.01       106               -1.14%   $10             $-299.38         $25251.71            \n2023-12-13   239.29       2024-01-03   238.45       105               -0.35%   $10             $-98.2           $25153.51            \n2024-02-12   188.13       2024-03-05   180.74       133               -3.93%   $10             $-992.87         $24160.64            \n2024-03-22   170.83       2024-04-03   168.38       141               -1.43%   $10             $-355.45         $23805.19            \n2024-04-12   171.05       2024-04-16   157.11       139               -8.15%   $10             $-1947.66        $21857.53            \n2024-04-26   168.29       2024-05-09   171.97       129               2.19%    $10             $464.72          $22322.25            \n2024-05-20   174.95       2024-05-29   176.19       127               0.71%    $10             $147.48          $22469.73            \n2024-06-17   187.44       2024-07-17   248.5        119               32.58%   $10             $7256.14         $29725.87            \n2024-08-15   214.14       2024-08-28   205.75       138               -3.92%   $10             $-1167.82        $28558.05            \n2024-09-05   230.17       2024-10-04   250.08       124               8.65%    $10             $2458.84         $31016.89            \n\nInitial Capital: $10000\nFinal Capital: $31016.89\nTotal Profit: 210.17%<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-86.png\" alt=\"\" class=\"wp-image-3000\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8fd9\u79cd\u7b97\u6cd5\u80fd\u7528\u4e14\u597d\u7528\uff1f\u6211\u7684\u603b\u7ed3\u5982\u4e0b\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 \u9002\u5e94\u6027<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6839\u636e\u6bcf\u53ea\u80a1\u7968\u7684\u72ec\u7279\u6027\u8c03\u6574\u53c2\u6570\uff1b<\/li>\n\n\n\n<li>\u6218\u7565\u968f\u5e02\u573a\u60c5\u51b5\u800c\u53d8\u5316\uff1b<\/li>\n\n\n\n<li>\u6ca1\u6709\u653e\u4e4b\u56db\u6d77\u800c\u7686\u51c6\u7684\u5047\u8bbe\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"977a\"><strong>3.2 \u5ba2\u89c2\u6027<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6d88\u9664\u4eba\u4e3a\u504f\u89c1\uff1b<\/li>\n\n\n\n<li>\u6570\u636e\u9a71\u52a8\u51b3\u7b56\uff1b<\/li>\n\n\n\n<li>\u7cfb\u7edf\u65b9\u6cd5\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ab93\"><strong>3.3 \u6548\u7387<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5373\u65f6\u6d4b\u8bd5\u6570\u767e\u79cd\u7ec4\u5408\uff1b<\/li>\n\n\n\n<li>\u4f18\u5316\u4ee5\u83b7\u5f97\u6700\u5927\u6536\u76ca\uff1b<\/li>\n\n\n\n<li>\u8003\u8651\u4ea4\u6613\u6210\u672c\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.4 \u5b9e\u7528\u6027<\/strong><\/h3>\n\n\n\n<p>\u6211\u63d0\u4f9b\u4e86\u5b9e\u9645\u7684\u4ee3\u7801\u793a\u4f8b\u548c Google Colab \u7b14\u8bb0\u672c\uff0c\u65b9\u4fbf\u60a8\u52a0\u6df1\u7406\u89e3\u548c\u7acb\u523b\u5b9e\u8df5\u3002<\/p>\n\n\n\n<p>\u5730\u5740\u5982\u4e0b\uff1a<a href=\"https:\/\/colab.research.google.com\/drive\/1zBZdXYf7tOpJFDL8w0PoNldlTzbuo9my?usp=sharing\">https:\/\/colab.research.google.com\/drive\/1zBZdXYf7tOpJFDL8w0PoNldlTzbuo9my?usp=sharing<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><\/li>\n<\/ul>\n\n\n\n<p><strong>\u6700\u540e\u6211\u60f3\u5bf9\u60a8\u8bf4\uff1a<\/strong><em><strong>Gone are the days of using standard moving average periods for every stock. Let the data tell you what works best\u2026<\/strong><\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u611f\u8c22\u60a8\u9605\u8bfb\u5230\u6700\u540e\uff0c\u5e0c\u671b\u672c\u6587\u80fd\u7ed9\u60a8\u5e26\u6765\u65b0\u7684\u6536\u83b7\u3002\u795d\u60a8\u6295\u8d44\u987a\u5229\uff01\u5982\u679c\u5bf9\u6587\u4e2d\u7684\u5185\u5bb9\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u8bf7\u7ed9\u6211\u7559\u8a00\uff0c\u5fc5\u590d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-align-center\" id=\"a1c6\"><strong><mark style=\"background-color:#ffffff\" class=\"has-inline-color has-cyan-bluish-gray-color\">\u672c\u6587\u5185\u5bb9\u4ec5\u4ec5\u662f\u6280\u672f\u63a2\u8ba8\u548c\u5b66\u4e60\uff0c\u5e76\u4e0d\u6784\u6210\u4efb\u4f55\u6295\u8d44\u5efa\u8bae\u3002<\/mark><\/strong><\/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\/2024\/12\/12\/%e6%99%ba%e8%83%bd-ma-%e7%ae%97%e6%b3%95%e5%8a%a0%e6%8c%81%ef%bc%81%e8%bd%bb%e6%9d%be%e9%94%81%e5%ae%9a%e6%9c%80%e4%bd%b3%e7%9b%88%e5%88%a9%e5%8f%82%e6%95%b0\/\">Continue reading<span class=\"screen-reader-text\">\u667a\u80fd MA \u7b97\u6cd5\u52a0\u6301\uff01\u8f7b\u677e\u9501\u5b9a\u6700\u4f73\u76c8\u5229\u53c2\u6570<\/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":[4,5],"class_list":{"0":"post-1709","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","9":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1709","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=1709"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1709\/revisions"}],"predecessor-version":[{"id":1710,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1709\/revisions\/1710"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=1709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=1709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=1709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}