- ago
Hello.

I imported one strategy with identical settings and same dataset but I get different outputs: the original produces 21 signals and USD 1023988 in 10 years (using USD 100000) and the imported generates only 3 signals and USD 2710743. Output is consistent after several runs. There is a same order difference with "benchmark profits".

I am using 2 instances of WL in two separate computers. One is for creating strategies and the second is for trading. Unless I missing something, settings are the same in both instances.

I am needing help in order that both the imported and the original strategy (identical) get the same output.

Thank you in advance!


0
335
29 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.10% )
- ago
#1
Well something must be different. If there are two computers then there are two locally saved copies of the data. Maybe the data is different. If you really want to test on the exact same data you'll need to copy the data from the WL Data folder from the first computer onto the second. You'll also need to ensure all of the backtest settings are identical.
1
- ago
#2
Backtest settings are identical. I need to find what's different between both WL instances but it's not evident.

I will copy data folder in order to be exactly the same than the original. The strange thing is that buying and holding the reference (SPY), achieve completely different results (number of orders and their size is different too, even to strategy settings are the same).
0
Glitch8
 ( 12.10% )
- ago
#3
It can be tricky sometimes to discover why things aren't matching, but there's always a reason. If you want to book a billable one-hour Concierge Support zoom call, we can work with you to help figure this out.
0
Cone8
 ( 28.32% )
- ago
#4
It's an unlinked DataSet so start with...
1. the order of the checked Historical Provider in the Data Manager,
2. Backtest Preferences
3. Markets and Symbols - could affect it if you're using Futures Mode.
2
- ago
#5
Thank you Cone for your answer.

I just checked out these and everything is almost the same. The only difference is that Alpaca is not a provider in my trading computer but essentially it's the same.


0
- ago
#6
0
- ago
#7
Backtest settings are exactly the same and Dataset is the same
0
- ago
#8
Have you tried to copy the data folder over or refresh the data on both PCs?
1
- ago
#9
CODE:
Have you tried to copy the data folder over or refresh the data on both PCs?

Done, the problem remains the same.
0
- ago
#10
Note that profit and benchmark almost double in the second computer.
0
Glitch8
 ( 12.10% )
- ago
#11
Can you email the strategy to support@wealth-lab.com?
1
Glitch8
 ( 12.10% )
- ago
#12
Also just try running a blank strategy on each computer. If the benchmarks are different then let's go from there. You'll need to check the Markets and Symbols settings, Backtest Preferences, etc until you figure out whats set differently.
1
MIH8
- ago
#13
To reduce errors related to data, there is an option in the current version of WL8. As already mentioned in the course, the data should in any case be identical to the data used for the backtest.



Basically, I recommend not only updating data for further tests, but also keeping the software updates up to date. This way you have a common basis with the WL team.

Maybe this helps a little bit.
1
- ago
#14
QUOTE:
Also just try running a blank strategy on each computer. If the benchmarks are different then let's go from there. You'll need to check the Markets and Symbols settings, Backtest Preferences, etc until you figure out whats set differently.


Done, results where completely different between both computers, and benchmark profit was almost double in the second computer. Test strategies where identical "buy and hold" and also a "buy and sell"
0
- ago
#15
Look at this. I ran a buy and hold strategy with SPY. I had the same profit in both computers BUTAPR 179.19% on the second computer and 10.83 on the first one.
0
- ago
#16

0
Cone8
 ( 28.32% )
- ago
#17
You're comparing Profit % with % APR. Click the label and it will alternate between the two.
1
- ago
#18
I tested it again using DOW30 WD dataset and was concordance, but when I change to the dataset the strategy is designed for, profit is near a half as well as position size (despite position size, equity and margin are exactly the same in Strategy Settings.

The problem is only when I run it with this specific dataset or any of its symbols. There is no problem when I run the same strategy with anything else (but it's intended to be use with this group of stocks)
0
Cone8
 ( 28.32% )
- ago
#19
There's an IB Request error "Could not identify a contract for IRCP" - appears in 2 images. And another error in the first image: "price does not conform to the minimum price variation for this contract". Are there any more errors in the Log Viewer?

IRCP trades on the VALUE exchange, so you'll need to create a special record in IBContracts.txt and maybe even need special data perms to get its data from IB. (I just tried - not available to me.)

Go through every symbol and see where their being sourced. There's a difference in the data - maybe more than just IRCP.
1
Glitch8
 ( 12.10% )
- ago
#20
You're making progress. My next step would be run it on ONE of the symbols in question, analyze the differences in trades, and see if I can figure out what's causing it.
1
- ago
#21
14/12/2022 10:12:21:846
Alpaca
Connected

--------
14/12/2022 10:12:21:849
Alpaca
Alpaca Broker: Connected to Alpaca Broker: Timestamp: 14/12/2022 10:12:19, NextOpen: 14/12/2022 11:30:00, NextClose: 14/12/2022 18:00:00

--------
14/12/2022 10:41:04:103
Alpaca
Historical request error: TGSU2
AggregateException
One or more errors occurred. (invalid symbol: TGSU2) Inner Exception: invalid symbol: TGSU2
at WealthLab.Alpaca.AlpacaHistorical.†††
†††ˆ–(String , HistoryScale , DateTime , DateTime , Int32 )
--------
14/12/2022 10:41:04:267
Alpaca
Historical request error: TGNO4
AggregateException
One or more errors occurred. (invalid symbol: TGNO4) Inner Exception: invalid symbol: TGNO4
at WealthLab.Alpaca.AlpacaHistorical.†††
†††ˆ–(String , HistoryScale , DateTime , DateTime , Int32 )
--------
14/12/2022 10:41:04:992
Alpaca
Historical request error: TECO2
AggregateException
One or more errors occurred. (invalid symbol: TECO2) Inner Exception: invalid symbol: TECO2
at WealthLab.Alpaca.AlpacaHistorical.†††
†††ˆ–(String , HistoryScale , DateTime , DateTime , Int32 )
--------
14/12/2022 10:45:50:093
InteractiveBrokers
Market data farm connections OK: usfarm, ushmds, secdefnj

--------
14/12/2022 10:45:54:355
InteractiveBrokers
0,4 seconds difference: Local - TWS time

--------
14/12/2022 10:45:59:092
Interactive Brokers
Connected

--------
14/12/2022 19:52:47:148
InteractiveBrokers
2105: HMDS data farm connection is broken:ushmds

--------
14/12/2022 19:52:47:148
InteractiveBrokers
2157: Sec-def data farm connection is broken:secdefnj

--------
14/12/2022 19:52:47:163
InteractiveBrokers
2103: Market data farm connection is broken:usfarm

--------
14/12/2022 19:52:49:106
InteractiveBrokers
Market data farm connections OK: secdefnj, ushmds, usfarm

--------
0
- ago
#22
QUOTE:
You're making progress. My next step would be run it on ONE of the symbols in question, analyze the differences in trades, and see if I can figure out what's causing it.


Done, there are problems when I run it with its individual symbols too. No problem if I use any other dataset or symbols outside this list (but it is intended to run with these symbols).
0
Cone8
 ( 28.32% )
- ago
#23
What was the analysis?

Compare the trades for one symbol. Where are they different? - this is the question you have to answer. Just find one trade that's different, and there will be a reason for it - if the strategy is the same, it's got to be data or settings.
2
Glitch8
 ( 12.10% )
- ago
#24
OK well you need to continue your analysis. There are still problems, great. See if you can identify what's behind the problems. What I would do is look at the Positions list and compare them one by one and try to figure out what's causing the difference. Also, open the symbol in a chart and look at the status bar to see what data provider is sourcing the data for the symbol. In other words, do some DEBUGGING and ANALYSIS and try to get to the bottom of it.
2
- ago
#25
Do the two computers operate in exactly the same locale (Windows region settings)? It's less likely but that could be an effect of different decimal/currency separator character, too.
1
- ago
#26
QUOTE:
Do the two computers operate in exactly the same locale (Windows region settings)? It's less likely but that could be an effect of different decimal/currency separator character, too.


I was checking this out, there was a discrepancy but now both computers have same regional settings. There are still discrepancies in the profit and also in the benchmark profits but now it generates all the signals. As I use 11% of equity per position, the signals produced during backtest are the size it would have after 10 years of composite profit. I think this is normal. Anywise these signals are doubling in computer #2
0
- ago
#27
By chance you have an Event provider enabled for dividends/splits, too? If you do, resolution may be in Glitch's Post #22 here: https://www.wealth-lab.com/Discussion/8961
1
- ago
#28
QUOTE:
By chance you have an Event provider enabled for dividends/splits, too? If you do, resolution may be in Glitch's Post #22 here: https://www.wealth-lab.com/Discussion/8961


I do. Checking out the post. Thank you!!!
1
- ago
#29
I did it but the problem remains.
I´ll be practical and I'll trade it anywise because there's consistence in the logic as well as in the returns. Computer #2 doubles return and benchmark but it doubles position size as well.

So, I will allow her caprice and I'll trade a fix amount instead of % equity. "The Matrix" won (by now...).
0

Reply

Bookmark

Sort