Strategy crashes on negative futures prices in Norgate data
Author: pholding2001
Creation Date: 2/23/2021 1:12 PM
profile picture

pholding2001

#1
Hi,

I have the futures price package from Norgate. When I have a strategy open and click on the following price data, it crashes WealthLab:

- RBOB Gasoline
- White Sugar
- Random Lumber
- Soybean Meal
- Soybeans

I get the following error message attached.

When I open a normal price chart without a strategy, everything works fine.

Does anyone one have any idea of a fix?

Many thanks,

Paul
profile picture

Eugene

#2
Please avoid PDF for posting screenshots and/or error messages. If it's a modal Windows error dialog, you could strike Ctrl-C to copy the underlying error message and Ctrl-V to paste it when replying (a standard Windows shortcut). Please only attach text as text (TXT) and images as images (PNG preferred, MS Paint which is built in any Windows will do it). Thank you.
profile picture

Cone

#3
Paul, can you qualify "crash", please? Did Wealth-Lab actually shut down, or did you just have to click through that error message? I'm not sure we're about to test the same conditions, but you might be able to get by this one by just removing the WealthSignals Visualizer. (Close your strategy, F12, deselect the Visualizer, and then open the strategy again.)

Tip:
If you're posting signals to WealthSignals, save that Workspace with the WealthSignals Visualizer. That way you can remove the WS Vis. for other daily testing for which it unnecessarily consumes resources.
profile picture

alkimist

#4
I also have the NorgateData Futures Daily Data subscription and cannot reproduce your issue.
It's working fine with me (I only load the backadjusted prices).
profile picture

pholding2001

#5
Hi,

I would like to backtest and trade 5 futures markets all of which have negative price data because of the backadjustment.

They show up fine when I just use a chart but when I try and backtest them, it crashes Wealthlab. I'm clearly not the first person to come across this.

What do people do to get around this? My prices are from Norgate.

Many thanks
profile picture

Eugene

#6
Hi,

Please provide the following information:

1. Strategy or sample code used.
2. What is happening exactly when you think WL crashes? Is there an error message that you can copy (Ctrl-Ins or Ctrl-C) and paste (Shift-Ins or Ctrl-V)?
3. Single symbol or Multi-symbol mode, Position Sizing, and Data Loading settings
4. Symbol(s)
5. To clarify explanations, send a screen shot by striking the "Print Screen" key and then pasting into Paint or other imaging application. Save as PNG and attach.
profile picture

pholding2001

#7
Hi Eugene,

Thanks for getting back to me. I posted this yesterday with error message and markets but my post was deleted for some reason.

The markets where it happens all have negative prices and are the only ones I have trouble with.

1. Here is the strategy code:

CODE:
Please log in to see this code.


2. As soon as I click on the price data of one of the five markets mentioned belowI get an error message which I have attached.
3. It's in single symbol mode. Position sizing is 10,000 (RP). Can you tell me where I can find the data loading settings?
4. Random Length Lumber (LBS), White Sugar (LSU), RBOB Gasoline (RB), Soybean Meal (ZM), Soybean (ZS)

Thanks for your help.



profile picture

Eugene

#8
Hi Paul,
QUOTE:
I posted this yesterday with error message and markets but my post was deleted for some reason.

It's not deleted. An unnecessary duplicate topic "NorgateData" has been created and I've moved your post to this topic which can be easily found by forum search.

QUOTE:
2. As soon as I click on the price data of one of the five markets mentioned belowI get an error message which I have attached.

Please do not use PDF for posting screenshots and/or error messages. If it's a modal Windows error dialog, you could strike Ctrl-C to copy the underlying error message and Ctrl-V to paste it when replying (a standard Windows shortcut). Please only attach text as text (TXT) and images as images (PNG preferred, MS Paint which is built in any Windows will do it). Thank you.

QUOTE:
Can you tell me where I can find the data loading settings?

Right below the data loading settings.

QUOTE:
4. Random Length Lumber (LBS), White Sugar (LSU), RBOB Gasoline (RB), Soybean Meal (ZM), Soybean (ZS)

Does it mean the problem (whatever it is) is isolated to these symbols (Norgate data specific)? What about Yahoo data?
profile picture

pholding2001

#9
QUOTE:
It's not deleted. An unnecessary duplicate topic "NorgateData" has been created and I've moved your post to an existing topic which can be easily found by forum search.


Aha. Okay. Thanks for that. I normally leave my post open and just refresh to see when there is a reply. I did it and saw the post was in "trash". If that happens again, I'll know to find it elsewhere in the forum.

QUOTE:
Please do not use PDF for posting screenshots and/or error messages. If it's a modal Windows error dialog, you could strike Ctrl-C to copy the underlying error message and Ctrl-V to paste it when replying (a standard Windows shortcut). Please only attach text as text (TXT) and images as images (PNG preferred, MS Paint which is built in any Windows will do it). Thank you.


Noted for the future :)

QUOTE:
Right below the data loading settings.


My question was where can I find the data loading settings. I don't quite understand your response.

QUOTE:
Does it mean the problem (whatever it is) is isolated to these symbols (Norgate data specific)? What about Yahoo data?


Yes, it is isolated to only these symbols and Norgate data. The only thing which is exlusive to these symbols is that they have negative pricing due to the backadjustment. Given that is their only commonality, I've assumed that the problem might lie there but it could just be a case of correlation not implying causation.

I've just seen there were answers to my post from yesterday. Should we continue the chat over there and close this one then?

profile picture

Eugene

#10
QUOTE:
My question was where can I find the data loading settings. I don't quite understand your response.

Sorry, right above the position sizing control.

QUOTE:
I've just seen there were answers to my post from yesterday. Should we continue the chat over there and close this one then?

I've reviewed the posts and there's no point to continue it as Cone has resolved the imaginary "crash" issue already. Nothing crashes here, it's just an innocuous handled exception message that does not prevent WL from working. Just follow Cone's suggestion on disabling the WSP visualizer and it'll be fine.
profile picture

pholding2001

#11
So, I just did as Cone suggested with F12 and disabled Wealth Signals. I then clicked on one of the problematic markets with the strategy code and Wealthlab shut down again (I'll avoid the word "crash"). This time there was no error message. The Windows wheel started turning and then then Wealthlab just closed.

I started it again to see whether it had registered me unchecking Wealth Signals and it was indeed still unchecked. I tried again and it shut down again...?
profile picture

Eugene

#12
Hmm now that's a crash. Did you reopen that Strategy window having disabled the WSP visualizer?
profile picture

pholding2001

#13
I didn't really get a chance. Once I selected the market for the strategy, Wealthlab stopped responding and then shut down. So, when I started the programme again, it would have all been a fresh start. I've opened it again, and Wealth Signals is still unchecked. I've attached a screenshot.

P.S. On reopening WL, I used the same strategy as before and the same price data.
profile picture

Eugene

#14
Yes it's a fresh start then. Let's move on then:

1. Please disable all visualizers but Equity and Performance.

2. Copy the strategy code below into a blank new S.window that does not contain any indicators added by drag and drop.

3. Run this code on no less than a year worth of data:
CODE:
Please log in to see this code.


I believe that with the logic wrapped in a try/catch block it should now print the exception message to the log.
profile picture

pholding2001

#15
Hi Eugene,

I disabled all visualizers apart from Performance and Equity (there were two others: Equity+ and Closed Equity. I disabled those too).

I've copied the above code into a new strategy window without any dragged indicators and used a period of 2 years and I backtested the market Random Lumber Length which is one of the five problematic markets.

I then went back into the Editor and clicked on the "Debug Log" and the window is empty?

So, the problem has gone when the other visualizers are disabled.
profile picture

Eugene

#16
Thanks Paul, an empty log suggests that a visualizer is indeed the culprit. I leave it up to you to try and enable them one by one and reopen the strategy window to find the conflicting visualizer.
profile picture

pholding2001

#17
Great. Thanks for your help, Eugene :)
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).