How does WL determine which trades to take when it runs out of capital?
Author: bephipps
Creation Date: 11/15/2013 12:22 PM
profile picture

bephipps

#1
Just curious. When I use the Portfolio Simulation Mode and Max Percent Risk option, I've noticed that all trades are not taken because of insufficient simulated capital. How does Wealth-Lab determine which trades to take when it runs out of capital? Say that 5 trades come available on a particular bar but it only has enough capital to take one trade. How does it choose which trade to take?
profile picture

Eugene

#2
See the Wealth-Lab User Guide: Strategy Window > Backtesting Strategies > How Trades Are Chosen
profile picture

Sigaurd

#3
When running a strategy in Portfolio Simulation Mode, occassionally a pop-up warning will appear that states "x # of trades were not included due to insufficient simulated capital". There is a box you can check "Do not show this message again". I have checked the box, but now actually would like to turn the warning back on. However I cannot find a way to do so. Any help would be appreciated.
profile picture

Eugene

#4
Why would one want that dialog back? On the Trades tab, you can always find out if there were missed trades (and how many) by looking at the status bar. Anyway, here's the procedure:

1. With WLP closed, open this configuration file in Notepad:

c:\Users\Windows account\AppData\Roaming\Fidelity Investments\WealthLabDev\1.0.0.0\Data\WealthLabConfig.txt

2. Either remove the line DontShowMissingTradeWarning=True
or
Set the value to DontShowMissingTradeWarning=False

3. Save the file and restart WLP.
profile picture

Cone

#5
QUOTE:
Why would one want that dialog back?
To remind yourself to look at how many trades you missed, if any. I actually like this nuisance dialog :)
profile picture

LenMoz

#6
Covering shorts can also be subject to insufficient simulated capital. How are they handled?

Here's why I ask. I'm working on a somewhat radical strategy design that uses an embedded PosSizer, and I'd like the equity and cash curves seen by the strategy to be consistent with, for instance, the Percent Equity PosSizer. I can't find an answer in the documentation.

If I get it working, I may share the technique. There's more than one topic in this forum that expressed interest in trading the equity or cash curve.
profile picture

Eugene

#7
Your question sounds perhaps a bit general to me. If there's a problem, I'd like to see a code example illustrating it.
profile picture

LenMoz

#8
In a backtest, if a strategy signals to cover a short position at the market but there is not sufficient cash, what happens? Does the short position remain open? Choices would seem to be, 1. The position remains open or 2. cash goes negative.
profile picture

Eugene

#9
I'd expect that the position is closed and this is what seems to happen. Ready to prove otherwise?

According to Fidelity's website explaining Short Credit/Debit, When a short position was covered and there were insufficient funds held as a short credit to cover the position, a Short Debit occurs instead of a Short Credit. This debit would be cleared with the mark to market following settlement.
profile picture

LenMoz

#10
QUOTE:
Ready to prove otherwise?
I'm not sure I understand the question.
profile picture

Eugene

#11
If you require assistance please provide more details including sample code that demonstrates the anomaly, position sizing and data loading settings, symbol mode, symbol(s) and data provider, and a detailed description of the problem. To clarify explanations, you might want to attach a screen shot in PNG format.
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).