u33m2ha8
 ( 0.00% )
- ago
Here's a simple example strategy:

Close crosses the 200-day simple moving average (SMA) as an entry point from the bottom up:

I'm starting the backtest on January 4, 2010, using the S&P 500 data set.

I've noticed that the first purchases don't occur until October 21, 2010. Is this because I'm using the 200-day SMA, and the software doesn't know in advance whether all the symbols in the data set have been listed for 200 days? Since this also happens when testing the single symbol Spy, I don't understand the reason. Is there a way to work around this so the backtest starts immediately on the date the data set is set?

Another question related to the benchmark: Is the benchmark performance calculated from January 4, 2010, or only from the first purchase of a symbol?

Thanks!
0
49
Solved
3 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
Is this because I'm using the 200-day SMA, and the software doesn't know in advance whether all the symbols in the data set have been listed for 200 days?

That's correct. WL won't start trading until the 200-day SMA indicator has valid data. (Why on earth would you want WL to start trading before all the indicators become valid?)

You can set the starting point of your Data Range, so just make your Data Range 200-days earlier so WL starts trading when you want. It's that simple.

---
If you're really serious about overriding WL's default behavior, then you should write your strategies in C# and not use blocks. C# coding allows for more control.
0
u33m2ha8
 ( 0.00% )
- ago
#2
Thanks

Will the benchmark performance be calculated from January 4, 2010, or only from the first purchase of a symbol?
0
Glitch8
 ( 10.87% )
- ago
#3
It will be calculated based on the StartIndex that the Strategy uses. For Block Strategies this assumes the value of the longest indicator period used.
0
Best Answer

Reply

Bookmark

Sort