A simple test strategy that seems to be missing entries.
Buy when ATRTrial cross bar.Low. Sell at target.
Dataset: SP 500 (WeathData)
Scale: Weekly
Range: Most Recent 30 Years
I have tried:
1) Low crosses over ARTTrail
2) ATRTrail crosses under Low
3) Indicator compared to indicator where ATRTrail > Low 1 bar ago && ATRTrail < Low 0 bars ago
4) Pushing to C# Code, checking code and running.
All of the above produce the same result... 1 of three entries on the below chart. Am I missing something glaringly obvious?... Perhaps I'm to tired to see it
Buy when ATRTrial cross bar.Low. Sell at target.
Dataset: SP 500 (WeathData)
Scale: Weekly
Range: Most Recent 30 Years
I have tried:
1) Low crosses over ARTTrail
2) ATRTrail crosses under Low
3) Indicator compared to indicator where ATRTrail > Low 1 bar ago && ATRTrail < Low 0 bars ago
4) Pushing to C# Code, checking code and running.
All of the above produce the same result... 1 of three entries on the below chart. Am I missing something glaringly obvious?... Perhaps I'm to tired to see it
Rename
Position sizing. Apparently the size wasn't enough to take these trades.
I'm getting all the trades when using a position size that can accommodate them (100% of equity with a little bit of margin, like 1.2:1, for example.)
Thanks for the feedback, unfortunately changing Position size does seem to have an effect on the outcome for me.
@Glitch, can you post your trade/backtest and Strategy settings for me to cross reference?
I've increased the account size to $10,000,000. changed from Percentage Allocation to Fixed Allocation of $10,000 per trade which should be more than adequate.
The triggered trade size is over 1100 shares. Considering the other two trade entries would be under the $20 price a level they would sit around the 500 share size.
There is more than adequate equity
And no NSF count.
I also noted a difference in data history between the chart I posted and the one above showing all three entries. I'll delete my local data file and refresh.
@Glitch, can you post your trade/backtest and Strategy settings for me to cross reference?
I've increased the account size to $10,000,000. changed from Percentage Allocation to Fixed Allocation of $10,000 per trade which should be more than adequate.
The triggered trade size is over 1100 shares. Considering the other two trade entries would be under the $20 price a level they would sit around the 500 share size.
There is more than adequate equity
And no NSF count.
I also noted a difference in data history between the chart I posted and the one above showing all three entries. I'll delete my local data file and refresh.
If you're testing on the SP 500, the reason is that RATL didn't enter the index until 5/23/2001 but the backtester loads some lead data so that indicators can be computed before it actually entered.
Thanks @Glitch. I've confirmed I get all entries when running on a single symbol, but not when running on the S&P 500 dataset.
As you mentioned, the ticker was added to the S&P in May of 2001, therefore eliminating the earlier trade entry. However the first cross after the Ticker was added to the index is still skipped (Dec 2001).
Is more data is loaded for display than is loaded for indicator calculation in the backtester?
I'm guessing this might happen if first cross (since index added date) is ignored due to possible "false-positive".
Image showing how first cross can change due to depth of historic data (Expected behaviour).
As you mentioned, the ticker was added to the S&P in May of 2001, therefore eliminating the earlier trade entry. However the first cross after the Ticker was added to the index is still skipped (Dec 2001).
Is more data is loaded for display than is loaded for indicator calculation in the backtester?
I'm guessing this might happen if first cross (since index added date) is ignored due to possible "false-positive".
Image showing how first cross can change due to depth of historic data (Expected behaviour).
Interestingly, if I run a single symbol with specific date rage 05/23/2001 -> 02/20/2003 I get both trades.
But If I run an S&P500 backtest with the same date settings the first trade is dropped.
SIngle Symbol Backtest
S&P500 Backtest
But If I run an S&P500 backtest with the same date settings the first trade is dropped.
SIngle Symbol Backtest
S&P500 Backtest
Sorry, I double checked and it was actually added 1/30/2002 and removed 2/3/2020.
And sure, running it on the single symbol won't apply the index in/out date filters of the S&P 500.
And sure, running it on the single symbol won't apply the index in/out date filters of the S&P 500.
QUOTE:
was actually added 1/30/2002
Ok... That will be why the Dec 2001 entry doesn't occur.
Thank you for taking the time to step through this with me.
Can I access a list of "added" dates for index tickers in wealthlab?
I'll add it to my checks before posting in future.
QUOTE:
Interestingly, if I run a single symbol with specific date rage 05/23/2001 -> 02/20/2003 I get both trades.
It makes sense because in single symbol mode the instrument is traded individually, not as part of the index. And since its presence in the index doesn't play a role, it can always be traded this way without looking back at whether it was included in the index or not.
QUOTE:
Can I access a list of "added" dates for index tickers in wealthlab?
WL7 elegantly hides the complexity of index composition maintenance so you don't have to worry about survivorship bias in your backtests. In fact, being a W-D advantage it's sort of a "trade secret" with everything that it implies. Since I'm sure about your good intentions, you could make a creative use of market orders on a W-D DataSet to find out the added/expelled dates.
Thanks @Eugene, yes, it does make sense. I completely understand the differences between strategy execution on the "WD index portfolio" dataset vs a single constituent as a stand-alone security. But, I completely overlooked it when searching for an explaination. I knew it was simple, I just couldn't pin it down.
Interesting idea :) I like the way you think.
QUOTE:
you could make a creative use of market orders on a W-D DataSet to find out the added/expelled dates.
Interesting idea :) I like the way you think.
It's actually easier than that. Think PreExecute(... participants)...
Your Response
Post
Edit Post
Login is required