- ago
Hi,
Strategy:
I have a strategy that determines limits via quotes and transmits them to my broker (Interactive Brokers) when the threshold is exceeded.
Problem:
I notice that over 50% of the limits that are actually executed at IB do not match those that are displayed as executed at WL.
I have been observing this for some time. It is not a temporary effect.
This month it is so dramatic that WL shows a result for September of around +5%, but I have actually lost 5% on my account. That's a 10% difference in one month and a reason to think about how achievable the results backtested in WL are in relation to the reality at the broker with this strategy.
Almost every day I have to manually delete half of the positions at the broker and manually buy others so that everything runs in sync with WL.
On the one hand, this generates unnecessarily high fees and, on the other hand, the shares that were bought incorrectly often don't have time to develop because they are thrown out again the next day.
Questions:
Is there a way to synchronize the positions in real time?
Are there any settings for this?


0
258
30 Replies

Reply

Bookmark

Sort
- ago
#1
WL


Broker real
0
Glitch8
 ( 11.29% )
- ago
#2
I assume your backtests are showing NSF positions? You can try using granular processing in the backtest, or change the strategy so the results are deterministic and have no NSFs.
0
- ago
#3
NFT positions are deactivated in the backtest.
I have started a finer-grained backtest.
For a period from 01.01.2000 this will probably take a very long time, perhaps even days. I have set 30min as the value and am still waiting for a result.
Nevertheless, I wonder why WL does not recognize that broker and WL are not synchronized.
0
- ago
#4
I also wonder whether it makes sense to use “transaction weight” on a daily basis. The results must be wrong because the time sequence of the triggered limits is not taken into account.
0
- ago
#5

Now I have a backtest with 1 hour granular.
The result is very sobering.
It is even worse than the real result achieved with the broker.
It is not clear to me with which setup I can achieve real and synchronous results. Please help me.
0
Glitch8
 ( 11.29% )
- ago
#6
NSF cannot be deactivated. They can be retained or not retained. If your backtest produces more signals than available capital then there will be positions that cannot be taken due to Non Sufficient Funds.

Using more granular data should get you closer, but there are so many variables at play that I think it’s not realistic to expect an always synchronized result when dealing with strategies that have NSF positions.
0
- ago
#7
In any case, the tick is not set for NSF, so I assume that not too many positions can be bought.

The problem is not so much that WL has more positions than real, but the other way around. There are usually more positions in the portfolio than in WL.
I have limited the maximum number of positions in the strategy and in the trading settings to 5. The system should therefore not generate more signals than there is capital.
The fact that more positions are often bought in real terms also shows that capital is not the problem.
Or have I not understood something correctly?

Here are the current positions from the broker and WL from today.






0
Glitch8
 ( 11.29% )
- ago
#8
You’ll definitely run into this if you turn off retention of NSF positions.

If you get a position in your live broker account that is not taken by the backtester due to non sufficient funds, then by not retaining NSFs you’ll never get an exit signal.

WL8 will provide exit signals for even NSF positions as long as NSFs are retained.
0
- ago
#9
I have now activated NSF in the backtest.
However, the position TSM, which I have in my portfolio, does not appear in WL. I therefore do not receive an exit signal. I have to sell the shares manually.

0
- ago
#10
0
- ago
#11
I have to correct myself.
TSM does not appear in the list of positions at WL. However, an exit signal is still generated.
But this is difficult to manage.
0
Glitch8
 ( 11.29% )
- ago
#12
We do the best we can, but you need to keep on top of your trading.
0
Cone8
 ( 7.89% )
- ago
#13
It's not difficult to manage. The way to do it is to check the Trading option to "Block exit orders when Position not Found" and just place all the exit orders.
0
- ago
#14
The option was always active for me, so it doesn't solve the problem
0
Cone8
 ( 7.89% )
- ago
#15
If you're trading live, you need to use NSF positions. You will get signals for all positions in the backtest. Place all the signals.
For a limit order strategy, the backtest should not miss a live position unless you changed the order price (and then you're on your own).

Now describe the problem you're having with that.
0
Glitch8
 ( 11.29% )
- ago
#16
The "problem" will be that positions the backtester has at any point in time might not match the actual broker positions. But you're right you'll get ALL the exit signals.
0
Cone8
 ( 7.89% )
- ago
#17
Okay, I thought we talking about a problem trading it live (Post #7) >>

QUOTE:
TSM does not appear in the list of positions at WL. However, an exit signal is still generated.
But this is difficult to manage.
0
- ago
#18
Overriding problem:
Backtest and live trading do not match because different stocks are used. Both lead separate lives. The backtest result must therefore be called into question.

Subproblem:
Exit signals that are generated due to the above situation for positions that exist in the portfolio but not in the backtest of WL.
The problem can probably be solved by activating NSF.
I will test this.

Conclusion for me at the moment:
Since the backtest does not reflect real trading, this is not a valid backtest for me. There was a return difference of around 10% last month between the backtest and live trading, which confirms this assumption.
0
- ago
#19
Here is the current status of the trades traded yesterday:
-there is again one more position in the portfolio than in WL's backtest
-For the position that is in the portfolio but not in WL, an exit signal is still generated due to NSF
-an exit signal is generated for a position that is neither in the securities account nor in WL, but this does no harm as exit orders for positions that do not exist are rejected.
0
Cone8
 ( 7.89% )
- ago
#20
We've already provided the solution for you:

Your limit-system backtest with a high NSF count needs to be performed with granular processing to have a chance of matching reality.
0
Cone8
 ( 7.89% )
- ago
#21
Our posts crossed -
Re: Post #18

The problem looks to be that you're not allowing the backtest to use the same margin as your account. Either that or there's a problem with initial conditions (and you should use granular processing anyway for a limit system with NSF positions).
0
- ago
#22
The Magin is a good hint.
I have set factor 1 in WL. I theoretically have 4-6 in the depot, but I don't want to use them to capacity.
If I increase the value in WL, I buy more shares than I actually want, don't I?
How can I solve this practically?
0
Cone8
 ( 7.89% )
- ago
#23
Use one or more of the Thresholds in Trading Preferences.

Example:
If you don't want to use margin, set "Account Cash below" to your minimum position size, e.g., $5,000.

Under normal conditions, this will work fine. Just keep in mind that the thresholds work to prevent placing orders once they've been matched or exceeded. If Quotes trigger 100 symbols on the open, they're all going to the broker and it's a crap shoot which will be filled first. Backtests have their limits - and that scenario cannot be modeled.
0
- ago
#24
I actually thought that I would protect the account from too many fills if I selected the setting for Trading max 5 positions.
Prohibiting purchases when cash falls below a certain value is also a good idea that increases security.
But none of this solves my problem.
Since I subject the stocks for the strategy to a fundamental filter beforehand, it might not be so important to be in sync with WL as long as the positions are captured by NSF.
However, when I check today, I notice that an NSF that was protecting a position yesterday is no longer there today.
So I have to discard this idea too.

With my current level of knowledge, I think that strategies that generate entries per limit from a larger number of shares are practically impossible to implement.
Perhaps you can use such a system if you trade semi-automatically and can intervene manually immediately.
But that is not my approach.

If anyone has any other experience, I would be interested to hear it.


0
Cone8
 ( 7.89% )
- ago
#25
QUOTE:
However, when I check today, I notice that an NSF that was protecting a position yesterday is no longer there today.
This occurred because you're using "today's fundamentals" and they changed, right? If you change the input to a system, you can expect the output to change too.

If you're doing this with the fundamentals, you should consider that the whole premise of your strategy's backtest is flawed before you've even started trading.
0
- ago
#26
That is of course logical.

But not the case for me. I use other software to create a stock selection, which I then create manually in a new dataset in WL. I do this every 3 months.
I have not changed the dataset in the period described (last week).

So there must be another reason why NSF no longer recognizes the stock. I have no idea what that could be.
I have stopped the strategy for now.
0
Cone8
 ( 7.89% )
- ago
#27
The data or other inputs changed.
0
- ago
#28
Nothing that I know and/or can influence.
I have the same routine every day.
Nothing has changed.
0
Cone8
 ( 7.89% )
- ago
#29
The thing is that computer programs don't make mistakes. So either there's a bug (no evidence presented of that) or the data changed - there are about 101 ways for that to happen, so this is most likely.
1
- ago
#30
I agree, you never know for sure what the data providers are doing. It works 100 times and then it doesn't
0

Reply

Bookmark

Sort