Last active
November 18, 2019 23:14
-
-
Save DanielGoldfarb/0ca6af1d11a9fdaf51bc2847be5646b8 to your computer and use it in GitHub Desktop.
code that addresses issue24 user error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import matplotlib.dates as mdates\n", | |
"import matplotlib.pyplot as plt\n", | |
"import pandas as pd\n", | |
"from pandas.plotting import register_matplotlib_converters\n", | |
"register_matplotlib_converters()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Time</th>\n", | |
" <th>Open</th>\n", | |
" <th>High</th>\n", | |
" <th>Low</th>\n", | |
" <th>Close</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <td>0</td>\n", | |
" <td>736859.197917</td>\n", | |
" <td>1.18242</td>\n", | |
" <td>1.18245</td>\n", | |
" <td>1.18218</td>\n", | |
" <td>1.18221</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td>1</td>\n", | |
" <td>736859.201389</td>\n", | |
" <td>1.18221</td>\n", | |
" <td>1.18252</td>\n", | |
" <td>1.18199</td>\n", | |
" <td>1.18232</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td>2</td>\n", | |
" <td>736859.204861</td>\n", | |
" <td>1.18232</td>\n", | |
" <td>1.18275</td>\n", | |
" <td>1.18232</td>\n", | |
" <td>1.18253</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td>3</td>\n", | |
" <td>736859.208333</td>\n", | |
" <td>1.18254</td>\n", | |
" <td>1.18256</td>\n", | |
" <td>1.18172</td>\n", | |
" <td>1.18172</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <td>4</td>\n", | |
" <td>736859.211806</td>\n", | |
" <td>1.18173</td>\n", | |
" <td>1.18211</td>\n", | |
" <td>1.18159</td>\n", | |
" <td>1.18187</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Time Open High Low Close\n", | |
"0 736859.197917 1.18242 1.18245 1.18218 1.18221\n", | |
"1 736859.201389 1.18221 1.18252 1.18199 1.18232\n", | |
"2 736859.204861 1.18232 1.18275 1.18232 1.18253\n", | |
"3 736859.208333 1.18254 1.18256 1.18172 1.18172\n", | |
"4 736859.211806 1.18173 1.18211 1.18159 1.18187" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Time Open High Low Close\n", | |
"rows = []\n", | |
"rows.append((736859.197917, 1.18242, 1.18245, 1.18218, 1.18221))\n", | |
"rows.append((736859.201389, 1.18221, 1.18252, 1.18199, 1.18232))\n", | |
"rows.append((736859.204861, 1.18232, 1.18275, 1.18232, 1.18253))\n", | |
"rows.append((736859.208333, 1.18254, 1.18256, 1.18172, 1.18172))\n", | |
"rows.append((736859.211806, 1.18173, 1.18211, 1.18159, 1.18187))\n", | |
"df = pd.DataFrame(rows)\n", | |
"df.columns = ('Time','Open','High','Low','Close')\n", | |
"df" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#%matplotlib qt\n", | |
"%matplotlib inline\n", | |
"from mpl_finance import candlestick_ohlc" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmYAAAHgCAYAAAAPLaHSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAea0lEQVR4nO3df7Bn9V3f8ddbdg0skQRlZQVUsJOIhJikuVaGThSFCTTRYDVWsMQkI0N1EjFkqLS1dg2ZzrQNTp1ORGTS7eqUEm1cNToEydRGohLgAgksoUTCj5XwYxdJcaIpQvbdP+7ZyfV6L/fC7t372cvjMfMd7vd8zjn3c+bw5T4531/V3QEAYO19zVpPAACAOcIMAGAQwgwAYBDCDABgEMIMAGAQwgwAYBDLhllVbauq3VW1c4nxk6vqpqp6uqouXTB2SVXdXVU7q+raqjp8Wn5NVd07Ld9WVRun5S+rqt+vqs9M273zQBwkAMChoJb7HLOq+p4kX0ryG9196iLj35jkW5P8UJIvdvcV0/Ljk/xJklO6+8tV9VtJruvu7VX1piQfm3bxP5Lc2N2/WlX/JsnLuvuyqtqc5N4kW7r7b59rjsccc0yfeOKJKz9qAIA1cttttz3R3ZsXG9uw3MbdfWNVnfgc47uT7K6qNy+x/yOq6pkkm5I8Mm1z3b4VquqWJCfs212Sr6uqSvLSJE8meXa5OZ544omZnZ1dbjUAgDVXVQ8tNbZqrzHr7i8kuSLJriSPJnmqu29YMLGNSd6W5Ppp0QeTfEfmAu6uJD/b3XtXa44AACNZtTCrqqOTnJvkpCTHJTmyqi5YsNqVmXsa85PT/bOTfHpa/7VJPlhVRy2x/4uqaraqZvfs2bMqxwAAcDCt5rsyz0ryQHfv6e5nkuxIcvq+warammRzkvfO2+adSXb0nPuSPJDk5MV23t1Xd/d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3aBXP7miS/nuTM7v7c9LEeb0/yX5c5rM8v3NdyXDEDAIZWcx9Q98+SXLtwrOd8abq7cbrt+yywn87cZxPundbd9wHEneTrpv2+NMmTmftMtKV8Q5Knu/tz0/2PJ/mRaW5HVtW2qrq1qu6oqnOX3MsKCDMAYHRvSPJ4d//5YoNVddj0NOfuJB/v7punoX+Q5MemL7L/2LxvE/hg5j6A+JEkdyX52X3xlsW/+P6JJBurama6/9Z89Wuhfj7JH3X3dyX5viQfqKojp7GTplj746p6w0oO1FOZAMCaqaqbk7wkc1euvn7e68gu6+59X492fha5WrbP9Mn/r62qlyf5nao6tbt3Tvv9f909U1U/nGRb5iLv7CSfTvL9mYu3j1fVJ7v7r7LEF99X1XlJ/vP0NV835KtX2N6Y5C1Vdel0//Ak35Lk/mlff1lVr0/yu1X1qul3LEmYAQBrpru/O1n8NWbT8g1JfjjJ61ewr/9bVZ9Ick6SnZn7wvPfnoZ/J8l/m35+Z+a+oquT3FdVDyQ5Ockt87/4ftrX6zL3WrGbMhd1qao3Jnnlvikm+ZHuvneRKT097eu2qvr8tM3scx2DpzIBgJGdleT/dPfDiw1W1ebpSlmq6oh960/Dv5u5q2JJ8r1J9r1GbFeSM6dtjk3y7Unuf64vvt/3xoFp/LIk+95l+YdJfmZ6vVqq6nXz5nXY9PO3Ze7L1u9f7mBdMQMARnZeFjyNWVXHJflQd78pyTcl+fUpgr4myW919x9Mq/6HJNdU1SVJvpTkwmn5+5Nsr6q7MnfF67LufqKqTs/SX3z/L6vqB6blv9rdfzRvX7+c5M4pzh5M8gNJvifJ5VX1bJKvJPmp7n5yuYP1JeYAAIPwVCYAwCCEGQDAIIQZAMAghBkAwCCEGQDAIIQZAMAghBkAwCCEGQDAIP4/wD2N7+TUEs4AAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 720x576 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"fig, ax = plt.subplots()\n", | |
"fig.set_size_inches((10,8))\n", | |
"_ = candlestick_ohlc(ax, df.values)\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## The above plot looks strange because the data is *intraday* data (the x-axis points are *all for the same date*, approximately 5 minutes apart); but the default candle width assumes *daily* data (one ohlc data point per day). So the candles are too wide and overlapping.\n", | |
"----\n", | |
"## Knowing that the ohlc data points are about 5 minutes apart, if we set the candle width to approximately 2 minutes the graph will look much nicer, as shown below:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmYAAAHgCAYAAAAPLaHSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3df7Tl5V0f+vcnDBEGJUFnyghRh7RGxGiiOV4pd2lRuAVjK1btFdpESWXl1tpiyMpt7r2udi6JXbUVe12uLKQsLx1dl+KPiFa9BEm1EVRCMkACQyiRhGFKYJhBNPequQiZz/1jf6dzMj3DOXHOnv2c4fVaay/2fp7v85zP83DOmff57u/eu7o7AAAs3ssWXQAAADOCGQDAIAQzAIBBCGYAAIMQzAAABiGYAQAMYtVgVlU3VdX+qtp9lP5zq+ruqnquqt5xRN81VfVQVe2uqluq6pSp/eaqemRqv6mqTp7aX1FVv1FVH53GvWU9FgkAsBHUau9jVlXfkuRPk/x8d792hf6/kuQrknxXkj/u7uum9rOT/F6S87r7M1X1S0lu6+6dVfXGJO+bpvj3Se7s7p+pqv8tySu6+51VtTXJI0m2dfdfvFiNW7Zs6e3bt6991QAAC3Lvvfc+091bV+rbtNrg7r6zqra/SP/+JPur6juOMv+pVfV8ks1JnpzG3Hbog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2NW1VlJfra735jkS5P83BSCXpbkl7r7N6dDfzzJzVV1TZI/TXLV1P7uJDur6sHMzni9s7ufqaoLkvzbqjo4zfXj3f2xacz/XFV/a2r/me7+nWVz/VSSB6ZwtifJ30ryLUneVVUvJPlskn/Y3c+utlgfYg4AMAhPZQIADEIwAwAYhGAGADAIwQwAYBCCGQDAIAQzAIBBCGYAAIMQzAAABvH/A2APzCx8Sf2yAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 720x576 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"fig, ax = plt.subplots()\n", | |
"fig.set_size_inches((10,8))\n", | |
"_ = candlestick_ohlc(ax, df.values, width=0.00125) # .00125 of a day is 1.8 minutes\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"----\n", | |
"\n", | |
"## Now all we have to do is tell matplotlib to interpret the x-axis as date2num's. And since we know we have intraday data, we use DateFormatter to display the *time* as well as the date:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmYAAAHICAYAAADk0iaJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3df5RndX3f8ecLdhUWRalMmADRJW2UIAZPHBOkR4OCYvQkaDQ5oIh4gthUg2hQG5O4B22bpsHmhxbpVunWhqyxZhtNgxRtahYVweFHcJGDobBs+bHsGBKSGAIL++4f906YTGZ3RnZmv5/v3efjnO/Z+X4+99793O/7e3dfc3+mqpAkSdLoHTDqAUiSJKljMJMkSWqE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h8V6Do81HRbrOQxNHMqc1X+hDqiqTwH3Jnl9VT2S5MD+Xip+ocaI9RwW6zk81nRYrOcwrBr1AObrv1hPBb4D3NG3PTbaUemJsp7DYj2Hx5oOi/Ucf03tMZtjCvjT/qXxZz2HxXoOjzUdFus5xpo6x2xWv8u1vYHpCbGew2I9h8eaDov1HG9NBjNJkqT9UauHMiVJkvY7BjNJkqRGGMwkSZIaYTCTJElqhMFMkiSpEf8flvcc2jYOjZEAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 720x576 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"from mpl_finance import candlestick_ohlc\n", | |
"fig, ax = plt.subplots()\n", | |
"fig.set_size_inches((10,8))\n", | |
"fig.autofmt_xdate()\n", | |
"ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %d, %H:%M'))\n", | |
"ax.xaxis_date()\n", | |
"_ = candlestick_ohlc(ax, df.values, width=0.00125)\n", | |
"plt.show()" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.4" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment