- ago
I have a simple strategy that I've created, and if I drag the strategy onto a chart, I can see that WealthLab correctly creates the Positions and displays the Buy and Sell arrows on top of the chart. However, if I attempt to Backtest that same Strategy on that same DataSet, then it always returns results with 0 Positions.

Could there be something simple that I'm overlooking? I'm very new to WealthLab, but I've been able to Backtest various other strategies and never encountered this problem. I'm using a DataSet that I've imported from a CSV file, and I'm wondering if something about the Data could potentially break the Backtest functionality?
0
562
8 Replies

Reply

Bookmark

Sort
- ago
#1
As for my experience with it, there are many possible reasons:

- You said that the dataset and the strategy are the same, but there are backtesting settings and strategy parameters to possibly cause this. For example there are no data for a time period selected.

- When the benchmark ticker (according to the data providers checked) does not have data for an appropriate TF the backtest will not run (but I guess you'll not get Metrics Report at all in this case, but if you look at Positions tab - there'll be no trades, yes).
2
Glitch8
 ( 11.81% )
- ago
#2
Impossible to say unless you share your strategy and settings.
0
- ago
#3
Thank you for the response! I think it may be the second possibility you described, where the benchmark does not support the selected timeframe. I notice that when I use the "Portfolio Backtest" option, rather than "Single Symbol", some red text says "DataSet is linked to a Data Provider that does not natively support this Scale". But this is confusing to me, since I can use that same DataSet to chart at the specified Data Scale, without any problems.

Is there some reason that Backtesting with an ASCII DataSet that uses "1 Minute" Data Scale would not be supported?
0
- ago
#4
If you change the benchmark symbol to a symbol contained in your 1-minute ASCII DataSet, will this produce trades in the backtest?
1
- ago
#5
Thanks for the suggestion. I just double-checked the benchmark symbol and everything looks correct, but still not seeing any trades in the backtest.

If I keep everything the same, but only change to a non-ASCII dataset, then the backtest works, so I assume there is some issue with my ASCII dataset. This is an example of what a row looks like in the CSV file:
QUOTE:
20210715033000,1986.46,1988.74,1985.74,1988.74,7.06265649


Do you see anything that looks incorrectly formatted? Maybe it doesn't like the timezone that was used for the Date column?

If there's somewhere I could see an example of a CSV file that is correctly formatted for WealthLab, that would be helpful!
0
- ago
#6
Can you see the chart when double-click the symbol in the data-sets area?

You can also try to unveil some mystery with using WriteToDebugLog() somewhere in Execute().
2
Cone8
 ( 25.44% )
- ago
#7
QUOTE:
an example of a CSV file that is correctly formatted for WealthLab
When you create/connect the ASCII DataSet, you have to choose settings that match your data.

The record of data that you posted appears to have a DateTime,Open,High,Low,Close,.. and a decimal Volume? In any case, check for chart data as Replikant_m mentioned. If you don't have chart data, then something's probably wrong with the DataSet settings.
1
- ago
#8
Just wanted to second Replikant_m's clever advice: it happens that ASCII data may be inconsistent inside so carefully inspecting it can reveal something.
1

Reply

Bookmark

Sort