- ago
One of the issues I'm running into during backtesting is the trades happen too quickly for the previous trade to settle. I believe this is providing unreasonable large returns because either I have to hold funds in reserve or the 2nd trade would be illegal.

Is there a way to delay the next trade until the settle date is reached?
1
495
7 Replies

Reply

Bookmark

Sort
Cone8
 ( 5.57% )
- ago
#1
The PowerPack has 2 rules that could be helpful -
1. One Entry Per Day
2. Bars Since Entry/Exit - this is the one you're probably looking for. Add it to your entry logic.
1
- ago
#2
Thanks, Cone.

And IIRC, there are 7 bars in an hourly trading day, correct?

Thinking about, the issue with using bars is that the trade may happen mid-day, but you wouldn't need to wait 3 full days (21 bars), just the 3 calendar days. This could mean the next trade could happen between bars 15 and 21 (hourly).
0
Cone8
 ( 5.57% )
- ago
#3
I'll create a T+days Since Entry/Exit rule for the PowerPack
0
Glitch8
 ( 10.10% )
- ago
#4
Let’s think about this before going ahead and implementing this block. The request here is to have the backtester simulate holding cash back until the trade settles (T+2 days.)

Adding a Condition for a single symbol won’t properly simulate this. We would need to support this as a new Backtest Preference. I’ll flag it as a #FeatureRequest.
0
Cone8
 ( 5.57% )
- ago
#5
Good call. It needs to be a portfolio level preference to hold back buying power for 2 trading days.

Note: Settlement is likely to change to T+1 in 2024.
https://www.sec.gov/news/statement/peirce-settlement-cycle-20220209

I'd propose that the T+n preference to include an optional number of days (0, 1, 2, or 3) for those who want to backtest with longer settlements when they were in place.

All that said, a condition to delay a trade for n Trading Days (or even 1 calendar week like the 1% strategy uses) is still a useful rule that you can't currently get from the blocks.
1
- ago
#6
btw, in WL6 we simulated this with a PosSizer option which rejected trades not conforming to the T+3 rule:
http://www2.wealth-lab.com/WL5WIKI/psPositionOptions.ashx
0
Glitch8
 ( 10.10% )
- ago
#7
I don't think this would work. Consider a trade that only uses 10% of equity. The position sizer would exclude it even though there's plenty of unused buying power. We need to handle it at the backtester mechanics level.
0

Reply

Bookmark

Sort