Index Out-of-Range on large DataSets
Author: dajian888
Creation Date: 2/4/2011 4:35 PM
profile picture

dajian888

#1
I am working on backtesting for 300 symbols and 7 years 5-minutes data. After a certain random point, sometimes after processing 120 symbols, some times 150 symbols, the backtest will crush with a runtime exception: "Index is out-of-range" with very limited traceback, only shows DataSets...get_item(). Is this error caused by running out of memory?

If I work on smaller datasets, it is much better. Since it didn't report run-of-memory, it is still a bug? I also noticed that the physical memory didn't reach maximum before this happens, it runs from 2G to 2.8G during the run.
profile picture

Eugene

#2
Which Wealth-Lab version? 32-bit or 64-bit?
How much RAM?
How much data are you loading?
Which data provider?
profile picture

Cone

#3
It's too much data for a Windows 32-bit O.S.

Rule of thumb for a max intraday simulation on a 32-bit system: 10 months of 1-Minute bars for 100 symbols.

So for 5-minute bars and 300 symbols, you probably won't have much success with more than about 17 Months of data. Mileage will vary, but for sure you'll need a 64-bit machine with probably 8GB for 7 years.
profile picture

hsidhu

#4
I have a similar problem.
I have windows 7 with 6 gig of RAM.

My backtest includes:
Scale: Daily
Dates: 02/03/2011 to 02/04/2011 (only 2 days)
Dataset: Dow30

Strategy:
Buy a Close
-- Stochastic %K crosses above %D
Sell at ATR Limit
Sell at ATR Close

Still having out of index problem
profile picture

Eugene

#5
Topic starter is probably having a sort of out-of-memory problem. Yours is different. Here are the reasons for the error: Index was out of range

Loading just 2 bars of data is not enough to build and smooth a Stochastic and must be caused by a misconception of some sort like ignoring the importance of seed data or misunderstanding the main (trading) loop. Please load enough data to build the indicators and see if it fixes the error.

If not, try clarifying by providing additional details about the error message (popup, strategy error box etc), used instrument (Strategy Monitor, strategy window - static? streaming?), position sizing used etc.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).