{"id":3547,"date":"2026-02-26T07:37:00","date_gmt":"2026-02-25T23:37:00","guid":{"rendered":"https:\/\/www.laoyulaoyu.com\/?p=3547"},"modified":"2026-01-29T22:38:25","modified_gmt":"2026-01-29T14:38:25","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e9%a1%b6%e7%ba%a7%e9%87%8f%e5%8c%96%e5%9b%a2%e9%98%9f%e9%83%bd%e5%9c%a8%e7%94%a8arima%e6%b7%b1%e5%ba%a6%e8%a7%a3%e6%9e%90%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e9%a2%84","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2026\/02\/26\/%e4%b8%ba%e4%bb%80%e4%b9%88%e9%a1%b6%e7%ba%a7%e9%87%8f%e5%8c%96%e5%9b%a2%e9%98%9f%e9%83%bd%e5%9c%a8%e7%94%a8arima%e6%b7%b1%e5%ba%a6%e8%a7%a3%e6%9e%90%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e9%a2%84\/","title":{"rendered":"\u4e3a\u4ec0\u4e48\u9876\u7ea7\u91cf\u5316\u56e2\u961f\u90fd\u5728\u7528ARIMA?\u6df1\u5ea6\u89e3\u6790\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u7684\u6838\u5fc3\u6b66\u5668(\u9644\u4ee3\u7801)"},"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 fetchpriority=\"high\" decoding=\"async\" width=\"900\" height=\"383\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/1_1aNgWrHBG4rNfBy821SQlQ.jpg\" alt=\"\" class=\"wp-image-3548\" srcset=\"https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/1_1aNgWrHBG4rNfBy821SQlQ.jpg 900w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/1_1aNgWrHBG4rNfBy821SQlQ-300x128.jpg 300w, https:\/\/laoyulaoyu.com\/wp-content\/uploads\/2026\/01\/1_1aNgWrHBG4rNfBy821SQlQ-768x327.jpg 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/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><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u4eca\u5929\u5206\u4eab\u7684\u662fARIMA\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u6a21\u578b\u3002<\/mark>\u4eceAR\u3001MA\u57fa\u672c\u539f\u7406\u5230\u5b8c\u6574\u5efa\u6a21\u6d41\u7a0b\uff0c\u518d\u5230Python\u5b9e\u6218\u4ee3\u7801\uff0c\u624b\u628a\u624b\u6559\u4f60\u6784\u5efa\u9884\u6d4b\u7cfb\u7edf\u3002\u5305\u542bBox-Jenkins\u65b9\u6cd5\u8bba\u3001\u53c2\u6570\u9009\u62e9\u6280\u5de7\u3001\u6a21\u578b\u8bca\u65ad\u65b9\u6cd5\uff0c\u4ee5\u53ca\u591a\u5e74\u5b9e\u6218\u907f\u5751\u6307\u5357\u3002\u65e0\u8bba\u65b0\u624b\u8fd8\u662f\u8001\u624b\uff0c\u671f\u5f85\u5927\u5bb6\u90fd\u80fd\u4ece\u4e2d\u83b7\u76ca\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4ece&#8221;\u60ef\u6027&#8221;\u548c&#8221;\u51b2\u51fb&#8221;\u8bf4\u8d77:\u7406\u89e3\u65f6\u95f4\u5e8f\u5217\u7684\u672c\u8d28<\/strong><\/h2>\n\n\n\n<p>\u5728\u8bb2ARIMA\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u804a\u804a\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u7684\u4e24\u4e2a\u6838\u5fc3\u7279\u5f81\u3002<\/p>\n\n\n\n<p>\u60f3\u8c61\u4e00\u4e0b\u80a1\u7968\u4ef7\u683c\u7684\u8d70\u52bf\u3002\u5982\u679c\u4e00\u53ea\u80a1\u7968\u8fde\u7eed\u4e09\u5929\u4e0a\u6da8\uff0c\u90a3\u7b2c\u56db\u5929\u7ee7\u7eed\u4e0a\u6da8\u7684\u6982\u7387\u662f\u4e0d\u662f\u4f1a\u5927\u4e00\u4e9b?\u8fd9\u5c31\u662f\u60ef\u6027(Momentum)\u3002\u80a1\u4ef7\u6709\u4e00\u79cd&#8221;\u8bb0\u5fc6\u6548\u5e94&#8221;\uff0c\u8fc7\u53bb\u7684\u8d70\u52bf\u4f1a\u5f71\u54cd\u672a\u6765\u7684\u8868\u73b0\u3002<\/p>\n\n\n\n<p>\u4f46\u5e02\u573a\u4e0a\u8fd8\u6709\u53e6\u4e00\u79cd\u529b\u91cf\u2014\u2014\u51b2\u51fb(Shock)\u3002\u6bd4\u5982\u7a81\u7136\u7206\u51fa\u7684\u5229\u597d\u6d88\u606f\u3001\u91cd\u5927\u653f\u7b56\u53d8\u52a8\uff0c\u8fd9\u4e9b\u5916\u90e8\u4e8b\u4ef6\u4f1a\u7ed9\u4ef7\u683c\u5e26\u6765\u77ac\u95f4\u7684\u51b2\u51fb\u3002\u8fd9\u79cd\u51b2\u51fb\u7684\u5f71\u54cd\u4f1a\u9010\u6e10\u8870\u51cf,\u4f46\u5728\u77ed\u671f\u5185\u4f1a\u663e\u8457\u6539\u53d8\u8d70\u52bf\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udca1 \u6838\u5fc3\u6d1e\u5bdf<\/strong>\uff1a\u4f20\u7edf\u7684\u79fb\u52a8\u5e73\u5747(MA)\u6a21\u578b\u53ea\u5173\u6ce8&#8221;\u51b2\u51fb&#8221;\u2014\u2014\u5b83\u628a\u5f53\u524d\u503c\u770b\u4f5c\u662f\u4e00\u7cfb\u5217\u5916\u90e8\u51b2\u51fb\u7684\u7d2f\u79ef\u6548\u5e94\u3002\u4f46\u8fd9\u6837\u505a\u6709\u4e2a\u95ee\u9898\uff1a\u5b83\u5ffd\u7565\u4e86\u5e02\u573a\u7684&#8221;\u60ef\u6027&#8221;\u3002\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u4eec\u9700\u8981\u81ea\u56de\u5f52(AR)\u6a21\u578b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u81ea\u56de\u5f52\u6a21\u578b(AR):\u6355\u6349\u5e02\u573a\u7684&#8221;\u8bb0\u5fc6&#8221;<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>2.1 \u4ec0\u4e48\u662f\u81ea\u56de\u5f52?<\/strong><\/h3>\n\n\n\n<p>\u81ea\u56de\u5f52\u7684\u6838\u5fc3\u601d\u60f3\u5f88\u7b80\u5355\uff1a<strong>\u4eca\u5929\u7684\u4ef7\u683c\uff0c\u662f\u6628\u5929\u4ef7\u683c\u7684\u5ef6\u7eed<\/strong>\u3002<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u4eca\u5929\u7684\u503c = \u5e38\u6570\u9879 + \u7cfb\u65701 \u00d7 \u6628\u5929\u7684\u503c + \u7cfb\u65702 \u00d7 \u524d\u5929\u7684\u503c + &#8230; + \u968f\u673a\u8bef\u5dee<\/strong><\/p>\n\n\n\n<p>\u8fd9\u5c31\u662fAR(p)\u6a21\u578b\uff0c\u5176\u4e2dp\u8868\u793a\u6211\u4eec\u8981\u56de\u6eaf\u591a\u5c11\u5929\u7684\u5386\u53f2\u6570\u636e\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 AR\u6a21\u578b\uff1a\u6700\u7b80\u5355\u7684\u60c5\u51b5<\/strong><\/h3>\n\n\n\n<p>\u8ba9\u6211\u4eec\u770b\u6700\u7b80\u5355\u7684AR(1)\u6a21\u578b:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Y<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;= \u03c6<\/strong><sub><strong>0<\/strong><\/sub><strong>&nbsp;+ \u03c6<\/strong><sub><strong>1<\/strong><\/sub><strong>&nbsp;\u00d7 Y<\/strong><sub><strong>t-1<\/strong><\/sub><strong>&nbsp;+ \u03b5<\/strong><sub><strong>t<\/strong><\/sub><\/p>\n\n\n\n<p>\u5176\u4e2d\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Y<sub>t<\/sub>\u00a0\u662f\u4eca\u5929\u7684\u503c<\/li>\n\n\n\n<li>\u03c6<sub>0<\/sub>\u00a0\u662f\u5e38\u6570\u9879(\u53ef\u4ee5\u7406\u89e3\u4e3a\u57fa\u51c6\u7ebf)<\/li>\n\n\n\n<li>\u03c6<sub>1<\/sub>\u00a0\u662f\u81ea\u56de\u5f52\u7cfb\u6570(\u51b3\u5b9a\u4e86&#8221;\u8bb0\u5fc6&#8221;\u7684\u5f3a\u5ea6)<\/li>\n\n\n\n<li>\u03b5<sub>t<\/sub>\u00a0\u662f\u968f\u673a\u8bef\u5dee(\u767d\u566a\u58f0)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 \u5173\u952e\u53c2\u6570\u03c6\u2081\u7684\u542b\u4e49<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th class=\"has-text-align-center\" data-align=\"center\">\u03c6\u2081\u7684\u503c<\/th><th class=\"has-text-align-center\" data-align=\"center\">\u542b\u4e49<\/th><th class=\"has-text-align-center\" data-align=\"center\">\u5e02\u573a\u8868\u73b0<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u03c6\u2081 = 0<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5b8c\u5168\u6ca1\u6709\u8bb0\u5fc6<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7eaf\u968f\u673a\u6e38\u8d70,\u4eca\u5929\u548c\u6628\u5929\u65e0\u5173<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">0 &lt; \u03c6\u2081 &lt; 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u6b63\u5411\u8bb0\u5fc6,\u4f46\u4f1a\u8870\u51cf<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u6da8\u4e86\u4f1a\u7ee7\u7eed\u6da8,\u4f46\u529b\u5ea6\u9010\u6e10\u51cf\u5f31<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u03c6\u2081 = 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5b8c\u5168\u8bb0\u5fc6<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u968f\u673a\u6e38\u8d70,\u8d8b\u52bf\u4f1a\u4e00\u76f4\u5ef6\u7eed<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u03c6\u2081 &gt; 1<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u8bb0\u5fc6\u653e\u5927<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7206\u70b8\u5f0f\u589e\u957f,\u4e0d\u7a33\u5b9a<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u03c6\u2081 &lt; 0<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u8d1f\u5411\u8bb0\u5fc6<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u6da8\u8dcc\u4ea4\u66ff,\u9707\u8361\u6a21\u5f0f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u26a0\ufe0f \u5e73\u7a33\u6027\u6761\u4ef6:<\/strong><\/p>\n\n\n\n<p>\u8981\u8ba9AR(1)\u6a21\u578b\u7a33\u5b9a\u53ef\u7528\uff0c\u5fc5\u987b\u6ee1\u8db3 |\u03c6\u2081| &lt; 1\u3002\u5982\u679c\u03c6\u2081 = 1\uff0c\u5e8f\u5217\u5c31\u53d8\u6210\u4e86\u968f\u673a\u6e38\u8d70\uff0c\u65e0\u6cd5\u9884\u6d4b\uff1b\u5982\u679c\u03c6\u2081 &gt; 1\uff0c\u5e8f\u5217\u4f1a\u7206\u70b8\u5f0f\u589e\u957f\uff0c\u5b8c\u5168\u5931\u63a7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.4 \u5982\u4f55\u8bc6\u522bAR\u6a21\u578b?<\/strong><\/h3>\n\n\n\n<p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7\u4e24\u4e2a\u5de5\u5177\u6765\u5224\u65ad\u662f\u5426\u9002\u5408\u7528AR\u6a21\u578b\uff1a<\/p>\n\n\n\n<p><strong>1. \u81ea\u76f8\u5173\u51fd\u6570(ACF)\u56fe<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ACF\u8861\u91cf\u7684\u662f\u5f53\u524d\u503c\u4e0e\u8fc7\u53bb\u5404\u671f\u503c\u7684\u76f8\u5173\u6027\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8eAR\u6a21\u578b,ACF\u4f1a\u5448\u73b0<strong>\u7f13\u6162\u8870\u51cf<\/strong>\u7684\u7279\u5f81(\u62d6\u5c3e)\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>2. \u504f\u81ea\u76f8\u5173\u51fd\u6570(PACF)\u56fe<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PACF\u8861\u91cf\u7684\u662f\u5254\u9664\u4e2d\u95f4\u5f71\u54cd\u540e,\u5f53\u524d\u503c\u4e0e\u8fc7\u53bb\u67d0\u671f\u503c\u7684\u76f4\u63a5\u76f8\u5173\u6027\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8eAR(p)\u6a21\u578b,PACF\u4f1a\u5728\u7b2cp\u9636\u540e<strong>\u7a81\u7136\u622a\u65ad<\/strong>(\u622a\u5c3e)\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th class=\"has-text-align-center\" data-align=\"center\">\u6a21\u578b\u7c7b\u578b<\/th><th class=\"has-text-align-center\" data-align=\"center\">ACF\u7279\u5f81<\/th><th class=\"has-text-align-center\" data-align=\"center\">PACF\u7279\u5f81<\/th><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">AR(p)<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u62d6\u5c3e(\u7f13\u6162\u8870\u51cf)<\/td><td class=\"has-text-align-center\" data-align=\"center\">p\u9636\u622a\u5c3e<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">MA(q)<\/td><td class=\"has-text-align-center\" data-align=\"center\">q\u9636\u622a\u5c3e<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u62d6\u5c3e(\u7f13\u6162\u8870\u51cf)<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">ARMA(p,q)<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u62d6\u5c3e<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u62d6\u5c3e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001ARMA\u6a21\u578b:\u60ef\u6027\u4e0e\u51b2\u51fb\u7684\u5b8c\u7f8e\u7ed3\u5408<\/strong><\/h2>\n\n\n\n<p>\u5355\u7eaf\u7684AR\u6a21\u578b\u53ea\u8003\u8651\u4e86&#8221;\u60ef\u6027&#8221;\uff0c\u5355\u7eaf\u7684MA\u6a21\u578b\u53ea\u8003\u8651\u4e86&#8221;\u51b2\u51fb&#8221;\u3002\u90a3\u80fd\u4e0d\u80fd\u628a\u4e24\u8005\u7ed3\u5408\u8d77\u6765\u5462?<\/p>\n\n\n\n<p>\u5f53\u7136\u53ef\u4ee5\uff01\u8fd9\u5c31\u662fARMA\u6a21\u578b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 ARMA\u6a21\u578b\u7684\u6570\u5b66\u8868\u8fbe<\/strong><\/h3>\n\n\n\n<p class=\"has-text-align-center\"><strong>Y<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;= \u03c6<\/strong><sub><strong>0<\/strong><\/sub><strong>&nbsp;+ \u03c6<\/strong><sub><strong>1<\/strong><\/sub><strong>Y<\/strong><sub><strong>t-1<\/strong><\/sub><strong>&nbsp;+ &#8230; + \u03c6<\/strong><sub><strong>p<\/strong><\/sub><strong>Y<\/strong><sub><strong>t-p<\/strong><\/sub><strong>&nbsp;+ \u03b5<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;+ \u03b8<\/strong><sub><strong>1<\/strong><\/sub><strong>\u03b5<\/strong><sub><strong>t-1<\/strong><\/sub><strong>&nbsp;+ &#8230; + \u03b8<\/strong><sub><strong>q<\/strong><\/sub><strong>\u03b5<\/strong><sub><strong>t-q<\/strong><\/sub><\/p>\n\n\n\n<p>\u7b80\u5355\u6765\u8bf4\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u524d\u534a\u90e8\u5206(\u03c6\u9879)\u662fAR\u90e8\u5206\uff0c\u6355\u6349&#8221;\u60ef\u6027&#8221;\u3002<\/li>\n\n\n\n<li>\u540e\u534a\u90e8\u5206(\u03b8\u9879)\u662fMA\u90e8\u5206\uff0c\u6355\u6349&#8221;\u51b2\u51fb&#8221;\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3.2 \u4e3a\u4ec0\u4e48\u9700\u8981ARMA?<\/h3>\n\n\n\n<p>\u5728\u771f\u5b9e\u7684\u91d1\u878d\u5e02\u573a\u4e2d\uff0c\u4ef7\u683c\u8d70\u52bf\u65e2\u53d7\u5386\u53f2\u4ef7\u683c\u5f71\u54cd(\u60ef\u6027)\uff0c\u4e5f\u53d7\u7a81\u53d1\u4e8b\u4ef6\u5f71\u54cd(\u51b2\u51fb)\uff0c\u5355\u4e00\u6a21\u578b\u5f80\u5f80\u65e0\u6cd5\u5b8c\u6574\u63cf\u8ff0\u8fd9\u79cd\u590d\u6742\u6027\u3002<\/p>\n\n\n\n<p><strong>\u2705 ARMA\u6a21\u578b\u7684\u4f18\u52bf:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u66f4\u7075\u6d3b\uff1a\u53ef\u4ee5\u540c\u65f6\u6355\u6349\u4e24\u79cd\u6a21\u5f0f\u3002<\/li>\n\n\n\n<li>\u66f4\u7cbe\u786e\uff1a\u51cf\u5c11\u4e86\u5355\u4e00\u6a21\u578b\u7684\u7cfb\u7edf\u6027\u504f\u5dee\u3002<\/li>\n\n\n\n<li>\u66f4\u7a33\u5065\uff1a\u5728\u4e0d\u540c\u5e02\u573a\u73af\u5883\u4e0b\u90fd\u6709\u8f83\u597d\u8868\u73b0\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001ARIMA\u6a21\u578b\uff1a\u5904\u7406\u975e\u5e73\u7a33\u6570\u636e\u7684\u5229\u5668<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>4.1 \u4ec0\u4e48\u662f\u5e73\u7a33\u6027?<\/strong><\/h3>\n\n\n\n<p>\u5728\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u4e2d\uff0c<strong>\u5e73\u7a33\u6027<\/strong>\u662f\u4e00\u4e2a\u6838\u5fc3\u6982\u5ff5\u3002\u4e00\u4e2a\u5e73\u7a33\u7684\u65f6\u95f4\u5e8f\u5217\u9700\u8981\u6ee1\u8db3\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5747\u503c\u6052\u5b9a\uff1a\u4e0d\u968f\u65f6\u95f4\u53d8\u5316\u3002<\/li>\n\n\n\n<li>\u65b9\u5dee\u6052\u5b9a\uff1a\u6ce2\u52a8\u5e45\u5ea6\u7a33\u5b9a\u3002<\/li>\n\n\n\n<li>\u81ea\u534f\u65b9\u5dee\u6052\u5b9a\uff1a\u4e0d\u540c\u65f6\u671f\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u53ea\u4e0e\u65f6\u95f4\u95f4\u9694\u6709\u5173\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u4f46\u73b0\u5b9e\u4e2d\u7684\u91d1\u878d\u6570\u636e,\u6bd4\u5982\u80a1\u4ef7\u3001GDP\u3001\u9500\u552e\u989d\uff0c\u5f80\u5f80\u90fd\u662f<strong>\u975e\u5e73\u7a33<\/strong>\u7684\u2014\u2014\u5b83\u4eec\u6709\u660e\u663e\u7684\u4e0a\u5347\u6216\u4e0b\u964d\u8d8b\u52bf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.2 \u5dee\u5206:\u8ba9\u6570\u636e\u53d8\u5e73\u7a33\u7684\u9b54\u6cd5<\/strong><\/h3>\n\n\n\n<p>ARIMA\u4e2d\u7684&#8221;I&#8221;\u4ee3\u8868Integrated(\u5dee\u5206\u6574\u5408)\u3002\u5dee\u5206\u662f\u4e00\u79cd\u7b80\u5355\u4f46\u6709\u6548\u7684\u65b9\u6cd5,\u53ef\u4ee5\u628a\u975e\u5e73\u7a33\u5e8f\u5217\u8f6c\u5316\u4e3a\u5e73\u7a33\u5e8f\u5217\u3002<\/p>\n\n\n\n<p><strong>\u4e00\u9636\u5dee\u5206:<\/strong><\/p>\n\n\n\n<p><strong>\u0394Y<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;= Y<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;&#8211; Y<\/strong><sub><strong>t-1<\/strong><\/sub><\/p>\n\n\n\n<p>\u8fd9\u76f8\u5f53\u4e8e\u8ba1\u7b97\u6bcf\u5929\u7684<strong>\u6da8\u8dcc\u5e45<\/strong>,\u800c\u4e0d\u662f\u770b\u7edd\u5bf9\u4ef7\u683c\u3002<\/p>\n\n\n\n<p><strong>\u4e8c\u9636\u5dee\u5206:<\/strong><\/p>\n\n\n\n<p><strong>\u0394\u00b2Y<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;= \u0394Y<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;&#8211; \u0394Y<\/strong><sub><strong>t-1<\/strong><\/sub><\/p>\n\n\n\n<p>\u8fd9\u76f8\u5f53\u4e8e\u8ba1\u7b97\u6da8\u8dcc\u5e45\u7684<strong>\u53d8\u5316\u7387<\/strong>\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udca1 \u91d1\u878d\u5e94\u7528\u6280\u5de7:<\/strong><\/p>\n\n\n\n<p>\u5728\u91d1\u878d\u9886\u57df,\u6211\u4eec\u5e38\u7528\u7684<strong>\u5bf9\u6570\u6536\u76ca\u7387<\/strong>\u5176\u5b9e\u5c31\u662f\u4e00\u79cd\u5dee\u5206:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Log_Return<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;= log(P<\/strong><sub><strong>t<\/strong><\/sub><strong>) &#8211; log(P<\/strong><sub><strong>t-1<\/strong><\/sub><strong>) = log(P<\/strong><sub><strong>t<\/strong><\/sub><strong>&nbsp;\/ P<\/strong><sub><strong>t-1<\/strong><\/sub><strong>)<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.3 ARIMA(p,d,q)\u6a21\u578b<\/strong><\/h3>\n\n\n\n<p>ARIMA\u6a21\u578b\u6709\u4e09\u4e2a\u6838\u5fc3\u53c2\u6570\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>p\uff1a\u81ea\u56de\u5f52\u9636\u6570(AR\u90e8\u5206,\u770b\u591a\u5c11\u5929\u7684\u5386\u53f2)\u3002<\/li>\n\n\n\n<li>d\uff1a\u5dee\u5206\u6b21\u6570(\u8ba9\u6570\u636e\u53d8\u5e73\u7a33)\u3002<\/li>\n\n\n\n<li>q\uff1a\u79fb\u52a8\u5e73\u5747\u9636\u6570(MA\u90e8\u5206,\u770b\u591a\u5c11\u671f\u7684\u51b2\u51fb)\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L04wy31MGmDlLjAgauyYicxRRRWE0xU7jeYnARedibVf4oic9GgibXF6iaZ04E9DprXXHhSRTlfPxcfNhQ\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>\u26a0\ufe0f \u53c2\u6570\u9009\u62e9\u7684\u4e00\u822c\u89c4\u5f8b:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>d\u901a\u5e38\u53d60\u30011\u62162\uff0c\u5f88\u5c11\u8d85\u8fc72\u3002<\/li>\n\n\n\n<li>p\u548cq\u901a\u5e38\u57280-3\u4e4b\u95f4\u3002<\/li>\n\n\n\n<li>\u53c2\u6570\u8d8a\u5927\uff0c\u6a21\u578b\u8d8a\u590d\u6742\uff0c\u4f46\u4e0d\u4e00\u5b9a\u8d8a\u597d\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001Box-Jenkins\u65b9\u6cd5\u8bba\uff1a\u6784\u5efaARIMA\u6a21\u578b\u7684\u6807\u51c6\u6d41\u7a0b<\/strong><\/h2>\n\n\n\n<p>Box\u548cJenkins\u63d0\u51fa\u4e86\u4e00\u5957\u7cfb\u7edf\u7684\u5efa\u6a21\u6d41\u7a0b\uff0c\u8fd9\u5957\u65b9\u6cd5\u8bba\u81f3\u4eca\u4ecd\u662f\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u7684\u91d1\u6807\u51c6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.1 \u7b2c\u4e00\u6b65\uff1a\u8bc6\u522b(Identification)<\/strong><\/h3>\n\n\n\n<p><strong>5.1.1 \u5e73\u7a33\u6027\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>\u6700\u5e38\u7528\u7684\u662f<strong>ADF\u68c0\u9a8c<\/strong>(Augmented Dickey-Fuller Test)\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u539f\u5047\u8bbeH\u2080\uff1a\u5e8f\u5217\u975e\u5e73\u7a33(\u5b58\u5728\u5355\u4f4d\u6839)\u3002<\/li>\n\n\n\n<li>\u5907\u62e9\u5047\u8bbeH\u2081\uff1a\u5e8f\u5217\u5e73\u7a33\u3002<\/li>\n\n\n\n<li>\u5982\u679cp\u503c &lt; 0.05\uff1a\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u8ba4\u4e3a\u5e8f\u5217\u5e73\u7a33\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>5.1.2 \u786e\u5b9a\u5dee\u5206\u6b21\u6570d<\/strong><\/p>\n\n\n\n<p>\u89c2\u5bdfACF\u56fe\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679cACF\u572810\u9636\u4ee5\u4e0a\u90fd\u663e\u8457\uff0c\u8bf4\u660e\u9700\u8981\u5dee\u5206\uff1b<\/li>\n\n\n\n<li>\u5982\u679cACF\u57281\u9636\u5c31\u622a\u5c3e\uff0c\u8bf4\u660e\u5dee\u5206\u8fc7\u5ea6\u4e86\uff1b<\/li>\n\n\n\n<li>\u6700\u4f73\u72b6\u6001\u662fACF\u5148\u62d6\u5c3e\u51e0\u9636\uff0c\u7136\u540e\u622a\u5c3e\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>5.1.3 \u786e\u5b9ap\u548cq<\/strong><\/p>\n\n\n\n<p>\u901a\u8fc7ACF\u548cPACF\u56fe\u6765\u5224\u65ad\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PACF\u5728p\u9636\u622a\u5c3e \u2192 AR(p)\u6a21\u578b\uff1b<\/li>\n\n\n\n<li>ACF\u5728q\u9636\u622a\u5c3e \u2192 MA(q)\u6a21\u578b\uff1b<\/li>\n\n\n\n<li>\u4e24\u8005\u90fd\u62d6\u5c3e \u2192 ARMA(p,q)\u6a21\u578b\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.2 \u7b2c\u4e8c\u6b65\uff1a\u4f30\u8ba1\u4e0e\u9009\u62e9(Estimation &amp; Selection)<\/strong><\/h3>\n\n\n\n<p><strong>5.2.1 \u53c2\u6570\u4f30\u8ba1<\/strong><\/p>\n\n\n\n<p>\u4f7f\u7528<strong>\u6700\u5927\u4f3c\u7136\u4f30\u8ba1(MLE)<\/strong>\u65b9\u6cd5\u6765\u8ba1\u7b97\u6a21\u578b\u53c2\u6570\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u901a\u5e38\u7531\u8f6f\u4ef6\u81ea\u52a8\u5b8c\u6210\u3002<\/p>\n\n\n\n<p><strong>5.2.2 \u6a21\u578b\u9009\u62e9<\/strong><\/p>\n\n\n\n<p>\u5f53\u6709\u591a\u4e2a\u5019\u9009\u6a21\u578b\u65f6\uff0c\u5982\u4f55\u9009\u62e9\u6700\u4f18\u6a21\u578b\uff1f\u4e3b\u8981\u770b\u4e24\u4e2a\u6307\u6807\uff1a<\/p>\n\n\n\n<p><strong>AIC(\u8d64\u6c60\u4fe1\u606f\u51c6\u5219):<\/strong><strong>AIC = -2\u00d7log(\u4f3c\u7136\u51fd\u6570) + 2\u00d7\u53c2\u6570\u4e2a\u6570<\/strong><\/p>\n\n\n\n<p><strong>BIC(\u8d1d\u53f6\u65af\u4fe1\u606f\u51c6\u5219):<\/strong><strong>BIC = -2\u00d7log(\u4f3c\u7136\u51fd\u6570) + log(\u6837\u672c\u91cf)\u00d7\u53c2\u6570\u4e2a\u6570<\/strong><\/p>\n\n\n\n<p><strong>\ud83d\udca1 \u9009\u62e9\u539f\u5219:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AIC\u548cBIC\u8d8a\u5c0f\u8d8a\u597d\uff1b<\/li>\n\n\n\n<li>BIC\u5bf9\u590d\u6742\u6a21\u578b\u7684\u60e9\u7f5a\u66f4\u4e25\u683c\uff1b<\/li>\n\n\n\n<li>\u9075\u5faa<strong>\u7b80\u7ea6\u539f\u5219\uff1a<\/strong>\u5728\u6548\u679c\u76f8\u8fd1\u7684\u60c5\u51b5\u4e0b\uff0c\u9009\u62e9\u53c2\u6570\u66f4\u5c11\u7684\u6a21\u578b\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.3 \u7b2c\u4e09\u6b65\uff1a\u8bca\u65ad\u68c0\u9a8c(Diagnostic Checking)<\/strong><\/h3>\n\n\n\n<p>\u6a21\u578b\u5efa\u597d\u540e\uff0c\u8fd8\u8981\u68c0\u9a8c\u662f\u5426\u771f\u7684\u53ef\u9760\u3002<\/p>\n\n\n\n<p><strong>5.3.1 \u6b8b\u5dee\u5206\u6790<\/strong><\/p>\n\n\n\n<p>\u597d\u7684\u6a21\u578b\uff0c\u6b8b\u5dee\u5e94\u8be5\u662f<strong>\u767d\u566a\u58f0<\/strong>(\u5b8c\u5168\u968f\u673a,\u65e0\u89c4\u5f8b)\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5747\u503c\u4e3a0<\/li>\n\n\n\n<li>\u65b9\u5dee\u6052\u5b9a<\/li>\n\n\n\n<li>\u65e0\u81ea\u76f8\u5173\u6027<\/li>\n<\/ul>\n\n\n\n<p><strong>5.3.2 Ljung-Box\u68c0\u9a8c<\/strong><\/p>\n\n\n\n<p>\u8fd9\u662f\u68c0\u9a8c\u6b8b\u5dee\u662f\u5426\u4e3a\u767d\u566a\u58f0\u7684\u7edf\u8ba1\u68c0\u9a8c\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u539f\u5047\u8bbeH\u2080\uff1a\u6b8b\u5dee\u5e8f\u5217\u5404\u671f\u4e4b\u95f4\u76f8\u4e92\u72ec\u7acb(\u662f\u767d\u566a\u58f0)\uff1b<\/li>\n\n\n\n<li>\u5982\u679cp\u503c > 0.05\uff0c\u8bf4\u660e\u6a21\u578b\u62df\u5408\u826f\u597d\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001Python\u5b9e\u6218\uff1a\u624b\u628a\u624b\u6559\u4f60\u6784\u5efaARIMA\u6a21\u578b<\/strong><\/h2>\n\n\n\n<p>\u7406\u8bba\u8bb2\u5b8c\u4e86\uff0c\u73b0\u5728\u8fdb\u5165\u5b9e\u6218\u73af\u8282\u3002\u6211\u4f1a\u7528Google\u80a1\u7968\u6570\u636e\u4f5c\u4e3a\u6848\u4f8b\uff0c\u5e26\u4f60\u4e00\u6b65\u6b65\u6784\u5efaARIMA\u6a21\u578b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.1 \u73af\u5883\u51c6\u5907\u4e0e\u6570\u636e\u52a0\u8f7d<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u5bfc\u5165\u5fc5\u8981\u7684\u5e93<\/code><code>import&nbsp;pandas&nbsp;as&nbsp;pd<\/code><code>import&nbsp;numpy&nbsp;as&nbsp;np<\/code><code>import&nbsp;matplotlib.pyplot&nbsp;as&nbsp;plt<\/code><code>import&nbsp;seaborn&nbsp;as&nbsp;sns<\/code><code>from&nbsp;statsmodels.tsa.stattools&nbsp;import&nbsp;adfuller<\/code><code>from&nbsp;statsmodels.graphics.tsaplots&nbsp;import&nbsp;plot_acf, plot_pacf<\/code><code>from&nbsp;statsmodels.tsa.arima.model&nbsp;import&nbsp;ARIMA<\/code><code>from&nbsp;statsmodels.stats.diagnostic&nbsp;import&nbsp;acorr_ljungbox<\/code><code>import&nbsp;warnings<\/code><code><\/code><code># \u8bbe\u7f6e\u4e2d\u6587\u663e\u793a\u548c\u6837\u5f0f<\/code><code>plt.rcParams&#91;'font.sans-serif'] = &#91;'SimHei']<\/code><code>plt.rcParams&#91;'axes.unicode_minus'] =&nbsp;False<\/code><code>sns.set(style=\"whitegrid\")<\/code><code>warnings.filterwarnings(\"ignore\")<\/code><code><\/code><code># \u52a0\u8f7d\u6570\u636e<\/code><code>df = pd.read_csv('google_stock.csv')<\/code><code>df&#91;'Date'] = pd.to_datetime(df&#91;'Date'])<\/code><code>df.set_index('Date', inplace=True)<\/code><code><\/code><code># \u67e5\u770b\u6570\u636e<\/code><code>print(df.head())<\/code><code>print(f\"\u6570\u636e\u5f62\u72b6:&nbsp;{df.shape}\")<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.2 \u6570\u636e\u9884\u5904\u7406\uff1a\u8ba1\u7b97\u5bf9\u6570\u6536\u76ca\u7387<\/strong><\/h3>\n\n\n\n<p>\u5728\u91d1\u878d\u9886\u57df\uff0c\u6211\u4eec\u901a\u5e38\u4e0d\u76f4\u63a5\u5bf9\u4ef7\u683c\u5efa\u6a21\uff0c\u800c\u662f\u5bf9<strong>\u5bf9\u6570\u6536\u76ca\u7387<\/strong>\u5efa\u6a21\u3002\u539f\u56e0\u6709\u4e24\u4e2a:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5bf9\u6570\u6536\u76ca\u7387\u66f4\u63a5\u8fd1\u5e73\u7a33\u5e8f\u5217\uff1b<\/li>\n\n\n\n<li>\u5bf9\u6570\u6536\u76ca\u7387\u5177\u6709\u53ef\u52a0\u6027,\u4fbf\u4e8e\u8ba1\u7b97\u7d2f\u79ef\u6536\u76ca\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u8ba1\u7b97\u5bf9\u6570\u6536\u76ca\u7387(\u76f8\u5f53\u4e8e\u4e00\u9636\u5dee\u5206)<\/code><code>df&#91;'Log_Return'] = np.log(df&#91;'Close']).diff().dropna()<\/code><code><\/code><code># \u53ef\u89c6\u5316<\/code><code>fig, axes = plt.subplots(2,&nbsp;1, figsize=(14,&nbsp;8))<\/code><code><\/code><code># \u539f\u59cb\u4ef7\u683c<\/code><code>axes&#91;0].plot(df.index, df&#91;'Close'], color='blue', linewidth=1.5)<\/code><code>axes&#91;0].set_title('Google\u80a1\u7968\u6536\u76d8\u4ef7', fontsize=14, fontweight='bold')<\/code><code>axes&#91;0].set_ylabel('\u4ef7\u683c($)', fontsize=12)<\/code><code>axes&#91;0].grid(True, alpha=0.3)<\/code><code><\/code><code># \u5bf9\u6570\u6536\u76ca\u7387<\/code><code>axes&#91;1].plot(df.index, df&#91;'Log_Return'], color='green', linewidth=1)<\/code><code>axes&#91;1].set_title('Google\u80a1\u7968\u5bf9\u6570\u6536\u76ca\u7387', fontsize=14, fontweight='bold')<\/code><code>axes&#91;1].set_ylabel('\u6536\u76ca\u7387', fontsize=12)<\/code><code>axes&#91;1].axhline(y=0, color='red', linestyle='--', alpha=0.5)<\/code><code>axes&#91;1].grid(True, alpha=0.3)<\/code><code><\/code><code>plt.tight_layout()<\/code><code>plt.show()<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.3 \u5e73\u7a33\u6027\u68c0\u9a8c\uff1aADF\u68c0\u9a8c<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code>def&nbsp;adf_test(series, name=''):<\/code><code>&nbsp; &nbsp;&nbsp;\"\"\"<\/code><code>&nbsp; &nbsp; \u6267\u884cADF\u68c0\u9a8c\u5e76\u8f93\u51fa\u7ed3\u679c<\/code><code>&nbsp; &nbsp; \"\"\"<\/code><code>&nbsp; &nbsp; result = adfuller(series.dropna())<\/code><code><\/code><code>&nbsp; &nbsp;&nbsp;print(f'\\n===&nbsp;{name}&nbsp;\u7684ADF\u68c0\u9a8c\u7ed3\u679c ===')<\/code><code>&nbsp; &nbsp;&nbsp;print(f'ADF\u7edf\u8ba1\u91cf:&nbsp;{result&#91;0]:.6f}')<\/code><code>&nbsp; &nbsp;&nbsp;print(f'p\u503c:&nbsp;{result&#91;1]:.6f}')<\/code><code>&nbsp; &nbsp;&nbsp;print(f'\u4f7f\u7528\u7684\u6ede\u540e\u9636\u6570:&nbsp;{result&#91;2]}')<\/code><code>&nbsp; &nbsp;&nbsp;print(f'\u89c2\u6d4b\u503c\u6570\u91cf:&nbsp;{result&#91;3]}')<\/code><code>&nbsp; &nbsp;&nbsp;print('\u4e34\u754c\u503c:')<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;key, value&nbsp;in&nbsp;result&#91;4].items():<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f' &nbsp;{key}:&nbsp;{value:.3f}')<\/code><code><\/code><code>&nbsp; &nbsp;&nbsp;# \u5224\u65ad\u7ed3\u679c<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;result&#91;1] &lt;&nbsp;0.05:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f'\\n\u7ed3\u8bba: p\u503c &lt; 0.05,\u62d2\u7edd\u539f\u5047\u8bbe,\u5e8f\u5217\u662f\u5e73\u7a33\u7684 \u2713')<\/code><code>&nbsp; &nbsp;&nbsp;else:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f'\\n\u7ed3\u8bba: p\u503c &gt;= 0.05,\u65e0\u6cd5\u62d2\u7edd\u539f\u5047\u8bbe,\u5e8f\u5217\u975e\u5e73\u7a33 \u2717')<\/code><code><\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;result<\/code><code># \u5bf9\u5bf9\u6570\u6536\u76ca\u7387\u8fdb\u884cADF\u68c0\u9a8c<\/code><code>adf_result = adf_test(df&#91;'Log_Return'],&nbsp;'Google\u5bf9\u6570\u6536\u76ca\u7387')<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.4 ACF\u548cPACF\u5206\u6790\uff1a\u786e\u5b9ap\u548cq<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u7ed8\u5236ACF\u548cPACF\u56fe<\/code><code>fig, (ax1, ax2) = plt.subplots(2,&nbsp;1, figsize=(14,&nbsp;10))<\/code><code><\/code><code># ACF\u56fe<\/code><code>plot_acf(df&#91;'Log_Return'].dropna(), lags=30, ax=ax1,&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;title='\u81ea\u76f8\u5173\u51fd\u6570(ACF) - Google\u5bf9\u6570\u6536\u76ca\u7387')<\/code><code>ax1.set_xlabel('\u6ede\u540e\u9636\u6570', fontsize=12)<\/code><code>ax1.set_ylabel('\u76f8\u5173\u7cfb\u6570', fontsize=12)<\/code><code><\/code><code># PACF\u56fe<\/code><code>plot_pacf(df&#91;'Log_Return'].dropna(), lags=30, ax=ax2,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;title='\u504f\u81ea\u76f8\u5173\u51fd\u6570(PACF) - Google\u5bf9\u6570\u6536\u76ca\u7387')<\/code><code>ax2.set_xlabel('\u6ede\u540e\u9636\u6570', fontsize=12)<\/code><code>ax2.set_ylabel('\u76f8\u5173\u7cfb\u6570', fontsize=12)<\/code><code><\/code><code>plt.tight_layout()<\/code><code>plt.show()<\/code><\/code><\/pre>\n\n\n\n<p><strong>\ud83d\udca1 \u5982\u4f55\u89e3\u8bfbACF\u548cPACF\u56fe?<\/strong><\/p>\n\n\n\n<p>\u89c2\u5bdf\u56fe\u4e2d\u7684\u84dd\u8272\u9634\u5f71\u533a\u57df(\u7f6e\u4fe1\u533a\u95f4)\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c\u67f1\u5b50\u8d85\u51fa\u9634\u5f71\u533a\u57df,\u8bf4\u660e\u8be5\u9636\u6570\u663e\u8457\uff1b<\/li>\n\n\n\n<li>ACF\u5728\u67d0\u9636\u540e\u90fd\u5728\u9634\u5f71\u5185 \u2192 \u8be5\u9636\u622a\u5c3e\uff1b<\/li>\n\n\n\n<li>ACF\u7f13\u6162\u8870\u51cf \u2192 \u62d6\u5c3e\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.5 \u7f51\u683c\u641c\u7d22\uff1a\u5bfb\u627e\u6700\u4f18\u53c2\u6570<\/strong><\/h3>\n\n\n\n<p>\u4e0e\u5176\u624b\u52a8\u5224\u65adp\u548cq\uff0c\u4e0d\u5982\u8ba9\u7a0b\u5e8f\u81ea\u52a8\u641c\u7d22\u6240\u6709\u53ef\u80fd\u7684\u7ec4\u5408\uff0c\u627e\u51faAIC\u6700\u5c0f\u7684\u6a21\u578b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u5b9a\u4e49\u53c2\u6570\u8303\u56f4<\/code><code>p_values =&nbsp;range(0,&nbsp;3) &nbsp;# AR\u9636\u6570<\/code><code>d_values = &#91;0] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u5bf9\u6570\u6536\u76ca\u7387\u5df2\u7ecf\u662f\u5dee\u5206\u540e\u7684,\u6240\u4ee5d=0<\/code><code>q_values =&nbsp;range(0,&nbsp;3) &nbsp;# MA\u9636\u6570<\/code><code><\/code><code>best_aic =&nbsp;float(\"inf\")<\/code><code>best_order =&nbsp;None<\/code><code>best_model =&nbsp;None<\/code><code>print(\"\u5f00\u59cb\u7f51\u683c\u641c\u7d22,\u5bfb\u627e\u6700\u4f18ARIMA\u6a21\u578b...\\n\")<\/code><code>print(\"\u6a21\u578b\\t\\tAIC\u503c\")<\/code><code>print(\"-\"&nbsp;*&nbsp;40)<\/code><code><\/code><code># \u904d\u5386\u6240\u6709\u53c2\u6570\u7ec4\u5408<\/code><code>for&nbsp;p&nbsp;in&nbsp;p_values:<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;d&nbsp;in&nbsp;d_values:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;for&nbsp;q&nbsp;in&nbsp;q_values:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;try:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;# \u62df\u5408\u6a21\u578b<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model = ARIMA(df&#91;'Log_Return'].dropna(), order=(p, d, q))<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; results = model.fit()<\/code><code><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;# \u8f93\u51fa\u7ed3\u679c<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;print(f\"ARIMA({p},{d},{q})\\t{results.aic:.2f}\")<\/code><code><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;# \u66f4\u65b0\u6700\u4f18\u6a21\u578b<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;results.aic &lt; best_aic:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; best_aic = results.aic<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; best_order = (p, d, q)<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; best_model = results<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;except:<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;continue<\/code><code><\/code><code>print(\"\\n\"&nbsp;+&nbsp;\"=\"&nbsp;*&nbsp;40)<\/code><code>print(f\"\u6700\u4f18\u6a21\u578b: ARIMA{best_order}\")<\/code><code>print(f\"\u6700\u5c0fAIC\u503c:&nbsp;{best_aic:.2f}\")<\/code><code>print(\"=\"&nbsp;*&nbsp;40)<\/code><code><\/code><code># \u8f93\u51fa\u6700\u4f18\u6a21\u578b\u7684\u8be6\u7ec6\u4fe1\u606f<\/code><code>print(\"\\n\u6700\u4f18\u6a21\u578b\u6458\u8981:\")<\/code><code>print(best_model.summary())<\/code><\/code><\/pre>\n\n\n\n<p><strong>\u7ed3\u679c\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L04wy31MGmDlLjAgauyYicxR3HyMnSQMSrU8SNCia4VdY8u1P002lyB6FOJA5v32UT65jGZo3uhjuUg\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><br><strong>6.6 \u6a21\u578b\u8bca\u65ad\uff1a\u6b8b\u5dee\u68c0\u9a8c<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u63d0\u53d6\u6b8b\u5dee<\/code><code>residuals&nbsp;= best_model.resid<\/code><code><\/code><code># 1. \u6b8b\u5dee\u53ef\u89c6\u5316<\/code><code>fig, axes = plt.subplots(2,&nbsp;2, figsize=(15,&nbsp;10))<\/code><code><\/code><code># \u6b8b\u5dee\u65f6\u5e8f\u56fe<\/code><code>axes&#91;0,&nbsp;0].plot(residuals, color='blue', linewidth=1)<\/code><code>axes&#91;0,&nbsp;0].axhline(y=0, color='red', linestyle='--')<\/code><code>axes&#91;0,&nbsp;0].set_title('\u6b8b\u5dee\u65f6\u5e8f\u56fe', fontsize=12, fontweight='bold')<\/code><code>axes&#91;0,&nbsp;0].set_ylabel('\u6b8b\u5dee', fontsize=10)<\/code><code><\/code><code># \u6b8b\u5dee\u76f4\u65b9\u56fe<\/code><code>axes&#91;0,&nbsp;1].hist(residuals, bins=30, color='green', alpha=0.7, edgecolor='black')<\/code><code>axes&#91;0,&nbsp;1].set_title('\u6b8b\u5dee\u5206\u5e03\u76f4\u65b9\u56fe', fontsize=12, fontweight='bold')<\/code><code>axes&#91;0,&nbsp;1].set_xlabel('\u6b8b\u5dee\u503c', fontsize=10)<\/code><code>axes&#91;0,&nbsp;1].set_ylabel('\u9891\u6570', fontsize=10)<\/code><code><\/code><code># \u6b8b\u5deeACF\u56fe<\/code><code>plot_acf(residuals, lags=20, ax=axes&#91;1,&nbsp;0])<\/code><code>axes&#91;1,&nbsp;0].set_title('\u6b8b\u5deeACF\u56fe', fontsize=12, fontweight='bold')<\/code><code><\/code><code># \u6b8b\u5deeQ-Q\u56fe<\/code><code>from&nbsp;scipy import stats<\/code><code>stats.probplot(residuals, dist=\"norm\", plot=axes&#91;1,&nbsp;1])<\/code><code>axes&#91;1,&nbsp;1].set_title('\u6b8b\u5deeQ-Q\u56fe', fontsize=12, fontweight='bold')<\/code><code><\/code><code>plt.tight_layout()<\/code><code>plt.show()<\/code><code><\/code><code># 2. Ljung-Box\u68c0\u9a8c<\/code><code>lb_test&nbsp;= acorr_ljungbox(residuals, lags=&#91;10], return_df=True)<\/code><code>print(\"\\n=== Ljung-Box\u68c0\u9a8c\u7ed3\u679c ===\")<\/code><code>print(lb_test)<\/code><code>print(\"\\n\u89e3\u8bfb:\")<\/code><code>if&nbsp;lb_test&#91;'lb_pvalue'].values&#91;0] &gt;&nbsp;0.05:<\/code><code>&nbsp; &nbsp;&nbsp;print(\"p\u503c &gt; 0.05,\u6b8b\u5dee\u4e3a\u767d\u566a\u58f0,\u6a21\u578b\u62df\u5408\u826f\u597d \u2713\")<\/code><code>else:<\/code><code>&nbsp; &nbsp;&nbsp;print(\"p\u503c &lt;= 0.05,\u6b8b\u5dee\u5b58\u5728\u81ea\u76f8\u5173,\u6a21\u578b\u9700\u8981\u6539\u8fdb \u2717\")<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.7 \u6a21\u578b\u9884\u6d4b<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code># \u8fdb\u884c\u9884\u6d4b(\u9884\u6d4b\u672a\u67655\u671f)<\/code><code>forecast_steps&nbsp;=&nbsp;5<\/code><code>forecast&nbsp;= best_model.forecast(steps=forecast_steps)<\/code><code><\/code><code>print(f\"\\n\u672a\u6765{forecast_steps}\u671f\u7684\u9884\u6d4b\u503c:\")<\/code><code>print(forecast)<\/code><code><\/code><code># \u53ef\u89c6\u5316\u9884\u6d4b\u7ed3\u679c<\/code><code>fig, ax = plt.subplots(figsize=(14,&nbsp;6))<\/code><code><\/code><code># \u7ed8\u5236\u5386\u53f2\u6570\u636e(\u6700\u540e100\u4e2a\u70b9)<\/code><code>historical&nbsp;= df&#91;'Log_Return'].dropna()&#91;-100:]<\/code><code>ax.plot(historical.index, historical.values,&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;label='\u5386\u53f2\u6570\u636e', color='blue', linewidth=1.5)<\/code><code><\/code><code># \u7ed8\u5236\u9884\u6d4b\u503c<\/code><code>forecast_index&nbsp;= pd.date_range(start=historical.index&#91;-1],&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;periods=forecast_steps+1, freq='D')&#91;1:]<\/code><code><\/code><code>ax.plot(forecast_index, forecast,&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;label='\u9884\u6d4b\u503c', color='red', linewidth=2, marker='o')<\/code><code>ax.set_title(f'ARIMA{best_order}\u6a21\u578b\u9884\u6d4b\u7ed3\u679c', fontsize=14, fontweight='bold')<\/code><code>ax.set_xlabel('\u65e5\u671f', fontsize=12)<\/code><code>ax.set_ylabel('\u5bf9\u6570\u6536\u76ca\u7387', fontsize=12)<\/code><code>ax.legend(fontsize=10)<\/code><code>ax.grid(True, alpha=0.3)<\/code><code><\/code><code>plt.tight_layout()<\/code><code>plt.show()<\/code><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L04wy31MGmDlLjAgauyYicxRicP75nOgJYFanQ5nPjpibQFyMOibA762d5wgC9Q7gibiaASdsTLSgLQPHZg\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/Vk07qSNq7L04wy31MGmDlLjAgauyYicxRVbwhppot93yjFIZgE38s38H9BeAibG32YJhCjBcFnDVa84QTOeiadbVw\/640?wx_fmt=png&amp;from=appmsg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u73b0\u5728\u53ef\u4ee5\u67e5\u770b\u201clb_pvalue\u201d\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c p \u503c > 0.05\uff1a\u6210\u529f\u3002\u6211\u4eec\u63a5\u53d7\u539f\u5047\u8bbe H0\uff08\u6b8b\u5dee\u4e3a\u767d\u566a\u58f0\uff09\u3002\u6a21\u578b\u6709\u6548\u3002<\/li>\n\n\n\n<li>\u5982\u679c p \u503c &lt; 0.05\uff1a\u5931\u8d25\u3002\u6b8b\u5dee\u4ecd\u7136\u5b58\u5728\u6a21\u5f0f\u3002\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u66f4\u597d\u7684\u6a21\u578b\uff08\u6216\u8bb8\u53ef\u4ee5\u589e\u52a0 p \u503c\u6216 q \u503c\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001ARIMA\u6a21\u578b\u7684\u5c40\u9650\u6027\u4e0e\u6539\u8fdb\u65b9\u5411<\/strong><\/h2>\n\n\n\n<p>\u867d\u7136ARIMA\u6a21\u578b\u5f3a\u5927\uff0c\u4f46\u5b83\u4e5f\u6709\u660e\u663e\u7684\u5c40\u9650\u6027\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7.1 \u65e0\u6cd5\u6355\u6349\u6ce2\u52a8\u7387\u805a\u96c6<\/strong><\/h3>\n\n\n\n<p>\u5728\u91d1\u878d\u5e02\u573a\u4e2d\uff0c\u6709\u4e00\u4e2a\u8457\u540d\u7684\u73b0\u8c61\u53eb<strong>\u6ce2\u52a8\u7387\u805a\u96c6<\/strong>(Volatility Clustering):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5927\u6ce2\u52a8\u540e\u9762\u5f80\u5f80\u8ddf\u7740\u5927\u6ce2\u52a8\u3002<\/li>\n\n\n\n<li>\u5c0f\u6ce2\u52a8\u540e\u9762\u5f80\u5f80\u8ddf\u7740\u5c0f\u6ce2\u52a8\u3002<\/li>\n<\/ul>\n\n\n\n<p>ARIMA\u6a21\u578b\u5047\u8bbe\u8bef\u5dee\u9879\u7684\u65b9\u5dee\u662f\u6052\u5b9a\u7684,\u65e0\u6cd5\u6355\u6349\u8fd9\u79cd\u7279\u5f81\u3002<\/p>\n\n\n\n<p><strong>\u2705 \u89e3\u51b3\u65b9\u6848\uff1a<\/strong>\u4f7f\u7528ARCH\/GARCH\u6a21\u578b\u6765\u5efa\u6a21\u6ce2\u52a8\u7387\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7.2 \u53ea\u80fd\u5904\u7406\u5355\u53d8\u91cf<\/strong><\/h3>\n\n\n\n<p>ARIMA\u662f\u5355\u53d8\u91cf\u6a21\u578b\uff0c\u53ea\u80fd\u6839\u636e\u81ea\u8eab\u5386\u53f2\u6765\u9884\u6d4b\u3002\u4f46\u73b0\u5b9e\u4e2d\uff0c\u80a1\u4ef7\u4f1a\u53d7\u5230\u591a\u79cd\u56e0\u7d20\u5f71\u54cd(\u6210\u4ea4\u91cf\u3001\u5229\u7387\u3001\u6c47\u7387\u7b49)\u3002<\/p>\n\n\n\n<p><strong>\u2705 \u89e3\u51b3\u65b9\u6848:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ARIMAX\u6a21\u578b\uff1a\u52a0\u5165\u5916\u751f\u53d8\u91cf\u3002<\/li>\n\n\n\n<li>VAR\u6a21\u578b\uff1a\u591a\u53d8\u91cf\u65f6\u95f4\u5e8f\u5217\u6a21\u578b\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7.3 \u5bf9\u957f\u671f\u9884\u6d4b\u6548\u679c\u4e0d\u4f73<\/strong><\/h3>\n\n\n\n<p>ARIMA\u6a21\u578b\u7684\u9884\u6d4b\u7cbe\u5ea6\u4f1a\u968f\u7740\u9884\u6d4b\u671f\u6570\u7684\u589e\u52a0\u800c\u5feb\u901f\u4e0b\u964d\u3002\u901a\u5e38\u53ea\u9002\u5408\u77ed\u671f\u9884\u6d4b(1-10\u671f)\u3002<\/p>\n\n\n\n<p><strong>\u2705 \u89e3\u51b3\u65b9\u6848:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7ed3\u5408\u57fa\u672c\u9762\u5206\u6790\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u6a21\u578b(LSTM\u3001Prophet\u7b49)\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516b\u3001\u5b9e\u6218\u5efa\u8bae\u4e0e\u6ce8\u610f\u4e8b\u9879<\/strong><\/h2>\n\n\n\n<p>\u57fa\u4e8e\u6211\u591a\u5e74\u7684\u5b9e\u6218\u7ecf\u9a8c,\u7ed9\u5927\u5bb6\u51e0\u70b9\u5efa\u8bae:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8.1 \u6570\u636e\u9884\u5904\u7406\u662f\u5173\u952e<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5904\u7406\u7f3a\u5931\u503c\uff1a\u91d1\u878d\u6570\u636e\u5e38\u6709\u505c\u724c\u3001\u8282\u5047\u65e5\u7b49\u5bfc\u81f4\u7684\u7f3a\u5931\u3002<\/li>\n\n\n\n<li>\u5f02\u5e38\u503c\u5904\u7406\uff1a\u6781\u7aef\u884c\u60c5\u4f1a\u4e25\u91cd\u5f71\u54cd\u6a21\u578b\u3002<\/li>\n\n\n\n<li>\u6570\u636e\u9891\u7387\u9009\u62e9\uff1a\u65e5\u5ea6\u3001\u5468\u5ea6\u3001\u6708\u5ea6\u6570\u636e\u7279\u6027\u4e0d\u540c\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8.2 \u4e0d\u8981\u8fc7\u5ea6\u62df\u5408<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53c2\u6570\u4e0d\u662f\u8d8a\u591a\u8d8a\u597d\uff0c\u8981\u9075\u5faa\u7b80\u7ea6\u539f\u5219\u3002<\/li>\n\n\n\n<li>\u6837\u672c\u5185\u62df\u5408\u597d\u4e0d\u4ee3\u8868\u6837\u672c\u5916\u9884\u6d4b\u597d\u3002<\/li>\n\n\n\n<li>\u4e00\u5b9a\u8981\u505a<strong>\u56de\u6d4b\u9a8c\u8bc1\u3002<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8.3 \u7ed3\u5408\u9886\u57df\u77e5\u8bc6<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6a21\u578b\u53ea\u662f\u5de5\u5177\uff0c\u4e0d\u80fd\u66ff\u4ee3\u601d\u8003\u3002<\/li>\n\n\n\n<li>\u91cd\u5927\u4e8b\u4ef6(\u8d22\u62a5\u3001\u653f\u7b56)\u4f1a\u6253\u7834\u5386\u53f2\u89c4\u5f8b\u3002<\/li>\n\n\n\n<li>\u8981\u6709<strong>\u98ce\u9669\u610f\u8bc6\uff0c<\/strong>\u8bbe\u7f6e\u6b62\u635f\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8.4 \u6301\u7eed\u76d1\u63a7\u4e0e\u66f4\u65b0<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e02\u573a\u73af\u5883\u4f1a\u53d8\u5316\uff0c\u6a21\u578b\u9700\u8981\u5b9a\u671f\u91cd\u65b0\u8bad\u7ec3\u3002<\/li>\n\n\n\n<li>\u5efa\u7acb<strong>\u6a21\u578b\u76d1\u63a7\u673a\u5236\uff0c<\/strong>\u53ca\u65f6\u53d1\u73b0\u5931\u6548\u3002<\/li>\n\n\n\n<li>\u4fdd\u6301\u5b66\u4e60\uff0c\u4e0d\u65ad\u4f18\u5316\u7b56\u7565\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e5d\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>ARIMA\u6a21\u578b\u662f\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u7684\u57fa\u77f3\uff0c\u638c\u63e1\u5b83\u76f8\u5f53\u4e8e\u62ff\u5230\u4e86\u91cf\u5316\u5206\u6790\u7684\u5165\u573a\u5238\u3002\u672c\u6587\u7cfb\u7edf\u4ecb\u7ecd\u4e86ARIMA\u6a21\u578b\u7684\u7406\u8bba\u57fa\u7840\u3001\u5efa\u6a21\u6d41\u7a0b\u548cPython\u5b9e\u6218\u65b9\u6cd5\uff0c\u5e2e\u52a9\u8bfb\u8005\u638c\u63e1\u4ece\u6570\u636e\u9884\u5904\u7406\u3001\u5e73\u7a33\u6027\u68c0\u9a8c\u3001\u53c2\u6570\u9009\u62e9\u5230\u6a21\u578b\u8bca\u65ad\u7684\u5b8c\u6574\u6280\u80fd\u94fe\u6761\u3002\u867d\u7136ARIMA\u6a21\u578b\u5b58\u5728\u65e0\u6cd5\u6355\u6349\u6ce2\u52a8\u7387\u805a\u96c6\u7b49\u5c40\u9650\u6027\uff0c\u4f46\u5b83\u4ecd\u7136\u662f\u91d1\u878d\u9884\u6d4b\u3001\u7ecf\u6d4e\u5206\u6790\u7b49\u9886\u57df\u4e0d\u53ef\u6216\u7f3a\u7684\u57fa\u7840\u5de5\u5177\u3002<\/p>\n\n\n\n<p><strong>\u2705 \u6838\u5fc3\u8981\u70b9\u56de\u987e\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>AR\u6a21\u578b<\/strong>\u6355\u6349\u60ef\u6027\uff0c<strong>MA\u6a21\u578b<\/strong>\u6355\u6349\u51b2\u51fb\uff0c<strong>ARMA\u6a21\u578b<\/strong>\u4e24\u8005\u7ed3\u5408\u3002<\/li>\n\n\n\n<li><strong>\u5dee\u5206<\/strong>\u662f\u5904\u7406\u975e\u5e73\u7a33\u6570\u636e\u7684\u5229\u5668\uff0c\u4f46\u4e0d\u8981\u8fc7\u5ea6\u5dee\u5206\u3002<\/li>\n\n\n\n<li><strong>Box-Jenkins\u65b9\u6cd5\u8bba<\/strong>\u63d0\u4f9b\u4e86\u7cfb\u7edf\u7684\u5efa\u6a21\u6d41\u7a0b\uff1a\u8bc6\u522b\u2192\u4f30\u8ba1\u2192\u8bca\u65ad\u3002<\/li>\n\n\n\n<li><strong>ADF\u68c0\u9a8c<\/strong>\u5224\u65ad\u5e73\u7a33\u6027\uff0c<strong>ACF\/PACF\u56fe<\/strong>\u786e\u5b9a\u53c2\u6570\uff0c<strong>AIC\/BIC<\/strong>\u9009\u62e9\u6a21\u578b\u3002<\/li>\n\n\n\n<li><strong>\u6b8b\u5dee\u68c0\u9a8c<\/strong>\u662f\u6a21\u578b\u8bca\u65ad\u7684\u5173\u952e\uff0c\u6b8b\u5dee\u5fc5\u987b\u662f\u767d\u566a\u58f0\u3002<\/li>\n\n\n\n<li>ARIMA\u6709\u5c40\u9650\u6027\uff0c\u9700\u8981\u7ed3\u5408GARCH\u3001ARIMAX\u7b49\u6a21\u578b\u6765\u6539\u8fdb\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\ud83d\udca1 \u4e0b\u4e00\u6b65\u5b66\u4e60\u65b9\u5411\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ARCH\/GARCH\u6a21\u578b\uff1a\u5efa\u6a21\u6ce2\u52a8\u7387\uff1b<\/li>\n\n\n\n<li>SARIMA\u6a21\u578b\uff1a\u5904\u7406\u5b63\u8282\u6027\u6570\u636e\uff1b<\/li>\n\n\n\n<li>VAR\u6a21\u578b\uff1a\u591a\u53d8\u91cf\u65f6\u95f4\u5e8f\u5217\uff1b<\/li>\n\n\n\n<li>\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\uff1aLSTM\u3001Prophet\u3001XGBoost\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u662f\u4e00\u4e2a\u5e9e\u5927\u7684\u9886\u57df\uff0cARIMA\u53ea\u662f\u5f00\u59cb\u3002\u4f46\u53ea\u8981\u4f60\u638c\u63e1\u4e86\u8fd9\u7bc7\u6587\u7ae0\u7684\u5185\u5bb9\uff0c\u5c31\u5df2\u7ecf\u8d85\u8d8a\u4e8690%\u7684\u521d\u5b66\u8005\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8bb0\u4f4f\uff1a<strong>\u6a21\u578b\u662f\u5de5\u5177\uff0c\u601d\u7ef4\u662f\u6838\u5fc3<\/strong>\u3002\u4e0d\u8981\u8ff7\u4fe1\u4efb\u4f55\u6a21\u578b\uff0c\u8981\u7406\u89e3\u5176\u80cc\u540e\u7684\u903b\u8f91\uff0c\u624d\u80fd\u5728\u5b9e\u6218\u4e2d\u6e38\u5203\u6709\u4f59\u3002<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p><a>#ARIMA\u6a21\u578b<\/a>\u00a0<a>#\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b<\/a>\u00a0<a>#\u91cf\u5316\u4ea4\u6613<\/a>\u00a0<a>#Python\u6570\u636e\u5206\u6790<\/a>\u00a0<a>#\u80a1\u4ef7\u9884\u6d4b<\/a>\u00a0<a>#\u91d1\u878d\u5efa\u6a21<\/a>\u00a0<a>#\u673a\u5668\u5b66\u4e60<\/a>\u00a0<a>#\u6570\u636e\u79d1\u5b66<\/a>\u00a0<a>#\u91cf\u5316\u7b56\u7565<\/a>\u00a0<a>#\u7edf\u8ba1\u5206\u6790<\/a><\/p>\n\n\n\n<p>\u611f\u8c22\u9605\u8bfb\uff01\u613f\u672c\u6587\u4e3a\u60a8\u5e26\u6765\u65b0\u542f\u53d1\u4e0e\u5b9e\u7528\u77e5\u8bc6\u3002\u82e5\u89c9\u6709\u76ca\uff0c\u8bf7\u70b9\u8d5e\u5206\u4eab\uff0c\u60a8\u7684\u652f\u6301\u662f\u6211\u521b\u4f5c\u7684\u52a8\u529b\uff0c\u6b22\u8fce\u7559\u8a00\u5fc5\u590d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u98ce\u9669\u63d0\u793a\uff1a<\/strong><em>\u672c<em>\u6587\u4ec5\u4f9b\u53c2\u8003\uff0c\u4e0d\u6784\u6210\u6295\u8d44\u5efa\u8bae\u3002\u91cf\u5316\u7b56\u7565<em><em>\u5f00\u53d1\u5e94\u4ee5\u5b66\u4e60\u548c\u6280\u672f\u4ea4\u6d41\u4e3a\u76ee\u7684\u3002\u6295\u8d44\u6709\u98ce\u9669\uff0c\u5165\u5e02\u9700\u8c28\u614e\u3002<\/em><\/em><\/em><\/em><\/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\/2026\/02\/26\/%e4%b8%ba%e4%bb%80%e4%b9%88%e9%a1%b6%e7%ba%a7%e9%87%8f%e5%8c%96%e5%9b%a2%e9%98%9f%e9%83%bd%e5%9c%a8%e7%94%a8arima%e6%b7%b1%e5%ba%a6%e8%a7%a3%e6%9e%90%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e9%a2%84\/\">Continue reading<span class=\"screen-reader-text\">\u4e3a\u4ec0\u4e48\u9876\u7ea7\u91cf\u5316\u56e2\u961f\u90fd\u5728\u7528ARIMA?\u6df1\u5ea6\u89e3\u6790\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u7684\u6838\u5fc3\u6b66\u5668(\u9644\u4ee3\u7801)<\/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,17,4,5],"class_list":{"0":"post-3547","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-aiinvest","7":"tag-ai","11":"entry"},"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3547","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=3547"}],"version-history":[{"count":3,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3547\/revisions"}],"predecessor-version":[{"id":3552,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/3547\/revisions\/3552"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=3547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=3547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=3547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}