Need to limit buys on days when sales occur
Author: igorbivor
Creation Date: 5/2/2010 7:05 PM
profile picture

igorbivor

#1
I would like for the capital from sales to be "encumbered" on the day of sale In other words the proceed of the sale can't be used for new purchases on the day of sale.

Bonus for a method that can leave the sale capital "encumbered" for x days after the sale. x would presumably be specified in a dialog.

I suspect this can be done with a possizer but want to avoid that if a simpler way is available.

profile picture

Eugene

#2
QUOTE:
I suspect this can be done with a possizer but want to avoid that if a simpler way is available.

Just to clear some potential confusion: the only purpose of a PosSizer is to size an already created Position.
profile picture

igorbivor

#3
I don't think there is any confusion. The possizer could size positions taken on encumerbered capital to 0.

I am just trying to determine if there is an alternative way to do this.
profile picture

Eugene

#4
Yes, you're correct. In a PosSizer, you could limit the available equity by subtracting the "encumbered" capital from the current equity value.

The simplest way is to wait for a certain period of time before entering a new position once the preceding position is closed is to use the CooledOff function in a trading Strategy.

Since you mentioned the use of "the capital from sales", a PosSizer is the right option because with the current design, interacting with the portfolio equity is not easy/reliable.
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).