Hedging Long-Term Risk with an Intraday StrategyTue Mar 19 2019 by Brian Stanley
Do intraday strategies have a place in the portfolios of long-term investors and fund managers? This post explores an intraday strategy that works best in high volatility regimes and thus makes an attractive candidate for hedging long-term portfolio risk.
Trading hypothesis: first half hour predicts last half hour
The authors of the above paper contend that when the S&P 500 is positive during the first half hour (prior close to 10:00 AM) as well as the penultimate half hour (3:00-3:30 PM), this predicts a positive return for the final half hour (3:30-4:00 PM), and vice versa when the first half hour and penultimate half hour are negative.
Strategy code and backtest
I create a Moonshot strategy to test this trading hypothesis using 30-min data from Interactive Brokers. The Pandas code is shown below:
closes = prices.loc["Close"]
opens = prices.loc["Open"]
# Calculate first half-hour returns (including overnight return)
prior_closes = closes.xs('15:30:00', level="Time").shift()
ten_oclock_prices = opens.xs('10:00:00', level="Time")
first_half_hour_returns = (ten_oclock_prices - prior_closes) / prior_closes
# Calculate penultimate half-hour returns
fifteen_oclock_prices = opens.xs('15:00:00', level="Time")
fifteen_thirty_prices = closes.xs('15:00:00', level="Time")
penultimate_half_hour_returns = (fifteen_thirty_prices - fifteen_oclock_prices) / fifteen_oclock_prices
# long when both are positive, short when both are negative
long_signals = (first_half_hour_returns > 0) & (penultimate_half_hour_returns > 0)
short_signals = (first_half_hour_returns < 0) & (penultimate_half_hour_returns < 0)
The initial backtest reveals that the strategy's profitability is confined to the 2008 financial crisis, with disappointing performance thereafter:
Adding a volatility filter
The authors of the source paper note that the predictive power of the first half hour is greater during periods of high volatility, which the initial backtest seems to confirm. To explore this further, I collect VIX data and subdivide the backtest results based on whether the VIX was above or below 20 at the time of the trading signal.
When the VIX is above 20, the strategy spikes higher in the financial crisis then continues to edge higher over time. Though the post-2008 gains are smaller than those in the financial crisis, the strategy is profitable during subsequent pockets of market volatility including fall 2011, late 2014, August 2015, and parts of 2018.
In contrast, when the VIX is below 20, the strategy loses money.
Intraday strategy vs trend strategy for hedging risk
Fund managers who primarily hold portfolios of long positions rebalanced monthly or quarterly often seek ways to hedge market risk. Periods such as 2008 loom large due to their potential to wipe out a significant portion of a portfolio's value.
This intraday strategy makes a potentially attractive hedging strategy given its superior performance during periods of market volatility.
As a comparison, I modify the strategy to only be active when the VIX is above 20, and I plot its performance against a trend-based hedging strategy which shorts the S&P 500 whenever it is below its 12-month moving average.
Both strategies show significant gains during the financial crisis and would have offset long-side portfolio losses, but the intraday strategy preserves and slowly adds to its gains whereas the trend strategy is punished during the 2009 recovery and continues to slide lower during pockets of volatility in the subsequent bull market.
Intraday strategies aren't just for short-term traders. Many intraday strategies work best in high volatility regimes when they can capitalize on increased market inefficiency resulting from the volatility. Because most long-term investors and portfolio managers shy away from intraday strategies, investors who are open to them and capable of deploying them will have an edge over others.
Explore this research on your own
This research was created with QuantRocket. Clone the first-last repository to get the code and perform your own analysis.
quantrocket codeload clone 'first-last'