Visualizing Cryptocurrency Market Trends with Tableau: A Step-by-Step Guide on Building Token Trading Strategies

Ali Surmeli
6 min readJan 22, 2023

--

Cryptocurrency markets are a complex and ever-evolving landscape. Understanding the underlying trends and patterns can be crucial for those looking to make informed investment decisions. In this article, we delve into the data of Bitcoin, one of the world’s leading cryptocurrencies, using Tableau.

PART 1: Preparing the Dataset

Our dataset for this project was sourced from BitcoinCharts. Initial inspection revealed several formatting and data type issues that needed resolution, such as odd decimal formatting and inconsistent volume data. To address these, we leveraged Tableau Prep Builder. With the dataset ready, our primary objective was to create a standard price chart and a volume chart, which we complemented with volume differences data to provide insights into market demand volatility.

PART 2: Price Analysis Using a Candlestick Chart

The first step in our analysis was the creation of a candlestick chart, which helps visualize price movements and market volatility. It employs calculated fields and conditional formatting based on Open, Close, Highest, and Lowest prices of a stock or product.

Figure 1: Candlestick (Open-Close) Calculation with Tableau

To create the chart shown in Figure 1, we first created two calculated fields:

HIGH-LOW (SUM(Low) — SUM(High)): Difference between High and Low prices

OPEN-CLOSE (SUM(Close) — SUM(Open)): Difference between Open and Close prices

In Tableau, we added High price and Open price to the rows shelf, and combined them using Dual Axis. After synchronizing and removing zero from the table, we had a normalized table and changed the Mark type to ‘Gantt Bar’.

In the Marks panel, we changed the color of SUM(High) to green and dragged the High-Low calculation to the Size field. Then we dragged the OPEN-CLOSE calculation to the Sum(OPEN) mark’s size field as well as the color field. We then set the color to green and red with only 2 options.

The resulting chart is a candlestick chart that can be used to analyze price movements and volatility in the market. By following these steps, you too can create a similar chart using Tableau.”

PART 3: Price Volatility Analysis with Bollinger Bands

Bollinger Bands serve as an important indicator in financial analysis, helping identify if stocks are overbought or oversold. In our project, we applied Bollinger Bands to understand the price movements of Bitcoin

To begin, we created a ‘Lookback Period’ on the left-hand side of the screen. This allows us to specify the period of time over which the moving average is calculated. For the purpose of this project, we limited the time period between 0 and 50 days, using a 20-day calculation of the moving average.

Bollinger Bands also have upper and lower limits that are established using a specific number of standard deviations. We set another parameter called standard deviation (stdev), with a range of one to four and a current value of two.

Figure 2: Upper and Lower boundaries formula

To implement Bollinger Bands, we first calculated the moving average (MA) and standard deviation (Stdev) using the following equations:

Moving-Average (MA) = WINDOW_AVG(AVG([Close Price]), — [Lookback Period], 0):

This calculation says that, for the time we are in, find the average close price for the specific lookback period “let’s say 20 days period” and with “-“, we are saying take the last day as predicate, go back and bring the value “specified with 0”). This value will show us the mean average of the closing price for the 20 days before the day we are in.

Standard Deviation (Stdev) = WINDOW_STDEV(AVG([Close Price]), — [Lookback Period], 0):

With these calculations, we then created the Bollinger Bands, which consist of MA +- stdev (parameter which we limited between 1–4, with a default of 2, meaning +-(2*stdev)).

Upper Band = [Moving Average] + [Standard Deviation(parameter)] * [Stdev(calculation)]

Lower Band = [Moving Average] — [Standard Deviation(parameter)] * [Stdev(calculation)]

To display the Bollinger Bands on the same chart as the price chart, we used ‘Dual Axis’ after moving the MA calculation to the Rows shelf. We then dragged the upper and lower bounds to the right axis on the table and combined them together. We then synchronized the table.

Figure 3: Buy and Sell signal of Bolling Bands with colors.

To identify potential trading opportunities, we created a True/False calculation to identify when the price is outside of the Bollinger Bands. The calculation is as follows:

True/False = (AVG([Price]) < [Cal_3Lower Bound]) OR (AVG([Price]) > [Cal_3Upper Bound])

This calculation highlights when the price is above the upper band or below the lower band, and can be used to inform buy or sell decisions. The final table looks like the one shown below.

PART 4: Identifying Trends Using Moving Average

The moving average is a potent financial analysis tool that helps identify trends in stock prices. By comparing current prices to moving averages calculated over different time periods, we can evaluate the likely price movement of a stock. [Here, explain how you introduced the concept of the moving average, as in your original text].

In this project, we used moving averages to determine if it is a good time to buy or sell a stock. By comparing the current price to the moving averages calculated over different time periods, such as 10, 20 and 50 days, we can determine if the stock is likely to increase in value. If the current price is higher than the moving averages, it is considered a safe time to buy the stock.

Additionally, by analyzing the movement of the 10-day moving average relative to the 20 and 50-day averages, we can identify potential changes in the stock’s price trend. If the 10-day moving average crosses above the 20 and 50-day averages, it indicates that the price is likely to increase. Conversely, if the 10-day moving average crosses below the 20 and 50-day averages, it indicates that the price is likely to decrease.

To perform these calculations, I added specified calculations to the dataset. These calculations will allow us to make informed decisions about buying and selling stocks based on the trends identified by the moving averages.

Figure 4: Calculated fields of the Price Moving Average

Final Thoughts: Analyzing EOS Price Data:

Our focused study of EOS, a unique blend of classical and decentralized finance in the cryptocurrency domain, has helped us unveil intriguing price and volume trends. It’s essential to note that these markets significantly differ from traditional ones, typically characterized by high volatility and unpredictable dependencies.

We leveraged reputable indicators such as Bollinger Bands and the Exponential Moving Average (EMA) to pinpoint promising market opportunities. The Candlestick Price Chart offered daily glimpses into EOS’s price changes from 2017–2021, enabling us to understand price volatility. The Bollinger Bands chart further unveiled anomalous price areas, suggesting potential trends in price movement.

Figure 6: User Interactive Dashboard

In addition, the Moving Average chart showcased the mean average price over specific lookback periods. Notably, the price trend during 2018–2019 suggested a potential pattern: a considerable crash followed by a rebound to record highs. Furthermore, there appears to be a correlation between volume and price trends, with the lowest volumes registering below 1 billion.

In summary, this analysis signals potential short-term investment opportunities in EOS, with prices around 4.5 USD. However, considering the inherent volatility in the cryptocurrency markets, and the uncertainties looming on the horizon, careful personal research and professional financial advice should be the cornerstones of your investment strategy.

References:

1) Data Analytics for Accounting (Vernon Richardson)

2) Udacity online education

3) The Ultimate Algorithmic Trading System (George Pruitt)

4) Nice Software Solutions online education series.

5) Kirill Eremenko, A to Z Tableau education series.

--

--

No responses yet