PosSizer & Skipped Trades Solution
Author: innertrader
Creation Date: 2/25/2014 9:41 PM
profile picture

innertrader

#1
1. Does the "Skipped Trades Solution" (SKS) referred to in the documentation still exist in V. 6.6? If so, how do I enable and can you point me to documentation on this feature?

2. Is there any documentation for what the numerous PosSizer options do? I have been unable to find any.

I am trying to resolve skipped trades due to insufficient capital. I want to backtest a single symbol vs. B&H. I want to go all in with all available equity when I get a trade signal, which is why Raw mode won't work even though I am only backtesting a single symbol.

Simply adding margin to a level to resolve skipped trades favorably distorts the results for B&H. I thought the SKS was developed as a fix for this. In addition to answering the questions above, please let me know any other options to do what I am trying to do.
profile picture

Eugene

#2
1. It's not a part of 6.6 but an extension:

MS123 PosSizer Library
Position Options PosSizer

2. If you're talking about MS123 PosSizers, then you certainly haven't tried to click the bluish "More info..." button that is present in every one of them and which takes you to one of these pages:

Pages of the Category PosSizers

The few built-in PosSizers do not come with any documentation, though. They're simple and self-descriptive.
profile picture

innertrader

#3
QUOTE:
1. It's not a part of 6.6 but an extension:

MS123 PosSizer Library
Position Options PosSizer

I have downloaded and installed this extension. I have enabled button "Skipped trade solution" in PosSizer>Position Options> Configure but I am still dropping a lot of trades unless I add margin. Why is that?
profile picture

Eugene

#4
This is expected when using 100% sizing. Even with this option (and its brother "For last position, use all what's left") activated, usually one has to reduce the size by a couple of percent points.
profile picture

innertrader

#5
QUOTE:
This is expected when using 100% sizing. Even with this option (and its brother "For last position, use all what's left") activated, usually one has to reduce the size by a couple of percent points.

Even with enabling "Skipped trades..." and "For last position..." I had to bring my Position Size down to 40% of equity to eliminate trade skipping. Currently my program logic closes a position and opens another one with the same signal E.g.:

CODE:
Please log in to see this code.


I experimented by delaying opening a new position by an extra day:

CODE:
Please log in to see this code.


Then I can get the Position Size to 90% of equity with no missed trades and without margin (Margin = 1:1).

Waiting an extra day to open a position is not what I want to do, but it appears that the proceeds of a sale are not available immediately upon execution of a trade signal, at least the way I have implemented it. Is there a way I should re-write the code so that cash proceeds will be immediately available?

It seems like we could benefit from a "Buy as many shares of X as you can with the cash (and margin) you have available" option. That's what I would do if trading manually. Wouldn't that eliminate trade skipping? Is there any way to simulate that with current functionality?

profile picture

Eugene

#6
QUOTE:
but it appears that the proceeds of a sale are not available immediately upon execution of a trade signal, at least the way I have implemented it.

There's hardly something to be done here because to adjust the size, the PosSizer uses the equity/cash levels + margin that are reported by Wealth-Lab for a given bar.
QUOTE:
Is there a way I should re-write the code so that cash proceeds will be immediately available?

CoverAtClose(bar)?
profile picture

innertrader

#7
QUOTE:
This is expected when using 100% sizing. Even with this option (and its brother "For last position, use all what's left") activated, usually one has to reduce the size by a couple of percent points.


It doesn't look like I can select *both* the PosSizer option and the % Equity option at the same time, so can you please clarify your remark above?
profile picture

Eugene

#8
"For last position..." is selectable only when "Max open positions" is active, if you mean that.
profile picture

innertrader

#9
QUOTE:
"For last position..." is selectable only when "Max open positions" is active, if you mean that.

No, I meant that for the Portfolio Simulation Mode sizing selections I can select Percent of Equity or PosSizer radio buttons but not both. They are mutually exclusive. I just now realized that the PosSizer has Pct of Equity embedded as an available option and that's how I get all!