Explain Max Deviation from Initial Position Size

What exactly does the position size deviation constraint do? If we are buying a position size of .05 for example this would entail 20 positions.

Does this constraint restrict a buy if the portfolio is filled up and there is only room for say a buy of position size .01 and my requirement is .05 (20 positions)

Does it also restrict in the case of maybe a very high priced stock say $200/share and for you currently .05 position size is $180 to spend so you cannot buy it if for example your constraint is set at 10% deviation?

hoosierboy

You’re assumptions are correct. When a stock is sold for a big loss, the cash raised might be so small that it’s not worth buying another. Qith this solution the cash would just sit in the portfolio.

This is far from ideal and I’m exploring alternatives. How it’s handled should also depend on the type of account:

  • In a margin account, you might want to buy a normal size position, and assume a little debt.
  • In a flat fee trading account like FolioFN, you might want to buy it anyway.

Another option would be to not sell something if not enough cash is raised to buy a new position.

Let me know what you’d like to see.

Thanks.

a follow up question to this:

  1. If i always wanted to make my initial position a certain percentage of portfolio, and then it let if float to within the constraint rules how do i do that?
  2. Right now I have a 20 Position portfolio with a ±30% constraint. but i do see that there are some positions that are less than 3.5% and some that are significantly greater than 6.5%. How is that possible. I have allow immediate buy back enabled.

Looks like i may not be understanding this feature correctly

The constraint is only applied at the time of purchase. If you buy a bunch of stocks and hold them, then the percentage of each holding is going to drift, with the winning stocks becoming a larger percentage over time than the losing stocks.

The only way around this is to sell a position. If you do, the replacement (whether the same or a different stock) will be initiated at the target percentage plus or minus the constraint.

The best way to think about this is that the algorithm wants to be fully invested at all times. The constraint is figuring out how far away from the target that it can go when buying a stock to achieve that goal. The tighter the constraint, the more likely that you’ll keep some cash rather than investing every penny.

You can also use a sell rule to sell part of a position if it’s overweight. For example, Eval(Weight > 6, 0.2, 0) will sell 20% of your holdings of any stock whose weight is greater than 6%. If you want the weight not to exceed 6%, you could use the following sell rule: Eval(Weight > 6, 1 - 6/Weight, 0).

We’re talking about ideal position size. Right?

The title says initial.