When To Sell? Unveiling the Best Trade Exits: Complemented with Backtest
In a previous article, we highlighted the difference of changing the entry method: entry on the next day open (1) vs. entry on the same day close (2) vs. entry on the next day with a limit order (3).
For the comparison we created a portfolio with a maximum of 10 positions each and compared the performance metrics: CAGR, RAR, max. drawdown etc. We figured that alternating the entry type for a stock trading strategy, keeping all of the other rules the same, can change the metrics of the system significantly and, therefore, also the nature of it.
Today we’d like to analyze different exit techniques: exit on the next day open (1) and exit on the same day close (2). But we are doing it a little bit differently than last time. We’re not constructing a portfolio with a maximum of ten positions; all trades shall be considered.
Two different exit types
For the backtest, we use two different exits:
- Exit on the next day open
Depending on when the sell signal is being generated, one can think of different exits. If the sell signal is being generated at the close of the stock market, the most common exit, since it is the best one for part-time traders in terms of “sufficient time to place orders without any coding skills”, is the exit on the next day open.
After the stock market closes for the day, you do have enough time to evaluate your new orders with the help of stock screeners, some manual selection methods, Python scripts, or any trading software.
- Exit on the day’s close
A second option to execute the sell signals is instantaneously with a market on close order or with a market order shortly before the stock market closes, e.g. 15 seconds before the closing bell, or even in the seconds after the official close. This method requires some coding skills since you need to have trading software that automatically checks for the sell signals and finally places the order. We hopefully do not have to tell you that you have to have a reliable system for that, as consistency is crucial for systematic trading.
The strategy explained
We’re using the same strategy as we did in another article. The only thing which changes is limiting the number of positions to ten; that rule can be ignored since we’re comparing all trades.
[am4show have=’p2;p3;p58;p59;p130;p138;’ user_error=’Premium Post Access’ guest_error=’Premium Posts’]
Buy trading rules :
- The stock needs to be part of S&P 500 index
- 2-day RSI crosses below 10
- Entry on the next day open
- Stock price trading above 52-week moving average
Sell trading rules:
- If the 2-day RSI crosses above 60 we sell the position
Exit variation:
- Exit on next day’s open
- Exit on same day’s close
Backtest settings:
- Time range: 2000-2022
- Data provider: Norgate Premium, survivorship-bias free
- Commissions per trade: $0
Strategy backtest and comparison
Closing the trades on the next day open is the most common approach; that will be, again, our base strategy.
Sell on next day’s open
All trades from 2000 to 2022 had an average profit of 0.41 % and was achieved while being invested an average of 5.75 days (average for each trade). The win rate of 67.6 %, with an average profit of 2.06 %, is quite solid.
Sell on same day’s market close
Assuming you have the proper coding skills or you do have some nice trading software that takes care of signal generation and order placement at the market close, the average profit and loss increase slightly to 0.43 % while being invested 4.75 days (that’s obvious as we’re closing the trades one day earlier than the base strategy).
Entering the trades on close, exposing your strategy to the market for one additional day less, gives you a better performance.
For the exit, we do not need to hold for one more day since the recovery has already taken place. The percentage of winners increases when doing so, which compensates for the slightly less average profit of 1.98% for the winners.
Let’s summarize our findings in this table:
| Exit on next day open (base) | Exit on same day close | |
|---|---|---|
| Avg. PnL [%] | 0.41 | 0.43 |
| Avg. days held [-] | 5.75 | 4.75 |
| Winners [%] | 67.6 | 69.1 |
| Avg. profit winners [%] | 2.06 | 1.98 |
[/am4show]
Conclusion
Again we’ve seen that minor changes to the strategy can have big effects. With the second exit technique the exposure, and therefore the risk to the market, decreases by one day, but the profit increases. Especially for mean reversion strategies entering and exiting on the same day at close can add a nice edge to strategies, making them even more robust and less volatile.
Disclaimer
Quantified Strategies (SIA Lofjord) is not an investment advisor. The content and information provided are educational and should not be treated as financial advisory services or investment advice. Trading and investment in securities involve substantial risk of loss and is not recommended for anyone that is not a trained trader or investor – it shall be conducted at your own risk. It is recommended that you never risk more than you are willing to lose. Leverage can lead to substantial losses. Any use of leverage, margin, or shorting is at your discretion. Quantified Strategies (SIA Lofjord) is not responsible for any losses that occur as a result of its content and information.
Hypothetical or simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, Since the trades have not been executed, the results may have under or overcompensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs, in general, are also subject to the fact that they are designed with the benefit of hindsight. No representations are made that any account will or is likely to achieve profit or losses similar to those shown.
FAQ:
What is the significance of changing entry methods in a stock trading strategy?
Changing entry methods is crucial as it directly impacts how a trading strategy interacts with the market. The entry method determines when a position is initiated, influencing the subsequent performance metrics. The choice between entry on the next day open, entry on the same day close, or entry with a limit order can significantly alter the nature and outcomes of a trading system.
How does altering the entry type affect the performance metrics of a stock trading strategy?
Altering the entry type introduces variations in the timing of position initiation, affecting critical performance metrics such as Compound Annual Growth Rate (CAGR), Risk-Adjusted Return (RAR), and maximum drawdown. The comparison of these metrics reveals the impact of entry type changes on the overall effectiveness and risk profile of the trading system.
What is the focus of the analysis on different exit techniques in the provided content?
The analysis shifts its focus to exploring different exit techniques, specifically exit on the next day open and exit on the same day close. This examination aims to understand how the chosen exit strategy influences the overall performance and risk characteristics of the trading strategy.
