{"id":804,"date":"2021-06-30T15:29:44","date_gmt":"2021-06-30T15:29:44","guid":{"rendered":"https:\/\/firemymoneymanager.com\/?p=804"},"modified":"2022-04-01T01:55:32","modified_gmt":"2022-04-01T01:55:32","slug":"do-stocks-do-worse-on-mondays-finding-daily-patterns-in-stock-returns-2021","status":"publish","type":"post","link":"https:\/\/firemymoneymanager.com\/do-stocks-do-worse-on-mondays-finding-daily-patterns-in-stock-returns-2021\/","title":{"rendered":"Do stocks do worse on Mondays? Finding daily\/monthly patterns in stock returns [2021]"},"content":{"rendered":"\n

We will look at two ETFs as a proxy for the market: SPY and QQQ.<\/p>\n\n\n\n

Do stocks do worse on Mondays? Daily patterns in stock returns<\/h2>\n\n\n\n

Lets load the data for QQQ first. First, let’s add percent change (from yesterday’s close), and the intraday percent change (close-open)\/close:<\/p>\n\n\n\n

data['intraday_change'] = (data.adj_close-data.adj_open)\/data.adj_open\ndata['pct'] = data['adj_close'].pct_change()<\/pre>\n\n\n\n

We also add the day of week to the data table:<\/p>\n\n\n\n

data['dayofweek'] = data.index.day_name()<\/pre>\n\n\n\n

Now, let’s look at intraday returns. Which weekday has the highest average returns?<\/p>\n\n\n\n

data.groupby('dayofweek')['intraday_change'].mean()\n\n\nOut[592]: \ndayofweek\nFriday      -0.000918\nMonday      -0.000095\nThursday     0.000340\nTuesday     -0.000227\nWednesday    0.000064\nName: intraday_change, dtype: float64<\/code><\/pre>\n\n\n\n

So there appears to be a clear winner — Thursday. However, when we run the same query on the S&P 500, the best day for intraday returns is Wednesday, with Thursday being one of the worst days. <\/p>\n\n\n\n

We can go further by checking the percentage of up days by day of week:<\/p>\n\n\n\n

data.groupby('dayofweek')['intraday_change'].apply(lambda x: x[x>0].count()\/x.count()).reset_index(name='count')\n\n\nOut[594]: \n   dayofweek     count\n0     Friday  0.486071\n1     Monday  0.524590\n2   Thursday  0.539197\n3    Tuesday  0.535278\n4  Wednesday  0.521617<\/code><\/pre>\n\n\n\n

So if you invest in QQQ from open to close on Thursday, you have a slightly higher likelihood of making a positive return, compared to other days. This is not consistent with SPY, which does the best on Thursdays.<\/p>\n\n\n\n

Do the same rules hold true for daily returns (from close the night before to today’s close)?<\/p>\n\n\n\n

\ndata.groupby('dayofweek')['pct'].mean()\n\n\nOut[596]: \ndayofweek\nFriday      -0.000411\nMonday       0.000202\nThursday     0.000930\nTuesday      0.000633\nWednesday    0.000592\nName: pct, dtype: float64\n\ndata.groupby('dayofweek')['pct'].apply(lambda x: x[x>0].count()\/x.count()).reset_index(name='count')\n\n\nOut[595]: \n   dayofweek     count\n0     Friday  0.506244\n1     Monday  0.556352\n2   Thursday  0.544933\n3    Tuesday  0.549389\n4  Wednesday  0.555451<\/code><\/pre>\n\n\n\n

From these results for QQQ, it looks like although you have the highest returns on Thursdays, you have a higher likelihood of a positive return on Monday. Both results for QQQ suggest that the worst day is Friday.<\/p>\n\n\n\n

SPY, meanwhile, has its best mean day on Tuesdays, and its best likelihood of a positive return on Wednesdays.<\/p>\n\n\n\n

Do stocks do better in January? Monthly patterns in stock returns<\/h2>\n\n\n\n

Now, let’s examine months. There is a general belief that January has the highest returns on average. We add a month field to test that:<\/p>\n\n\n\n

data['month'] = data.index.month_name()<\/pre>\n\n\n\n

We can then calculate the mean return by month. The results show that October is actually the best month to invest in QQQ, followed by April and July. January is toward the middle. <\/p>\n\n\n\n

data.groupby('month')['pct'].mean()\n\n\nOut[604]: \nmonth\nApril        0.001175\nAugust       0.000374\nDecember    -0.000191\nFebruary    -0.000255\nJanuary      0.000523\nJuly         0.000830\nJune         0.000022\nMarch        0.000457\nMay          0.000384\nNovember     0.000579\nOctober      0.001441\nSeptember   -0.000773\nName: pct, dtype: float64<\/code><\/pre>\n\n\n\n

January is also not a particularly great month for the S&P 500, although its best month is April.<\/p>\n\n\n\n

<\/p>\n\n\n\n

We can test whether certain days of the month or year are more likely to be profitable. When we look at median returns by day of month, we find that the first day of the month has the highest average return for both QQQ and SPY. <\/p>\n\n\n\n

The outsized return on the first day of the month is statistically significant.<\/p>\n\n\n\n

data.groupby('dom')['pct'].median().sort_values()\n\n\nOut[707]: \ndom\n7    -0.000658\n19   -0.000308\n30   -0.000172\n20   -0.000161\n23    0.000030\n28    0.000046\n31    0.000047\n24    0.000050\n22    0.000162\n9     0.000273\n27    0.000343\n21    0.000531\n3     0.000547\n13    0.000599\n26    0.000658\n6     0.000704\n14    0.000787\n12    0.000796\n17    0.000832\n11    0.000945\n29    0.000953\n25    0.001021\n2     0.001040\n8     0.001166\n5     0.001181\n15    0.001221\n4     0.001568\n16    0.001718\n18    0.001763\n10    0.001819\n1     0.003126\nName: pct, dtype: float64<\/code><\/pre>\n\n\n\n

When we look at days of the year, we find no statistically significant results.<\/p>\n\n\n\n

What about other times of year: is the “Santa Claus rally” a real thing?<\/h2>\n\n\n\n

Beyond monthly and daily patterns, there are certain additional patterns that investors bet on. One is the so-called “Santa Claus rally,” which happens during the last week of December and the two days of January. But does the “Santa Claus rally” really exist? Is buying stock during this period a profitable strategy?<\/p>\n\n\n\n

We can start analyzing this by looking at the weekly returns of the major indices. For this analysis we look at data since January 2000. Let’s resample and add a week field to our data.<\/p>\n\n\n\n

spy = table.resample('W').last().pct_change()[['SPY']]\nspy['WOY'] = spy.index.weekofyear\nspy.groupby('WOY').mean()<\/pre>\n\n\n\n

Here’s the result for the S&P ETF (SPY):<\/p>\n\n\n\n

          SPY\nWOY          \n1    0.009032\n2    0.002079\n3   -0.004822\n4   -0.004442\n5    0.003826\n6   -0.000978\n7    0.009332\n8   -0.005509\n9   -0.002385\n10  -0.000836\n11  -0.000708\n12  -0.000066\n13   0.009149\n14   0.004950\n15   0.001655\n16   0.015118\n17   0.002102\n18  -0.000040\n19   0.000328\n20  -0.000354\n21   0.000552\n22   0.005868\n23   0.004463\n24  -0.002372\n25  -0.005008\n26   0.000244\n27   0.007107\n28  -0.000569\n29   0.004474\n30  -0.002378\n31   0.000524\n32   0.000118\n33   0.000299\n34   0.005563\n35   0.004794\n36  -0.007971\n37   0.008827\n38  -0.006442\n39  -0.005050\n40   0.000614\n41  -0.001444\n42   0.006348\n43   0.003243\n44   0.007170\n45   0.006211\n46  -0.000556\n47  -0.004473\n48   0.016324\n49   0.003464\n50  -0.008530\n51   0.006218\n52   0.001936\n53  -0.000998<\/code><\/pre>\n\n\n\n

These results show that the last week of December and the first week of January do tend to be profitable, but they are not the most profitable weeks of the year. That said, if you purchase stocks right before the last week of December and sell in early January, you make an average of approximately 2% return, which is quite good.<\/p>\n","protected":false},"excerpt":{"rendered":"

Do stocks do worse on Mondays? Do they do better in January? We look at patterns in stock returns to determine if any of these “rules” still hold today.<\/p>\n","protected":false},"author":1,"featured_media":737,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[],"_links":{"self":[{"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/posts\/804"}],"collection":[{"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/comments?post=804"}],"version-history":[{"count":3,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/posts\/804\/revisions"}],"predecessor-version":[{"id":1066,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/posts\/804\/revisions\/1066"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/media\/737"}],"wp:attachment":[{"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/media?parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/categories?post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/firemymoneymanager.com\/wp-json\/wp\/v2\/tags?post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}