MACD with Tableau 8

To celebrate Tableau’s IPO I thought it would be appropriate to share a relevant visualization. Moving Average Convergence Divergence is a commonly used technical analysis indicator. At the heart of the analysis are two — a fast (short-period) and a slow (long-period) — exponential moving averages.  It is often accompanied by a candlestick chart.The main point of interest is the red and blue lines crossing each other.

MACD with Tableau 8

I used Dow Jones Industrial Average data for this visualization. EMAs are implemented as table calculations. It is posted on Tableau public so it is interactive and available to download. You can access it by clicking on the screenshot above.

One thing to keep in mind, when you’re calculating a 10 day EMA, you start with a 10 day simple moving average (SMA). The SMA for 10th day would be the first input as the data from the day before in your EMA calculation. This means for the days preceding, EMA would be NULL. I didn’t want to have nulls in my visualization so I calculated the first value outside Tableau and hardcoded it into the calculation and calculated the EMA for the rest of data points as usual.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s