title: Pandas' EMA not matching the stock's EMA?
body: <p>I am trying to use Python (with Pandas) to calculate the 20-day Exponential Moving Averages (EMA) of daily stock data for Intel (INTC). Pandas has a number of ways of doing this, and I've also tried stockstats, which runs on Pandas, but they never return the same EMA as I get from stock/finance websites.</p>
  
  <p>I've double checked the close prices, and they match, but the EMA always comes out "wrong".</p>
  
  <p>This is the CSV I'm using: <a href="https://pastebin.com/f8F2Jgdh" rel="noreferrer">INTC Stock Data</a></p>
  
  <p>It contains the daily Date, Month Name, Open, High, Low, Close, Day Avg, and Volume for Intel's stock (Ticker: INTC) from 4/20/2016 to 2/1/2018.</p>
  
  <p>When I look to the bigger stock websites like <a href="https://www.marketwatch.com/investing/stock/intc/charts" rel="noreferrer">MarketWatch</a> or <a href="https://eresearch.fidelity.com/eresearch/evaluate/snapshot.jhtml?symbols=intc" rel="noreferrer">Fidelity</a>, their numbers don't match mine. They match <em>each other</em>, but not me.</p>
  
  <p>For example...</p>
  
  <pre><code>df2['Close'].ewm(span=20,min_periods=0,adjust=False,ignore_na=False).mean()
  </code></pre>
  
  <p>or...</p>
  
  <pre><code>df2['Close'].ewm(span=20, min_periods=20, adjust=True).mean()
  </code></pre>
  
  <p>or...</p>
  
  <pre><code>df2["Close"].shift().fillna(df["Close"]).ewm(com=1, adjust=False).mean()
  </code></pre>
  
  <p>Give me EMA's for 2/1/2018 like $44.71, $47.65, $46.15, etc. when the <em>real 20-Day EMA</em> on <em>any</em> finance site is $45.65. And I get the wrong numbers no matter what date I try to compute the EMA for. It's even wrong when I just try for 5-Day EMAs.</p>
  
  <p>I've read, watched and followed tutorials on the subject, but their results also don't match the accepted/published EMA's you'd find on any finance site. The people creating the tutorials and videos simply never check them against each other after Panda's crunches the numbers. And I need my numbers to match.</p>
  
  <p>How do I arrive at the same figures every other finance site on the internet is getting for EMAs? I don't think this has anything to do with adjusted close prices because I'm using old/settled data and my close prices and dates are the same as theirs.</p>