Just had a similar issue where I realized I could not get good point in time market cap data (I use Norgate currently). Ended up just dropping it as a parameter. 🤷🏼♂️
I can't even replicate your simple SPY results. On the period 1/1/99 - 1/1/24, I only see 90 trades on SPY and a total 25 year return of 16.8%. The actual index is slightly better: 30% return, also 90 trades. A massive drawdown starting in 2018 which is typical of the majority of MR strategies I have looked at.
It's hard to know what might be wrong without seeing the code. My suggestion is to simplify by using a backtesting software (like RealTest... in this case, there's a great community where people post their code and ask for/give help)
This seems like a great strategy. I'm impressed you don't want to trade it as is. Obviously, you would rather trade it than just invest in the S&P? No matter how much effort you put in, the fact is that it is going to be very difficult to avoid drawdowns, and since the past is not a predictor of the future, it may not be worth trying to find a "better" model .... Perhaps a good approach is adding in selective stock shorts. For example, large cap stocks that have large gap downs tend to continue that downward momentum. Add those on margin for a few day swing may smoothen out the overall strategy performance and help offset the drawdowns. Also, for the long side, I really like your approach of selecting a few stocks with low RSI vs. buying the whole index for a mean reversion. Especially with the advent of AI, that edge will erode faster in the index as a whole than in individual stocks imo where the sell offs and mean reversion reversals are more news driven and can overshoot more in each direction than the overall index.
After having read this great article, I am a little confused as to exactly how the percentages of delisting have been worked out. Can you please clarify?
I just read your ML article this morning on predicting probability of bouncing back. What about a ML model predicting probability of being delisted? (using market cap, and maybe some fundamentals as features)
Great article. Where do you get accurate point in time market cap data? Seems really difficult to obtain for retail traders.
Sharadar Core US Equity Bundle
https://data.nasdaq.com/publishers/SHARADAR
Just had a similar issue where I realized I could not get good point in time market cap data (I use Norgate currently). Ended up just dropping it as a parameter. 🤷🏼♂️
Entering at the next open significantly reduces the edge.
You are right. I’m entering on openings because it’s easier to execute: all my systems are already set up to trade on openings instead of closings.
As a matter of fact, that’s a good idea for a future post: quantifying how much we lose by trading on openings vs closings. Thx for the comment!
Can someone explain please what's the issue with the "risk of delisting"? What is the problem if a stock gets delisted?
If you are holding a stock while it gets in the delisting process, you may face difficulty selling it and a potential (severe) loss of value
What is the formula that you are using to calculate the 2 period RSI?
I'm using the standard formula. Specifically, my code TALib (https://ta-lib.org/).
Cheers!
I can't even replicate your simple SPY results. On the period 1/1/99 - 1/1/24, I only see 90 trades on SPY and a total 25 year return of 16.8%. The actual index is slightly better: 30% return, also 90 trades. A massive drawdown starting in 2018 which is typical of the majority of MR strategies I have looked at.
What am I missing?
It's hard to know what might be wrong without seeing the code. My suggestion is to simplify by using a backtesting software (like RealTest... in this case, there's a great community where people post their code and ask for/give help)
If the entry rules are:
SPX close > SMA200(SPX close) and SPX rsi(2) < 5
I only get about 90 trades/events on the period 1/1/99 – 1/1/24.
That is a substantial difference. With 157 trades, you would get a noticeable profitability improvement.
Have you managed to reproduce the 157 trades you mention in Realtest?
Sharadar Core US Equity Bundle
https://data.nasdaq.com/databases/SFA
This seems like a great strategy. I'm impressed you don't want to trade it as is. Obviously, you would rather trade it than just invest in the S&P? No matter how much effort you put in, the fact is that it is going to be very difficult to avoid drawdowns, and since the past is not a predictor of the future, it may not be worth trying to find a "better" model .... Perhaps a good approach is adding in selective stock shorts. For example, large cap stocks that have large gap downs tend to continue that downward momentum. Add those on margin for a few day swing may smoothen out the overall strategy performance and help offset the drawdowns. Also, for the long side, I really like your approach of selecting a few stocks with low RSI vs. buying the whole index for a mean reversion. Especially with the advent of AI, that edge will erode faster in the index as a whole than in individual stocks imo where the sell offs and mean reversion reversals are more news driven and can overshoot more in each direction than the overall index.
After having read this great article, I am a little confused as to exactly how the percentages of delisting have been worked out. Can you please clarify?
I just read your ML article this morning on predicting probability of bouncing back. What about a ML model predicting probability of being delisted? (using market cap, and maybe some fundamentals as features)