Books

Hi,
is it possible to weigh the stocks of a book evenly.

E.g. if two models of a book have the same stock, the book adds its weights, right?

Would it be possible to “tell the book”, weigh the parts of the book even?

Thank you
Best Regards

Andreas

HI Andreas, I’m not sure if this approach is what you’re looking for, but a couple of ideas that might work:

I don’t know if you can do it with books, but I think you could do this using screens and the “OR” conditional so that the buy condition is something like

Screen(“Screen1”,20) OR Screen(“Screen2”,20)

I think the above would allow equal weighting in a backtest of anything that’s in the top 20 of either screen.

If referencing ranking systems I think the buy condition might be something like for either to give ability to equal wt:

Rating(“RankingSys1”) > 95 OR Rating(“Rankingsys2”)>95 //buy condition for anything in top 5% of either rating system.
or
RatingPos(“RankingSys1”) <= 10 OR RatingPos(“RankingSys2”)<=10 //any company in top 10 of either position would pass

Thank you!!!

Yes, I second this request. Would be nice to see Books have this same functionality that is found in Screens.

P123, please give feedback, thank you!!!

We enabled this functionality a while back by allowing a buy rule in a portfolio that would exclude stocks in a different portfolio.

So, for example, take a look at
https://www.portfolio123.com/holdings.jsp?portid=1648186
https://www.portfolio123.com/holdings.jsp?portid=1648185

You’ll see they’re totally different even though they use the same ranking systems on large cap universes. Check out the universes and buy rules and you’ll see why.

It’s easy to combine these two strategies in a book and you’ll get 40 different stocks.

Thanks, but I believe judgetrade’s request is for an equal-weight Book - at least that’s the feature I’d like to see. Is that already do-able in a Book?

Well, if the strategies in the book all use portfolio weight and the weights of the strategies are the same in the book, then the stocks are all equally weighted, unless a stock is held by more than one strategy. In that case, you need to use the Portfolio rule to exclude those stocks.

O.k. understood the priciple, could you provide the code for adding that rule on a portfolio level? Thank you!!

Best Regards
Andreas

Hi Andreas,

The buy rule below will prevent “Port 2” from buying a stock that is held in “Port 1.”

In “Port 2” you would put the following buy rule: portfolio(“Port 1”)=false. Where “Port 1” is the actual name of the port.

I think this may be what Yuval is referring to when he says this:

But to get to where you want you may have to alter at least one of your ports a little more, however.

For example, on the next rebalance what is to stop “port 1” from buying a stock that “port 2” is already holding (and potentially doubling-up on one of the stocks in the book)?

Perhaps the easiest way to remedy this would be to also put the following sell rule in “port 2”: portfolio(“Port 1”)=True. “Port 2” would then sell the stock (letting port 1 buy and hold it instead) and port 2 will buy another one. There would be other ways to do this if that is not ideal for your ports.

Done this way you would always rebalance “port 1” first.

Jim

Very cool, Thank you Jim!!!