Skip to content

Commit 43843d4

Browse files
committed
update sarima post
1 parent d26bf15 commit 43843d4

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

public/index.json

+1-1
Large diffs are not rendered by default.

public/posts/finance/stock_prediction/sarima/index.html

+3-8
Original file line numberDiff line numberDiff line change
@@ -757,14 +757,9 @@ <h2 id="4-sarima-model-implementation">4. SARIMA Model Implementation</h2>
757757
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>ylabel(<span style="color:#e6db74">&#39;Price&#39;</span>)
758758
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>legend()
759759
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>show()
760-
</span></span></code></pre></div><pre><code>c:\Users\stefa\anaconda3\lib\site-packages\statsmodels\tsa\base\tsa_model.py:836: ValueWarning: No supported index is available. Prediction results will be given with an integer index beginning at `start`.
761-
return get_prediction_index(
762-
</code></pre>
763-
<p><img alt="png" src="/posts/finance/stock_prediction/sarima/images/sarima_example_9_1.png"></p>
764-
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#75715e"># forec_temp = pd.DataFrame(forecast.predicted_mean)</span>
765-
</span></span><span style="display:flex;"><span><span style="color:#75715e"># forec_temp.index = forecast_index</span>
766-
</span></span><span style="display:flex;"><span><span style="color:#75715e"># pd.DataFrame(pd.DataFrame(decomposition.seasonal[test.index]).values + forec_temp.values).plot()</span>
767-
</span></span></code></pre></div><h2 id="5-model-diagnostics">5. Model Diagnostics</h2>
760+
</span></span></code></pre></div><p><img alt="png" src="/posts/finance/stock_prediction/sarima/images/sarima_example_9_1.png"></p>
761+
<p>As the prei</p>
762+
<h2 id="5-model-diagnostics">5. Model Diagnostics</h2>
768763
<p>After fitting the model, it&rsquo;s important to check its adequacy:</p>
769764
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#75715e"># Model diagnostics</span>
770765
</span></span><span style="display:flex;"><span>results<span style="color:#f92672">.</span>plot_diagnostics(figsize<span style="color:#f92672">=</span>(<span style="color:#ae81ff">12</span>, <span style="color:#ae81ff">8</span>))

0 commit comments

Comments
 (0)