A question for P123 ranking developers

Hi all.

This is a question for Marc, Yuval or Riccardo. Probably anyone of you can answer it.

When it’s about the new ranking systems you develop recently, what is the “best” rebalance period or the preferred one? If there is such a thing…

Or should we look for the best rebalance period in a “try and failure” process?

Since now my process in order to find the best rebalance period has been through optimization, or what’s the same: changing the period and observe which one performs better, and then choose this one, but I’m not sure if this is a correct process, because if we are looking for the best companies, after we buy them, why should we sell them in 2 months? Just because the sim say that?

When I started doing this sort of thing, I almost always used 4-week rebalancing periods. Shorter periods would be for strategies that are more for trading and I’m not a trader at heart. Lately, though, I’ve become more inclined to stretch to 13 weeks and I’ve been seeing cases where 1 year works fine, something I did not expect to see at first. Ultimately stories-investment cases need time to play out.

Trial and error is fine as long as you only try things based on logic, how long you expect it to take for the kinds of tories you’re looking for to play out.

I trade a lot. I enjoy it. So I use weekly rebalancing. I like to buy a stock pretty quickly after it appears in my ranking system. It usually either a) has become a bargain, b) just released a favorable earnings report, or c) shows some other favorable signs (estimate revisions, for instance). I check my rankings every night, believe it or not, so I use weekly rebalancing in my simulations. I realize this approach isn’t for everyone, and many might consider it a massive waste of time AND dangerous to boot (tons of slippage!). But I wanted to be honest, and since you asked . . .

The problem with anything other than a week is that you SHOULD test each starting point, just to make sure each starting point gives similar results.

Decades ago, there were a lot of systems that traded monthly, because monthly data was easy to get. However, as data became more available, I did some “day of the month” testing, both on calendar months and on option months. Monthly trading varied significantly when the starting points varied. To me, that indicates a method is probably not robust.

As a result, I usually START my backtesting with weekly data, with no friction. If a method can’t be profitable with always fresh data and no friction, there would be something suspicious about a system that works with stale or staggered data and friction.

1 year works fine if you select your stocks from a strong universe (see attached). I use the point-in-time holdings from ETF USMV to select 12 stocks for a 23% annualized return, and double the total return of bench USMV. Inception of USMV was Oct-20-2011, but I have only downloaded holdings since beginning of 2013 every 3 months, that is why the sim starts in Jan-2013.

Rebalancing weekly with min hold of >365 days gives similar return. So one might as well reconstitute and rebalance every 52 weeks.
https://imarketsignals.com/2019/im-min-volatility-usmv-investor/


very interesting Georg, but how do you get p123 to check a different list (universe) every 52 weeks?

You have to keep the universe up to date; easy enough, by downloading USMV holdings periodically. I do it every 3 months.

Hi Georg:

I understand that would work on a going forward basis, but if you had to test, how would you ensure a changing universe?

That is the part i am struggling with

thanks!

If you have the historical holdings you can make various lists. Then make a universe that uses eval rules for year (and maybe month) to reference a specific list. I have done this before with the #1 Zack Ranks. A bit tedious.

eval(year=2012 and month=1,inlist(“Zacks201201”),na) OR
eval(year=2012 and month=2,inlist(“Zacks201202”),na) OR
And so on…

Kurtis,

Thanks for this method.

I looked at Zacks Rank also but I downloaded the list each week and paper-traded.

As you said, it is “a bit tedious” so maybe I did not try it long enough. But anyway, my short anecdotal results did not suggest that Zacks Rank offers any significant benefit over what can be done at P123 without Zacks Rank.

Would be interested in anyone else’s experience.

Thanks.

-Jim

This was for a client. Doing the method described I was able to backtest monthly Zacks #1 ranks since 2012 until today. I ran my own ranking system across it to see if I could enhance the Zacks #1 ranks. What worked the best was just removing the Zacks #1 ranks altogether and running my ranking system on an All Fundamentals universe. I did not see any benefit what-so-ever in Zacks ranking method.

Hi Kurtis/P123, this eval does not seem to work for me… Just putting in an inlist does

Inlist alone works, but it is not point-in-time to a date prior to when the inlist is applicable.
I used portbars to specify when an inlist should be used. This requires for the sim always to start at the same date.

We made inlists of the holdings every 3 months. Then you make a universe that holds all the inlists and future inlist which are empty at this time.
You start the sim on a specific date and in the buy rules use portbars to call up the specific inlist applicable to the time period of that inlist. That gives you a PIT simulation as it will only select stocks from the currently active inlist. Going forward you need to fill the predefined inlists every three months and also run a total on the universe so it updates.

The only inconsistency is that your universe gets bigger all the time because it will hold all the stocks dropped from USMV over time. But USMV has a turnover of only 27% so that’s not a big problem. Of course you can also remove the redundant stocks from the universe as you update every 3 months.

Marc:

Thanks a lot for your answer.

Yuval:

I assume that if you prefer to set the rebalance to “one week” your systems must have a lot of technical rules, if not, I do not understand how it is possible for the stock to develop their potential based on fundamental data, since fundamentals need a “maturity time”… or at least it is how I understand that…

Maybe I am wrong?

Sounds real nice. But how does that work exactly?

I guess you and I, along with Marc, realize a stock is undervalued and we (along with everyone else who recognizes this) just sit around for a few weeks before we buy the stock. We have all the time in the world—no one wants to get in early while the stock is most undervalued.

Seems like most of the change in price (and buying) would occur early: when the stocks are most underpriced. But that is just my story.

We can sit in our arm chairs and decide how it should be, or how it was “back in the day.”. Maybe we use a rule-of thumb that someone else gave us (just don’t call it a wive’s tale). Or we can do a little investigation and see what has been happening in the real world.

Whatever you say about Yuval’s techniques, one has to agree that he looks at the historical evidence very closely (a good thing). He is sitting up looking at an Excel spreadsheet or a P123 generated equity curve—not reclining while deciding how it “should be.”

-Jim

So back to the original question … I think you should look at how you want your final trading system to work. As in, are you on a mission to design something with the highest CAGR irrespective of turnover? Or maybe you want something simple that you only have to make a few trades a month? Do you want something with high sharpe over high gain or a modest mix of both? I try to think about the product I’m trying to produce and start my ranking off with a rebalance period that reflects that. You can also do multi time period tests to create systems from different date ranges. This is a great way to find similarities and differences in what factor combinations were effective in that PIT market environment. If you’ve never done this then you’d be surprised at what worked in the early 2000’s vs what’s worked in the last 5yrs (Maybe the same but likely different). A good ranking system is certainly a lot of work in my experience and I’m always learning the tricks to the trade.

I don’t use technical rules much at all. But every time a new quarterly report comes out, the financials change, and I like to jump on those. Also, when a stock’s price goes up or down, all the value ratios will change. And then there are sentiment measures, which can change quite rapidly too.

For small caps and microcaps, it can be more profitable to invest short-term (several months) than long-term (a year or two), in my limited experience. For large caps, long-term may be the way to go.

If you use fundamental data, why wouldn’t you want to make a decision on a change ASAP? For each individual company, most of those changes may only occur quarterly, but those changes will be at different points in times for each company.

An earnings report doesn’t need “maturity time”. The market reaction can be immediate, even preemptive.

These are all just rules of thumb (including my contribution).

What you are wanting to do is trade when the following is true:

Future return of new stock not in your sim/port (while you will be holding it) - Future return of a stock already in your sim/port (were you to continue to hold it) > Trading costs (trading old stock for new stock). Simple as that.

This does assume that the future holding periods will be the same for the “old” and "new "stocks (e.g., over the next rebalance period). It gets too complex for me if I have to consider that a newly purchased stock may be held longer by my model (e.g., over multiple rebalance periods) than one I already hold. And I am not sure this is the case anyway.

If you had a very accurate ranking system (that could truly tell the difference between RankPos 1 and RankPos 2), no trading costs and perhaps an AI to monitor things it would be rational to continuously trade throughout the day—something none of us have.

Of course, we are talking about the future so we are forced to deal with Expected Returns which we can only approximate. Obviously, each port will be different. For example, micro-caps will have a higher trading cost. But a micro-cap stock may have a greater expected return after an announcement, earnings estimate revision, recent price change or whatever factors are in your model. But that is all factored into the above equation.

Fortunately, P123 has included trading costs in its simulations so a sim accounts for all of this. The beauty of P123.

Ultimately, Marc has pretty good advice. He says you can use the sim (at least to some extent) to determine the frequency of trading if there are rational reasons to do so. Yuval and Randy provide some very rational reasons to consider frequent trading for some ports.

-Jim

I was really struck by this comment. For some reason the very simple and true equation that Jim posits here had never occurred to me before.

But what occurred to me a couple of hours later was the following. A sim does NOT account for all of this. The returns of a simulation if it is even ever-so-slightly optimized will never match the out-of-sample returns of a strategy. But the trading costs will.

In other words, if you estimate that the return per trade of your simulation will be, say, double your actual return per trade, then double your estimated trading costs in your simulation. Or use some other proportionate method.

Just thinking out loud here . . . But I think it’s a suggestion worth thinking about. It might lead users like me to better take into account the high cost of frequent trading.