- ago
Even without changing any parameters - upon hitting the "run backtest" button a second time --->error message
"Index was out of range. Must be non negative and less than the size of the collection. (Parameter 'Index')

Hi Community, I'm trying to build a "switch" into a strategy. The "switch" will decide, wheter part 1 or part 2 of the strategy will execute.
I created an individual backtesting data set (portfolio) consisting of the SP100 plus 25 safe stocks (out of the SP500) as per Wealth Data.



Both Strategies are identical entry and exit blocks, except:

Switch Block 1 in Strategy 1 is:
Close is greater than SMA (20) - using symbol SPY
Switch Block 2 in Strategy 1 is:
If Symbol is one of: includes all tickers from the SP100 as per Wealth Data

and,
Switch Block 1 in Strategy 2 is:
Close is less than SMA (20) - using symbol SPY
Switch Block 2 in Strategy 2 is:
If Symbol is one of: includes all tickers of the 25 safe stocks (only)

For further display I'm attaching screenshots of Main Strategy Settings and the two parts of the full strategy. The idea is, if markets go below the SMA indicator I should only get signals of the safe stocks.

What am I doing wrong to get the error message upon running a backtest once an initial backtest has been run?

The strategy is more of a dummy strategy to create such a switch (which should work in different strategies as a "filter" if you will), so please do not address the sense or nonsense of mirroring the two strategy in one.

Pls. let me know, if any further information is needed to judge what is going wrong.
Thank you.
0
169
15 Replies

Reply

Bookmark

Sort
- ago
#1
Here are the screenshots from WealthLab:

9485-Strategy-Backtesting-Data-Set-docx-Google-Docs-pdf

Part 1 of Strategy with all tickers of SP100 and safe stocks.

9486-Section-1-of-full-strategy-Google-Docs-pdf

Part 2 of Strategy with all tickers of safe stocks only.

9487-Section-2-of-full-strategy-Google-Docs-pdf
0
Cone8
 ( 0.70% )
- ago
#2
The only thing jumping out at me is the use of expired symbols (AGC.20010828.A) with a date earlier than the starting date of the backtest.

It's certainly odd that it happens on the second Run, which uses the data already loaded. Probably you'll need to export and send the Strategy to support, info@wealth-lab.com with the list of symbols in your DataSet so that we can track down that bug.
1
- ago
#3
Hi Cone, thank you for the swift answer. I will export the strategy and send it to this email address, along the DataSets of the 2 created portfolios.
Thank you.
0
- ago
#4
just throwing this one in. As I was updating the SP100 Data Set in the Data manager today I came across this error message. Can this be an additional issue leading to my troubles explained above? 9491-Upon-updating-a-Data-Set-in-this-case-WD-SP100-error-message1-pdf
1
Cone8
 ( 0.70% )
- ago
#5

I'm not able to duplicate the problem, so maybe. You shouldn't have put that file in the WealthLab8 install folder, so delete it.

There are 2 ways to install extensions:
1. The hard way:
Download an Extension to your desktop. Close WealthLab, and run the extension installer exe file. You can delete that file after installing.

2. The easy way:
From Tools > Home Page, click on the Extension(s) to install or update, then "Update Selected Items", and follow the prompts.


1
- ago
#6
Hi Cone, fyi. I always use "2. The easy way" to install extensions and updates. No "manual" installing happening here. will keep you posted, thanks.
2
Glitch8
 ( 1.18% )
- ago
#7
It looks like somehow the setup program (exe file) for a fonantic extension wound up on the WL8 program files folder. That’s why you’re seeing that message. It shouldn’t impact anything, but to get rid of the message just delete that file.
1
- ago
#8
Unfortunately, no. Even after deleting the finantic.sysq file from the Wealth Lab 8 folder on my pc, the error message does still appear, upon opening the Data Manager and remains when updating any Data Set. Screenshots attached.

Also, is it correct I'm getting 205 symbols in the WD SP100?

Should I uninstall all finantic extensions, then re-install?
And, can you link this to my previous and original request in this thread?

9493-finantic-issue-0-2-pdf
1
- ago
#9
Sorry guys, just found another "finantic.sysq.exe" file in a different location. Error message not present atm.

This applies only to the data manager issue. My initial request/problem ist still unsolved. All details have been sent to you via email.

Some additional information:
after opening above mentioned strategy and run a first backtest, it does deliver results, as prev mentioned. I tried now to run a second backtest, but disabled the entire second part of the strategy (from entry to last exit block) using the "disable this building block" button. Backtesting now delivers again results.

Upon enabling the second part of the strategy again and hitting the backtest button, the error message appears.

1
- ago
#10
Using the "OR" divider unfortunately same outcome ---> error message.

9495-Butterworth-switch-using-OR-Divider-pdf
1
Cone8
 ( 0.70% )
- ago
#11
If the error is consistent for you, disable blocks one at a time using the 🛇 buttons in the condition blocks and then Run Backtest until the error goes away. Then we'll have something to go on.
1
Glitch8
 ( 1.18% )
- ago
#12
I'm not able to run your Strategy because it's using an indicator "BBQ" that I don't have. Now that's making me hungry!!
1
- ago
#13
@Glitch. BBQ was delivered to me when running the Strategy Gen. Evolver....I could not come up with this one. :)) I do BBQ's differently. Screenshot attached.

9496-BBQ-for-Glitch-pdf

@Cone. thank you, I will try this procedure.

I will also try using this strategy with WD data sets only, for a trial - and replace the individual portfolios. Maybe the switch wont work then, but it should be able running more than 1 backtest.

Keep you posted.
0
- ago
#14
Part 1:

Using the method described by Cone:
1. Opening the strategy from the strategies menu ---> running backtest 1, works; running backtest 2 ---> error message. Closing the strategy unsaved.

2. Opening the strategy from the strategies menu ---> disabling any 1 block ( I have done all of the blocks individually, all with the same outcome) --->running backtest 1 ---> error message. Enabling the block again ---> error message.

It kind of freezes into the error message, once any change is made to the strategy.


Part 2:

I have then changed the backtesting data set in the strategy settings to the SP100 (which before was either the SP500 or the handmade one consisting of the SP100 plus the safe stocks - none worked a second time when backtesting). I also changed all symbols in both "if symbol is one of" blocks to all symbols of the SP100 (by copy / paste) from Wealth Data set.

Now I can run any backtest number on the strategy, even when changing any parameters. So far so good! :)

But! What do I do with this information now? The switch (using two different sets of stocks and a trendline to indicate the switch from one to the other), which is the purpose of this, of course does not work, I'm using same tickers in both parts of the strategy.

Any ideas or suggestions, how to get this working? Thank you.

0
- ago
#15
Edit to Part 2 of my last post:
backtesting (regarding the settings described in part 2 of my last post) worked flawless for about 15 runs....then the error message showed up again. Back to zero.

The only time to recover after an error message is when disabeling the entire lower part (all blocks from entry to exit) of the strategy!
0

Reply

Bookmark

Sort