{ "cells": [ { "cell_type": "markdown", "id": "ad4226ce", "metadata": { "tags": [] }, "source": [ "## Price filter for major indices\n", "\n", "We already looked at a price filter for the S&P500 index [here](/posts/simple-regime-filter). \n", "\n", "Let us try it for some other common indices and see how it works on them.\n", "\n", "List of indices to test\n", "\n", " * Dow Jones - United States\n", " * Russell 2000 - England\n", " * Nifty 50 - India\n", " * S&P500 - United States\n", " * Dax - Germany\n", " * Nikkei 225 - Japan\n", " * Hangseng - HongKong\n", " * Moex - Russia\n", " * SSE - China\n", " * Asx 200 - Australia\n", " * Euronext100 - Europe\n", " * Tsx Composite - Canada\n", " \n", "I have downloaded the data from Yahoo from the start of 2000 and applied the moving average price filter for each of the indices. The `get data` function does all the data stuff. Finally, I group by each stock exchange and the price filter and take the daily mean of the returns." ] }, { "cell_type": "code", "execution_count": 15, "id": "2d949ae7-3ebd-42a8-9c14-1f365ba744cb", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import pandas_datareader as web\n", "import seaborn as sns\n", "sns.set()\n", "sns.set(rc={'figure.figsize':(12,6)})" ] }, { "cell_type": "code", "execution_count": 16, "id": "99dc471b-a4a8-43ce-934a-1c31b62a39c2", "metadata": { "tags": [ "parameters" ] }, "outputs": [], "source": [ "# parameters\n", "ma = 60\n", "\n", "# tickers are specified as name versus symbol in yahoo finance\n", "tickers = {\n", " 'dow': '^DJI',\n", " 'russell': '^RUT',\n", " 'nifty': '^NSEI',\n", " 'snp500': '^GSPC',\n", " 'dax': '^GDAXI',\n", " 'nikkei': '^N225',\n", " 'hangseng': '^HSI',\n", " 'moex': 'IMOEX.me',\n", " 'sse': '000001.SS',\n", " 'asx': '^AXAT',\n", " 'euronext': '^N100',\n", " 'tsx comp': '^GSPTSE'\n", "}" ] }, { "cell_type": "code", "execution_count": 17, "id": "38f72aeb-a706-4221-8fdd-d8f161e48261", "metadata": {}, "outputs": [], "source": [ "def get_data(index, name):\n", " \"\"\"\n", " Get the data for the \n", " \"\"\"\n", " df = web.DataReader(index, 'yahoo', start='2000-01-01').rename(columns = lambda x: x.lower())\n", " df = df.sort_index()\n", " df['year'] = df.index.year\n", " df['ret'] = df.close.pct_change()\n", " df['ma_price'] = df.close.rolling(ma).median().shift(1)\n", " df['is_price'] = df.eval('close > ma_price')+0\n", " df['is_price'] = df.is_price.shift(1) # Shifting price since we use the signal only next day\n", " df['name'] = name\n", " return df" ] }, { "cell_type": "code", "execution_count": 18, "id": "cff2f4bb-9c60-4b7d-9c1a-eca398c70161", "metadata": {}, "outputs": [], "source": [ "collect = []\n", "for k,v in tickers.items():\n", " try:\n", " tmp = get_data(v, name=k)\n", " collect.append(tmp)\n", " except Exception as e:\n", " print(e)\n", "df = pd.concat(collect)\n", " " ] }, { "cell_type": "code", "execution_count": 19, "id": "631d17c6-abf2-4942-af4d-bb312a7082cc", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAusAAAF2CAYAAADX6dY9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAABFOUlEQVR4nO3deVyVZf7/8Tc7OqgoHnCpKSvNchmdcCuDrBQBlwRtAbWmsjLNLVFywTQZk0hN05r2MvGrLUoUoFMNWrniZNpkTZqaibIIyiLbOdy/P/x1JlxROYdbfT0fDx8P7uu+7+tcn8M5t2/uc933cTEMwxAAAAAA03Gt6wEAAAAAOD3COgAAAGBShHUAAADApAjrAAAAgEkR1gEAAACTIqwDAAAAJkVYBwAAAEzKva4HYHYFBSWqquJW9AAAAHAMV1cXNW78p9OuI6yfQ1WVQVgHAABAnWAaDAAAAGBSdRLWU1JSFBYWpt69e2vZsmWnrN+1a5ciIyMVEhKiqVOnymq1SpKysrIUHR2tvn37auTIkSopKam234cffqjY2Fj7ckVFhWJiYh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7y+bzaauXbtq/vz52rhxo44dO6bGjRtr0aJFysnJ0YgRI/Tpp5/K1dVVgwYN0pIlS3TTTTfVdRmndabaPvroI7399ttycXFRu3btNH36dM2bN0/XX3+9oqKitHLlSr399ttKS0tTZWWl7r77bn3++efy8PBw+Jhfe+01paWlyWazqWfPnnrggQf04IMP6ssvv5Qk+9mpp556St27d1e7du2Ul5enDz/8UG+++aY++eQTubm56bbbblNMTIwOHTqk0aNHq3Xr1tq1a5f8/Pz00ksvydfXV+vXr9fChQtltVp11VVX6bnnnlNZWZkiIiL0/vvv6+qrr1ZkZKSefvppvfjii/rtt980c+ZMzZgx47zrys/P14gRI/Trr7+qVatWWrhwoRYvXnzKa8xisahnz54KCQnRtm3b5ObmpgULFujqq6/W5s2bNXv2bLm5ualTp07as2ePli5dqrffflurVq2Sq6urOnbsqFmzZslmsykhIUFbtmyRzWZTRESEHnroIW3evFn/+Mc/5O3trT179ujGG29UYmKiPD099d577+n9999XgwYNdN111+nPf/6znnrqqVr73W7evFmvvvqqDMPQr7/+qpCQEDVo0ECff/65/Xe/c+dOLViwQFVVVbr66qs1a9YsNW3aVDt27NCcOXNUVlamxo0ba+bMmWrcuLFpjzene57Hjx+vRx55RIsXL9aCBQt0/PhxxcXFaf369Tp+/LheeeUVffXVV3ryySfVs2dPGYahkJAQLV26VAEBAaat5/f3piSVlpbq4YcfVr9+/RQcHGxvX7NmjRYvXqx33nlHVVVViouL0+HDh+Xi4qKnn35at956a7X3tjPreuGFF1RVVaXWrVvrqquusj/+nXfeqffee0/FxcWKi4uT1WqVl5eX5syZo5YtW2rKlCn6+eefJUlRUVG69957lZeXd9ranOnw4cOaOHGijh8/LldXV02bNk0TJkzQgAED9PXXX6u0tFRz585V+/btNWzYMF133XXasWOHysvLNWXKFPXs2VM7d+7Uf//7X0VERMjHx0dTp07VjTfeqIyMDI0dO1aS1KVLFxUUFCgrK0vr1q1TWFiYXF1d1apVK7Vo0ULffvutunTp4tTaz/U8rFmzRt98843c3Nx01113afTo0SopKdGsWbP0888/y2azacSIEerXr5/Txjl79mzl5ORo1KhRmjt3riZMmHDeucowDCUmJurzzz+Xm5ub7rvvPj344IPau3ev4uLidPToUdWvX19Tp05Vx44dFRsbq3r16mnbtm0qKirSlClTlJycrB9//FF33323/ZOytWvX6tixYzpy5Ih69eql2NhYubi4nF+BBpxmy5YtxrPPPmsYhmHYbDZj6NChxscff2xv2717t/H8888bhmEYGzZsMPr06WO8//77xiOPPFJnY66ptLQ0Y+jQoUZFRYVx5MgR47bbbjNWrlxpjB492rDZbIZhGEZMTIzx5ptvGoZhGC+99JIxefJkY8KECcY//vGPuhz6OZ2utvfee8+4++67jfz8fMMwDOPZZ581nn/+eWPdunXGU089ZRiGYYwbN87o0aOHkZuba2zcuNEYM2aMU8b7+xisVqths9mMCRMmGIsXLzZ69epl32bhwoXGwoULDcMwjDZt2hibNm0yDMMwMjIyjCFDhhilpaVGZWWl8cQTTxjvv/++ceDAAePGG280/vOf/xiGYRijR4823nvvPePIkSPGgAEDjKNHjxqGYRjLly83pkyZYhiGYXz44YfG0KFDjXnz5hnTp083DMMwNm3aZAwdOvSC6tq0aZPRqVMn49dffzVsNpsRGRlpvPPOO2d8jbVp08b45z//aRiGYcyZM8eYM2eOUVFRYQQFBRm7du0yDMMwnnvuOWPo0KFGZWWl0a1bN6OiosKw2WxGXFyccfjwYSMpKcn4+9//bhiGYZSXlxtDhw41tm7dah/LoUOH7GP54osvjF27dhl9+vQxioqKjLKyMmPIkCH257m2bNq0yejcubORlZVlHD9+3OjUqZOxfPlywzAMIzY21li0aJHRs2dP48CBA4ZhGMbrr79uPPXUU0Z5ebnRv39/4+DBg4ZhGMb69euNBx980DAM8x5vTvc8v/fee/bX8kcffWRMnjz5lJ8//PBDIyYmxjCME8dds9R0rnomT55s/N///Z/x8MMPG2+//bZhGIZx4MABo1evXsZXX31l9O/f38jNzTUM48Tx5fPPPzcMwzCys7ONu+66yygqKqr23nZmXbfccotRWFh4yuP36tXLOHDggBEbG2ukpqYahmEYn332mbFq1Spj8+bNxogRIwzDMIz8/Hz7768mtbVp08ahNS1atMh4/fXX7fW98cYbRq9evey/l/fee88YPXq0YRiGMXToUCM2NtYwDMP44YcfjNtuu80oLy83Fi5caH9vZmRkGHfddZdRXl5u9OnTx9i3b5/9se6//35j27ZtxsMPP2x888039vann37a+OSTTxxa57mc/DwsWrTICAsLMwzDMMrKyoynn37aKCsrM1544QXj3XffNQzDMIqKiozw8HDj119/ddo4f3+fGIZxwbkqNTXVuP/++43y8nKjuLjYGDBggJGTk2NERkYaa9asMQzDML799lvjjjvuMMrLy43JkycbTz75pP0xb7nlFiMvL88oKioyOnfubBQWFhofffSRcdtttxm5ublGeXm5cd9999n7Oh+cWXeiLl26yNfXV8uWLdMvv/yiffv26eDBg/r888+VnZ2tO+64Q6NGjZIk9ejRQ927d9e8efOUlpZWxyM/ty1btqhPnz7y8PBQkyZNFBQUJDc3N02ePFkffPCB9u7dq+3bt+vPf/6zJGnkyJGKjIyUt7e36eeZnq42FxcX9erVS40bN5Yk3XfffXrmmWc0btw4xcXFyWaz6ZdfflFYWJi2bt2qnTt3qlevXk4Z78aNG7Vjxw5FRERIksrKymQYxln3+ctf/iJJ2rRpk8LDw+Xt7S1JioyM1OrVqxUcHCw/Pz/dfPPNkqTWrVvr2LFj+u6773To0CENHz5cklRVVaVGjRrZ901LS1NKSoo+/fTTWqmtbdu2uvrqqyVJ119/vRo2bHjG15gk3X777fbxZmZm6r///a/8/PzUtm1bSdLgwYMVHx8vd3d3de7cWYMHD9Zdd92l6OhoBQQEaOPGjdq1a5c2bdokSTp+/Lh++ukn3XDDDWrdurWaNWtmH8uxY8e0f/9+9erVSz4+PpKk8PBwFRYW1krtf9SmTRs1b95cktS4cWP16NFDktSiRQt9+eWX6tixo6666ipJJ16br732mvbt26cDBw5o5MiR9n6Ki4slmft4c7rn+VxCQ0M1f/58lZaWatWqVfb3ghmcq56XXnpJrq6uevnll+1tBQUFeuqpp/TUU0+padOmkqQNGzbol19+0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atW9d4bOvXr1dRUZHKy8v12Wef2c/Gn1d9570HLtiQIUM0ceJEpaeny9PTU506dVJWVpb27t2r/v37y93dXaNHj9axY8f0yiuv6IMPPlDz5s3Vs2dPJSQkmOrs0Mnuvvtu7dy5U/369VPTpk11/fXXq6ysTD/++KP69+8vDw8P3Xjjjfrtt9+UmpqqAwcOaN68eTIMQ5GRkUpNTVVYWFhdl3Fap6vNx8dHjz/+uIYNG6bKykq1a9fO/kfHHXfcoWeffVZdu3ZVo0aN5OfnpzvuuMNp473zzjv1448/6t5775XNZtPtt9+u4cOHq7i4WIMHD1azZs3O+B9Ar169tGvXLkVGRspqter222/X0KFDdfjw4dNub7FY9Pe//13jxo1TVVWVAgIC9MILL+jbb7/VmjVr9Mknn8jHx0erVq3Sm2++qcGDB6uoqEgxMTG1Mv3pTK+xM/H09FRCQoImT55sv4jL29tbTZo00f3336/BgwerXr16at68uQYNGiQvLy/t379fgwYNktVqVUREhLp166bNmzeftv82bdpo+PDhuu+++1S/fn01bty42plUZ2jatKlmzZql0aNHq7KyUi1atFB8fLw8PT310ksvKT4+XuXl5fLx8dHcuXN14MCBS+54czodO3bUyy+/rMTERE2cOFG33HKLXFxcFBkZWddDO2++vr56+umnNW3aNM2fP9/e/thjj2nAgAH64osvNG3aNMXFxal///6SToSq36df1aWwsDCtWbNGYWFhateunX3q3BNPPKGpU6dqyZIlcnNzU2xsrDp37qw1a9YoPDxcXl5e6tOnj2688UZT1DZs2DA9/fTTWrVqldzc3DRjxgwlJiaecfsDBw5o0KBBkqT58+fLzc1NU6dOVWxsrJKTk+Xl5aUXX3xRrq6uGjZsmOLi4hQeHm4/JkknPn3YsWOHBgwYIEmKj4+3f2JRV05+Hl588UX7/4f16tXTTTfdpKCgIHXt2lXPPvus+vXrZ/9E8o9TEh3Nz89PLVq00LBhw/TKK69owoQJ552revfure+//14RERGqqqrS8OHD1apVK73wwgt69tlntWjRInl4eGjRokXndQLAz89PI0aMUEFBgQYOHGifSnU+XIxzTWYFgMtEVVWVEhMTNXr0aNWvX19vv/22srOzFRsbWyv97927V+vWrdNDDz0k6cS1GUOGDDmv+2Tj4hmGof/+97+aPHmyVq9eXdfDwWVu2LBhGj16tP3TVeB3H3/8sbZs2aLnn3/+ovrhzDqAK4arq6t8fX01ePBgeXh4qGXLloqPj6+1/lu2bGk/6+Ti4qKePXs67cJi/M+7776rN954Qy+99FJdDwUALhpn1gEAAACT4gJTAAAAwKQI6wAAAIBJEdYBAAAAkyKsAwAAACZFWAcAAABMils3AgBOa/PmzZo/f76uvvpq/fzzz6qoqFBcXJwCAgI0a9YsHT9+XDk5OWrbtq0WLFggLy8vdejQQQ899JAyMjJUXFysmJgYpaen67///a/8/f316quvqn79+tqzZ4/i4+N19OhR2Ww2DRs2TIMHD67rkgHAdAjrAIAz2rFjh2bMmKGbbrpJb731ll5++WV16NBB99xzjwYOHKjKykpFREQoIyNDISEhqqiokMViUUpKil577TVNmzZNaWlpslgsGjx4sL744guFhoZqzJgxSkhIULt27VRUVKT77rtPN9xwgzp16lTXJQOAqRDWAQBn1KJFC910002SpJtvvlmrVq1STEyMvvnmG73++uvat2+fcnJydPz4cfs+ISEhkqQ///nPatOmjQICAiRJV111lY4dO6Z9+/bp119/1ZQpU+z7lJWV6YcffiCsA8BJCOsAgDPy9va2/+zi4iLDMDRhwgTZbDaFhobqjjvu0KFDh/TH79fz8PA47c+/s9lsatiwoZKTk+1teXl5atCggYOqAIBLFxeYAgDOy9dff61Ro0YpLCxMLi4u+u6772Sz2Wq8f6tWreTl5WUP64cOHVK/fv30/fffO2rIAHDJ4sw6AOC8jB8/XqNGjVKjRo1Ur149denSRb/++muN9/f09NSSJUsUHx+vN954Q1arVWPHjtUtt9ziwFEDwKXJxfjjZ5cAAAAATINpMAAAAIBJEdYBAAAAkyKsAwAAACZFWAcAAABMirAOAAAAmBRhHQAAADApwjoAAABgUoR1AAAAwKT+HwnpY0136qeGAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "mean_returns = df.groupby(['name', 'is_price']).ret.mean().reset_index()\n", "sns.barplot(data=mean_returns, x='name', y='ret', hue='is_price')" ] }, { "cell_type": "markdown", "id": "3a56b3d9-2480-4e67-834c-e3ec4799df63", "metadata": {}, "source": [ "Looks like there is no common pattern among the indices.\n", "\n", "And all except hangseng and see provide positive returns for both the filters.\n", "\n", "On a second look, snp500, dow, russell,euronext does well with a filter of 0 while nifty,nikkei,sse,tsx does well with a filter of 1.\n", "\n", "May be\n", " * the american and european markets exhibit different behaviour than the asian counterparts (but TSX is from Canada)\n", " * the older exchanges may exhibit a different behaviour than the new one\n", " * the timezone effect\n", " * or just plain random\n", " \n", "I cannot come up with any conclusive explanation. This is a good topic to explore further with a whole lot of other indices\n", "\n", "
\n", " There is no substantial edge to practically trade this filter. Also, we have not run any statistical test to validate significance\n", "
" ] }, { "cell_type": "code", "execution_count": 20, "id": "f300dc4d-13c7-499a-bc78-036a47d0973b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "name\n", "dow 1999-12-31\n", "euronext 1999-12-31\n", "russell 1999-12-31\n", "snp500 1999-12-31\n", "tsx comp 1999-12-31\n", "dax 2000-01-03\n", "hangseng 2000-01-03\n", "nikkei 2000-01-04\n", "sse 2000-01-04\n", "asx 2007-06-15\n", "nifty 2007-09-17\n", "moex 2013-03-05\n", "Name: Date, dtype: datetime64[ns]" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Starting date from which data is computed\n", "df.reset_index().groupby('name').Date.min().sort_values()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.2" }, "nikola": { "category": "", "date": "2021-12-05 13:26:31 UTC", "description": "", "link": "", "slug": "price-filter-major-indices", "tags": "", "title": "Price filter major indices", "type": "text" } }, "nbformat": 4, "nbformat_minor": 5 }