{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Visualizing Historical Bitcoin Prices" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook explores visualizing historical price data for Bitcoin. A colorized candlestick chart helps visualize daily price trends and larger time frame price trends together: https://en.wikipedia.org/wiki/Candlestick_chart\n", "\n", "## Fetching Historical Price Data\n", "\n", "* Use GDAX Exchange API: https://docs.gdax.com/#get-historic-rates\n", "* Parse data and coerse into Pandas DataFrame\n", "\n", "## Candlestick Chart\n", "\n", "Use matplotlib and mpl finance library for candlestick support: https://github.com/matplotlib/mpl_finance\n", "\n", "Chart shows:\n", "* Bitcoin prices organized by day (in UTC)\n", "* X-axis is Date\n", "* Y-axis is Price at Open, High, Low, and Close of the day\n", "\n", "## Interpretation\n", "* Color:\n", " * Green candlesticks are \"bullish\" trend days (increased price)\n", " * Red candlesticks are \"bearish\" trend days (decreased price)\n", "* Body: Difference between open and close, day's trend strengh\n", "* Shadows: Day's price range, high above open/close, low below open/close\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Code" ] }, { "cell_type": "code", "execution_count": 107, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Low | \n", "High | \n", "Open | \n", "Close | \n", "
---|---|---|---|---|
Date | \n", "\n", " | \n", " | \n", " | \n", " |
2018-06-23 | \n", "6040.01 | \n", "6250.00 | \n", "6059.82 | \n", "6178.29 | \n", "
2018-06-24 | \n", "5777.00 | \n", "6255.80 | \n", "6178.29 | \n", "6149.99 | \n", "
2018-06-25 | \n", "6070.13 | \n", "6340.01 | \n", "6150.00 | \n", "6246.01 | \n", "
2018-06-26 | \n", "6006.39 | \n", "6271.00 | \n", "6246.01 | \n", "6074.95 | \n", "
2018-06-27 | \n", "6020.00 | \n", "6124.00 | \n", "6074.01 | \n", "6039.70 | \n", "