US Presidential election
Statistics and trading strategies for S&P500 around the us presidential election
Type
Oscillator
ProRealAlgos study from October 2024
100 years of S&P500 and U.S presidential elections
Oct 2024
From
About
S&P500 & U.S elections
19282024
Period
Carl Eriksson
Researcher
This study dives into the patterns observed in the stock market, specifically the S&P 500, around U.S. Presidential Elections. It leverages historical data from 1932 to present day and outlines both swing trading and day trading strategies optimized for trading during election years.
Historical data shows that while stock market performance can be influenced by elections, past performance is not an indicator of future results.
Best
Seller
Description
Understanding market trends around U.S. Presidential elections can offer valuable insights for investors and traders looking to make informed decisions. This study, conducted in October 2024, analyzes market behavior using close to 100 years of data from the S&P 500 index, shedding light on both short and longterm trends. By identifying patterns in market performance during election years, this study aims to provide traders with strategies that maximize their opportunities during these highly impactful periods. From historical statistics to proven algorithms, this study equips readers with the tools needed to navigate the complexities of electionyear trading.
Carl Eriksson
Resercher
(Founder)
Our founder Carl Eriksson is a Stockholm based serial entrepreneur, technerd and digital nomad, with a degree in data science. Aside from ProRealAlgos you'll find him either coding an app, like whentomine.io, or developing his next alt crypto currency.
Investments are made at your own risk. Financial instruments can both increase and decrease in value, and there is a risk that you may not get back the money you invest. Historical performance is no guarantee of future results. The use of our services, including our algorithms, systems, indicators, codes, and data, does not create any liability for ProRealAlgos or its affiliates. The information provided is for educational purposes only and should not be interpreted as financial advice.
What you need to know about this study
This presentation should not be considered financial advice. One key thing to remember is that past performance is no guarantee of future results. I've identified patterns in how the market has historically behaved around presidential elections, but these are not blackandwhite, and statistics can't predict the future. It's important to view these patterns and statistics as probabilities.
Most data is from Yahoo Finance (if not it's explicitly stated)
Most of the statistics are based on data from 1932 until October 2024 (if not it's explicitly stated)
The statistics presented are solely from S&P 500 and is therefore not representative of the whole stock market
The statistics from S&P500 is with dividends included
23 elections are not a big data sample so we must be cautious drawing conclusions
The presidential election are on the tuesday of after the first monday of November
The stock market was closed on the election day until the election of 1984
The data does not include the 1929 market crash, hence bigger gain numbers than usual
Predict the outcome of the U.S presidential election
Source: Strategas Research Partners
First, let's start with some research from other studies that shows that when the S&P 500 has risen in the three months leading up to election day, the incumbent party has retained power 87% of the time. This trend, observed siince 1928, highlights a significant correlation between market optimism and electoral success for the sitting party. As we approach this year's election, the same patterns are emerging, indicating a strong chance for the current administration to secure another term, provided the positive market trajectory continues.
Dare to take the bet?
3 months back from the presidential election on November 5th 2024, means August 5th 2024. The opening price of S&P500 on August 5th was a 5306.16, which means that S&P500 is up 10.4% at the time I'm writing this (October 15th). It's likely that S&P500 will be in territory on election day. The current odds gives you 2.10x the money if Harris wins, and 1.72x the money if Trump wins.
S&P500 and the full presidential cycle (monthly)
Source: Yahoo Finance
If we start with the longterm view, meaning months and years, we have the first chart here. In it, I have plotted how the S&P500 has moved 24 months before the election up until 24 months after the election. Each line represents one of the 23 presidential elections held since 1932. Each data point represents a month.
The central point marked here is the monthly close in November during the election year.
Let's take a look at the 2008 and 2020 election
To better understand the chart, let's take the 2008 and 2020 elections as examples. The blue line represents the 24 months preceeding the 2008 election until 24 months post the 2008 election. You can see the 2008 financial crisis in the midst of the presidential election and then setting the low 4 months post the election.
If we look closer on the 2020 election (red line) we see the covid market crash 9 months prior to the election.
The average movement of S&P500 in the last 23 elections
If we put all 23 elections from 1932 until today together into an average line it looks like this.
If we adjust the Y axis to make it clearer it looks like this
The average gain yearbyyear of the last 23 elections
From the close of the last trading day in October (a few days before the election) and 12 months forward, we have an average return of 10.54%. After that, we have the 12month period with the lowest return at 6.58%. Then comes the best period. The socalled third year, with a return of 15.81%. And then we have the 12 months before the election, with a return of 10.37%.
Dividends included and the 1929 depression not included
Again, these numbers might be higher than what you’ve heard before. But this is the S&P500 with dividends included and the 1929 stock market crash excluded. Also note that this isn’t from January 1st to January 1st, but from the last trading day in October to the last trading day in October of the following year.
Month by month through the full U.S presidential cycle (bar chart)
Month by month through the full U.S presidential cycle (table)
November of Year 1 is the month when the presidential election is held. The value shown in each cell represents the average return from the previous month’s close to the current month’s close.
1.04% means the average return from the last trading day in October to the last trading day in November of Year 1.
The value shown in each cell represents the average return
20.19% average gain in 14 months
When you study this table a bit more closely, you can see that we have an especially strong period here from September of Year 2 to December of Year 4. This is the period and the movement for which I built the first algorithm to capture.
The trading algorithm (catching the 20.19% trade)
Here's the ProRealTime™ algorithm that simply enters a long trade at the end of September of Year 2 and closes the position at the end of December of Year 4. It’s 10 lines of code. You can run this yourself in ProRealTime, which is the trading platform I personally use to develop and run algorithms. It might seem a bit excessive to automate something that takes one trade per presidential cycle, but it’s mostly to show how easy it is to automate your trading.
ProRealTime™ code
defparam cumulateorders = false
yearstart = 1950
IF year >= (yearstart + prescycle) and month >= 09 and day >= 25 THEN
buy 1 shares at market
ENDIF
IF year >= (yearstart + prescycle + 1) and month >= 12 and day >= 25 THEN
sell at market
prescycle = prescycle + 4
ENDIF
Results (1950 to today)
• 23.08% average profit
• 100% win rate (19 / 19 trades in profit)
• 31.8% time in the market
Weekbyweek (S&P500) pre & post the US election
Source: Yahoo Finance
Let’s dig into lower timeframes. Here we have a weekly chart where each data point represents a week, and here we can see how the market has moved from 52 weeks before the election to 52 weeks after the election.
The central point marked here is the weekly close (friday close) in the presidential election week
Let's take a look at the 2008 and 2020 election
To better understand the chart, let's take the 2008 and 2020 elections as examples. The blue line represents the 52 weeks preceeding the 2008 election until 52 weeks post the 2008 election. You can see the 2008 financial crisis in the midst of the presidential election and then setting the low 19 weeks post the election.
If we look closer on the 2020 election (red line) we see the covid market crash 32 weeks prior to the election.
The average movement of S&P500 in the last 23 elections
If we put all 23 elections from 1932 until today together into an average line, and zoom in on only 24 weeks from election until 24 weeks after election it looks like this.
There are two periods that are extra strong in this 48 weeks period. The first period is 14 weeks long and has on average provided a 7.18% gain. The second period is 10 weeks long and has on averagee provided a 3.89% gain..
Two strong periods
The second period starts on friday 1½ week before the election day. In the 2024 election that means October 25th.
The trading algorithm (catching the 3.89% trade)
This algorithm goes long during the second period I just showed, meaning in the later part of October before the presidential election, and closes the position at the beginning of January..
The result in this backtes is from 1950 to today, not from 1932. It shows an average return of 4.73% instead of 3.89%, which means this edge has become stronger over time. You can also see in the graphthat the edge is strongest in the last three elections.
ProRealTime™ code
Defparam cumulateorders = false
yearstart = 1952
IF year >= (yearstart + prescycle) and month >= 10 and day >= 28 THEN
buy 1 shares at market
ENDIF
IF year >= (yearstart + prescycle + 1) and month >= 1 and day >= 26 THEN
sell at market
prescycle = prescycle + 4
ENDIF
Results (1950 to today)
• 4.73% average profit
• 77.78% win rate (14 / 18 trades in profit)
• 5.8% time in the market
Daybyday (S&P500) pre & post the US election
Source: Yahoo Finance
Let’s dig into even lower timeframes. Here we have a daily chart where each data point is a day, and here we can see how the market moved from 30 days before the election to 30 days after the election. Now we are talking about the number of open market days, not calendar days.
The midpoint here represents the daily close on the actual election day (which is Tuesday).
Let's take a look at the 2008 and 2020 election (S&P500)
To better understand the chart, let's take the 2008 and 2020 elections as examples. The blue line represents the 30 days preceeding the 2008 election until 30 days post the 2008 election. You can see the 2008 financial crisis in the midst of the presidential election. The red line shows the 2020 election.
The average movement of S&P500 in the last 23 elections (30 days prior)
If we zoom in and look at how the market generally tends to move leading up to the election, it looks like this up until the close the day before the election (which is Monday). We can see that there is a strong period starting from 7 trading days before the presidential election.
The average movement of S&P500 in the last 23 elections (election week)
If we look at the actual election week, it has been a bit different across various presidential elections.
Up until 1980, the stock market was closed on election day.
From 1984 onwards, the market has been open on election day.
Because of this, the returns on the different days during election week vary somewhat, but we can still see a clear pattern.
Here we have Monday, Tuesday, Wednesday, Thursday, and Friday. Tuesday is election day.
The dark blue bars represent all elections from 1932 to 1980, meaning no return on election day.
The red bars represent all elections from 1984 to 2020.
The gray bars represent the average of all elections.
Here we can see a few things worth noting that we can use when trading around election day.
Number 1 is that we see Wednesday is clearly negative, and historically it has been a good idea to exit long trades before Wednesday. In the earlier elections, this would have been at the close on Monday evening, and in later elections, at the close on election day.
Something that stands out is that in presidential elections where the market was closed on election day, Thursday has been very strong, while it hasn’t been in the years when the market was open on election day.
In this election in a few weeks, the market will be open on election day, so I think one should act based on the red bars.
If you wanted to take a short trade, let’s say for one day, it has historically been best to do so at the close on election day. You can also use this data if you are day trading and deciding which day to be longbiased and which day to be shortbiased.
The average movement of S&P500 in the last 23 elections (30 days post election)
If if we look at the period after the election, the average looks like this. This is from the Wednesday after election day and onwards.
On average, across ALL presidential elections, Thursday has shown positive returns, but as I mentioned, it hasn’t been the case in the last 10 elections.
We can also see that there isn’t much momentum in the market during the 3 weeks following election week, which is why it’s a good idea to exit a shorter swing trade right on election day.
Want to catch a long trade pre election?
To give you a better understanding of how the market moves day by day, I’ve compiled a total chart here with all the presidential elections. Remember that it’s a bit inconsistent because election week differs, but we can still see that there’s a strong period from 7 trading days before election day until election day.
Historically, it has been a good idea to enter a long trade at the first red dot. For the 2024 election, that would be next Friday at the close, on October 25th. This trade captures a period that has historically delivered an average return of 2.41%, and the trade lasts 7 trading days.
Volatility (VIX) around U.S presidential elections
Source: Yahoo Finance
Let's talk about VIX. For those of you who aren’t familiar with the VIX, it’s a volatility index that measures the market’s volatility and expectations of volatility. Volatility refers to how much the market moves up and down – where a high value means the market is moving a lot, and a low value means the market is moving little. This is perhaps most interesting for those of you who day trade.
Here we have, for example, the 2008 and 2020 election with almost the highest VIX reading ever during the COVID dip here.
Let's take a look at average and zoom in
Here we have the average of the 8 presidential elections we’ve had since the VIX was created in 1990. We can see that the VIX declines into the presidential election in November and then increases slightly again until the end of February. After that, the VIX falls sharply and bottoms in July, around 8 months after the presidential election. The orange line represents the 6month moving average.
VIX year by year
If we look at volatility year by year, it’s also clear that volatility is lowest during Year 1 on average and then increases up until Year 4, before dropping again in Year 1 (right after the presidential election).
VIX day by day
The black line represents how the VIX generally moves 30 days before and 30 days after the presidential election. It's clear that VIX goes down a few days before the election until 7 days after the election.
Swing trading strategies around the elections (SP500)
Source: ProRealTime Backtest
These strategies are very simple with just a few conditions. I’ve backtested them in ProRealTime, where I only have access to data from 1984 to today. So the data I’m presenting in the upcoming slides is only from the last 40 years – meaning the last 10 presidential elections.
I’ve tested five different strategies. The average trade length is a couple of days for all these strategies. They are all longonly. They have a maximum of 3 conditions for entry and no more than 1 condition for exit.
Strategy 1: Long only MA8
Mean reversion with trend filter
Trying to explain why certain edges exists and others don't, is in most cases a fruitless activity. Why is it that MA8 seems to have more relevance for the SP500 index compared to any other short MA value like 20? or 10? or 5?
It's human to want to explain why things are the way they are, but trying to explain market behaviour in detail is easier said than tone. Just accept that that is the case and built a strategy out of any edge.
Entry Conditions:
The day's close is below MA8 and above MA200
Two of the last three days have been negative
Exit Condition:
The day's close is above MA8
ProRealTime™ code
defparam cumulateorders = false
DroppedDaysCounter = 0
FOR i = 1 TO 3 DO
IF Close[i] < Open[i] THEN
DroppedDaysCounter = DroppedDaysCounter + 1
ENDIF
NEXT
IF Close > Average[200](Close) AND Close < Average[8](Close) AND DroppedDaysCounter >= 2 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF Close > Average[8](Close) THEN
SELL 1 CONTRACT AT MARKET
ENDIF
This one is a classic. So simple, yet so effective. If you're swing trading SP500, don't consider 3 consecutive negative days a bearish signal  it's a bullish signal. If you enter on the open of the 4th day, together with an Internal Bar Strength condition and exit in 5 trading days you have a 64% winrate with a 2.55 gain/loss ratio.
Strategy 2: 3 Days Down
Mean reversion with time exit
Entry Conditions:
Three consecutive days with lower closesInternal Bar Strength indicator is below 0.08
Exit Condition:
Exit the trade after 5 trading days
ProRealTime™ code
DEFPARAM CumulateOrders = False
IBS = (Close  Low) / (High  Low)
IF (Close < Close[1]) AND (Close[1] < Close[2]) AND (Close[2] < Close[3]) AND (IBS < 0.08) THEN
BUY 1 SHARES AT MARKET
entryBar = BarIndex
ENDIF
IF LONGONMARKET AND (BarIndex > tradeindex + 5) THEN
SELL 1 SHARES AT MARKET
ENDIF
For you who have been with me for a while, know that I use the IBS (Internal Bar Strength) indicator in many of my strategies. That is the case also for this strategy, where I'm using it together with MACD.
Strategy 3: MACD + IBS
MACD mean reversion strategy with Price Action exit
Entry Conditions:
MACD has been down for four days in a row
MACD is below 0Internal Bar Strength indicator is below 0.14
Exit Condition:
Exit on the first day the close is above the previous day's close
ProRealTime™ code
defparam cumulateorders = false
entrycondition1 = MACD[12,26,9][0] < MACD[12,26,9][1] and MACD[12,26,9][1] < MACD[12,26,9][2] and MACD[12,26,9][2] < MACD[12,26,9][3] and MACD[12,26,9][3] < MACD[12,26,9][4]
entrycondition2 = MACD[12,26,9][0] < 0
entrycondition3 = (close  low) / (high  low) < 0.14
IF entrycondition1 and entrycondition2 and entrycondition3 THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
exitcodition = close[0] > high[1]
If LongOnMarket AND exitcodition THEN
SELL AT MARKET
ENDIF
In algo development you should think Simplicity over Complexity ALWAYS(!). If your system doesn't show promise within the first lines of code, with just a few conditions, you should disregard and pursue another idea.
Less is always better, and the following strategy is just that. I would like to call it the World's simplest RSI strategy as it has only one entry condtion and only one exit condition, and that's it!
Strategy 4: Simple RSI
World's Simplest Mean Reversion RSI strategy
Entry Condition:
RSI(2) is below 15
Exit Condition:
Exit on the first day the close is above the previous day's high
ProRealTime™ code
DEFPARAM CUMULATEORDERS = FALSE
rsiValue = RSI[2](close)
IF rsiValue < 15 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF close > high[1] THEN
SELL 1 CONTRACT AT MARKET
ENDIF
his strategy is utilizing one of my favorite technical analysis indicators, the Average True Range or ATR for short. ATR measures volatility, taking into account any gaps in the price movement.
It's a great tool to use for both entries and exits. In this simple strategy we're running it together with MA5 on the daily timeframe of SP500 with great results, and by only reversing the entry condition as the exit condition.
Strategy 5: Average True Range
Volatility based long only strategy
ProRealTime™ code
DEFPARAM CumulateOrders = False
IF Close < Average[5](Close)  AverageTrueRange[10] THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF Close > Average[5](Close) + AverageTrueRange[10] THEN
SELL 1 CONTRACT AT MARKET
ENDIF
Entry Condition:
The day's close is lower than (MA5ATR10)
Exit Condition:
The day's close is higher than (MA5+ATR10)
So which strategies works which years?
This is how the five strategies have performed year by year. Simply put, the returns on these strategies follow the same pattern we see on an annual level with the S&P 500, where year 1 and year 3 are the strongest, and year 2 is the weakest.
Here are the results broken down by the year of the presidential cycle.
Across all strategies, year 1 is the strongest, followed by year 3, then year 4, and lastly year 2. 5 of the strategies perform best in year 1.
I would say it's hard to draw any major conclusions from this. The one thing I can say is that these longonly strategies have historically performed better in the years of the presidential cycle that are generally the strongest
Day trading strategies around the elections (SP500)
Source: ProRealTime Backtest
Let's take a look at some day trading strategies. These strategies takes one to multiple trades a day and are much more complex than they swing strading strategies. They all execute on the 10 minute timeframe. Let's see how they perform in relations to the presidential election.
Strategy 1: Ichimoku momentum strategy
Long only trend following ichimoku based strategy
ProRealTime™ code
Entry Conditions:

24period exponential moving average (EMA) of MACD is below MACD

22period moving average of Stochastic[28]

The candle’s close (+5) is below the Ichimoku cloud (custom variant)

43period exponential moving average of price is below the current price
Exit Conditions:

The candle’s close is above the Ichimoku cloud (custom variant)

Stoploss set at 20 points

Target profit set at 30 points
Strategy 2: Time based mean strategy
Long & short mean reversion strategy with time condtions
ProRealTime™ code
Entry Conditions:

Long: The candle’s close is lower than the lowest low of the last 16 periods.

Short: Price crosses the highest high of the last 20 periods.

The time is between 05:00 and 15:00.

Maximum 1 trade per day.
Exit Conditions:

Long: The candle closes above the previous candle's close.

Short: Close if the price closes below the previous candle's close.

Stoploss level based on the trading range.
Strategy 3: Price action VWAP strategy
Long only VAWP based trendfollowing strategy
Entry Conditions:

The volumeweighted average price (VWAP) is greater than the moving average.

Closing price is above Kijunsen (Ichimoku).

Closing price is above VWAP.

Timebased entry.

Some other “secret” factors.
Exit Conditions:

Closing price is below a moving average.

If the closing price is below Kijunsen.
ProRealTime™ code
Secret, please see our PATF algo for more information
So which strategies works which years?
Here we have the three strategies year by year. On the 10minute timeframe, we only have around 15 years of data, so this is data from 2009 until today. An interesting observation is that, on average, across all three strategies, we see that they perform better during the years in the presidential cycle when the average return is low.
Perhaps one could say that these day trading strategies perform best during periods of increasing volatility.
It's quite the opposite pattern compared to our swing trading strategies, where the historically strongest period, year 2, is the strongest, and the historically strongest period, year 3, is the weakest.
Which trades am I taking in the 2024 election?
How will I be positioned around the election? And which strategies will I use?
Number 1: The day before the presidential election, I will place a bet on the Democrats winning (IF the S&P 500 is still up during the 3month period).
Number 2: I will go long next Friday and exit the trade on January 3rd.
Number 3: I will take another long trade next Friday but exit at the close on election day.
And as Number 4, I will activate 3 out of 5 swing trading strategies and let them trade automatically for me from November 1st and for the next 12 months. These are the strategies called Long MA8, 3 Days Down, and Average True Range. The reason I will activate these is that they clearly outperform during the first year of the presidential cycle.
As for the daytrading strategies, I would like to refine them a bit more before making any decisions.
And then, if you want to follow what I'm doing, don't forget about September 2026, when I'll enter a long trade to capture that big movement to December the next year.