OPEN BETA: 'Formula Weight' Position Sizing Method

Thanks Yuval, I knew there were people out there cleverer than me but, for the moment, I think I’ll stick to using my position sizing software !!! :slight_smile:

Thanks Yuval, I do use variations of the weight formula in my sell rules.

Can I ask those who are having issues with Tolerance and Min/Max to send me emails (marc@portfolio123.com) giving me enough detail to recreate the issue’s you’re seeing. If you want to post copies into the forum, that’s fine. But it will help me zero in on the concerns if I can dive into them without dealing with a threaded discussion.

For the moment, I want to focus on Tolerance and Min/Max to make sure they are getting computed correctly and get things fixed if and where necessary. The same goes for other calculation-related items.

Before getting into formula -related issues, I want to nail down the basic computation to make sure we’re all comfortable with the accuracy of those.

I’ll also look into the universe having to be re-set each time issue.

I notice that when I use the previous “% of Portfolio Value” feature in beta testing, I can change the reconstitution period (daily to 1 year) but after running the sim it always shows up as a 4 week rebalancing period in the summary.

Is this as intended? Is the rebalancing running every 4 weeks and even when I am re-constituting annually? I thought they were supposed to be the same when running equal-weight portfolio sizing. Perhaps just a minor bug?

port#1499685

It’s a display issue. There’s a bit of confusion in the interface where ‘Rebalance’ sometimes refers to “Reconstitution & Rebalance” and sometimes refers to “Rebalance”. It should be take the first meaning in this case, but show the Reconstitution Period value. The incorrectly reported value has no effect on the outcome. If anyone has a suggestion on how we might address this ambiguity better, please post it here.

So if I am using the “% of Portfolio Value” feature, then reconstitution and rebalance are always equal…is that correct?
I would think that you could simply change the ‘rebalance’ wording in this instance to ‘rebalance and reconstitution’. Then display the reconstitution period that the user defined.

aschiff,
There is a bug with my simulation, it doesn’t seem to populate with stock correctly on the beta server despite having the exact same setup:

25 stocks
30%
quarterly rebalancing
allow to repurchase

LIVE:
Look good.
https://www.portfolio123.com/port_summary.jsp?portid=1499693

BETA:
Press RE-RUN simulation and it becomes screwed up.

https://beta1.portfolio123.com/port_summary.jsp?portid=1499693

I tried to find ways to fix it but I don’t understand what is going on… Thanks!

I love this feature, and hope you get all the bugs out soon.

In that spirit, here’s one bug: Historical holdings shows different sizes than current holdings.

EDIT: I am now unable to reproduce this bug.

This is not a bug. Rather this is the way the program works. One needs to make sure the weight will not go to zero: the way I did it above being just one example of how to do it. Or you can use weight = 0 as a sell (or no buy) signal.

There are a few bugs but also a lot of different ways this can be used with a resulting learning curve.

Of course, that means I am still learning/exploring. I suspect the “scaling” features will turn out to be among the most´useful features. But also the ones that need to be turned off when unexpected things happen in the program—at least until I find the bug in my thinking.

Thank you Marc for helping with this in the email.

Edit: This reminds me of linear algebra. Heck, not even limited to linear equations—use a quadratic if I want. I have a hypothesis that I can adjust the weights according to any linear function I want. Hmm…… Maybe they should have included the Matrix option. Not! Still learning and may end up hating it but looks pretty cool right now.

-Jim

Currently the max length for Rebalance Period is 1 year. I would like to see an additional option of “NEVER” under Rebalance Period. This should be easy to do.
Thanks.

Thus far, I’ve had several people contact me with details about problems they are experiencing and a common thread seems to be complexity in formulas. It’s fine to do that when you develop your strategies. But for de-bugging purposes, I would very strongly encourage people to put this through its paces using a simple weighting criteria like MktCap.

Right now, we need to establish the accuracy of the algorithm itself. Does the logic correctly apply the advanced setting using the numbers supplied to it as a result of the weighting formulas? If not, then we need to get that fixed right away. If so, then we can move on to the next task, the one that we’ll probably be discussing for as long as we’ve discussed buy rules, sell rules and rank factors: the logic and operation of the weighting formulas. The latter is a much more interesting, and fun, topic. But before we dive into it, let’s first make sure the algorithm is accurate. We’ve done out checking and we believe it is accurate, but the beta launch is an important opportunity to see if we missed something.

I’m eager to move on to the formulas, but first, can everybody who reported a “bug” let me know if what they are seeing is something that is genuinely wrong with the program execution (I strongly recommend experimenting with single established factors like MktCap, SalesTTM, Beta1Y, yield, etc.

When we’re satisfied that the platform is crunching the numbers the way it’s supposed to, then we can shift our focus to the good stuff. Toward that end, I’m gong to seed a separate thread entitled Weighting Formulas.

I would love to help but I can’t even reproduce the basic weighting system of my current simulation on the beta server as per my previous thread. Something is wrong and I can’t identify the cause.

I’m working on addressing an issue affecting cross-sectional formulas. Might this cause what you’re seeing?

Marc,
What simple weighting formula for ETFs would you suggest.

Also there is a bug in the number of position setting.
I ran a short model with 2 position setting, but only specify one ETF it can go to. Therefore it should allocate 50% to cash, but it allocates 100% to the ETF.

Georg: This is intentional. The sizing algorithm does its best to stay fully invested/at target leverage. The only way to prevent this right now is to specify a Maximum Position Weight (which also will affect how the weighting works when you have both holdings). We didn’t think it necessarily made sense to leave a proportionate amount of cash in the scenario there are too few qualifying stocks. Suggestions for improvement are welcome.

Aaron -

The problem with staying fully invested is the following. Let’s say you have a 16-stock portfolio and you don’t want to rebalance your existing positions so you set minimum transaction to 200%. One of your stocks has grown to a 10% weight. You sell it. No matter what your sizing algorithm is, you then replace it with a stock at 10% weight. The next week you sell two stocks that have done very badly. You replace them with two stocks at about 3% weight each. In other words, the position size goes all over the map.

I have a suggestion. Make the number of stocks in the portfolio subordinate to the position size rather than the other way around. Give the portfolio the flexibility to go down to 14 stocks or up to 18. But make sure the position size closely matches the ideal position weight. Right now it doesn’t at all.

By the way, this is not a problem if you can live with rebalancing the portfolio every week. But I, for one, can’t. The transaction costs of doing so are way too high.

  • Yuval

Seems like you fixed the issue because now it is working as intended. I am finally able to test the rebalancing system correctly.

Thanks!

Yuval always has great ideas. Ultimately Aaron will have to write an algorithm.

I think Yuval is usually willing to sell the lowest rank stock to free up money. Easiest way for this is sell rule 1. But that buy/sell difference used to be a problem. This can now be addressed by setting a high rebalance minimum. The only question becomes will the new positions “fit” into the amount of freed up money.

If not where will the money come from? Willing to rebalance a little? Sell the next lowest ranking position? Buy less than the desired amount?

I suspect Aaron will automate whatever solution we want–assuming we cannot already do it. The closer we get to programming terms the better.

Me, I think Marc should cover the margin requirements at IB. But seriously we will just have to decide where the money is to come from–including possibly from margin. I suspect Aaron can construct an algorithm that we are clear about.

-Jim

So, Yuval, you are willing to buy a little less of a stock but not more because of liquidity? You do not mind holding a little cash for a while?

Do you want to"split" the tolerance settings so position weights can be moved down but not up?

May not help.

-Jim

Jim, what I’d like a simulation to do is to accurately reflect what I do in real life. If a stock is liquid, I’ll spend 1/16th of my money on it. If it’s not, I’ll spend less, according to how liquid it is. I’d also like to vary my buys a little bit according to rankpos, but not much, and that can come later. I don’t really want to hold a lot of cash, but a little is OK in order for my buys to be more or less evenly weighted. - Yuval