New P123 sample aggregate series

Dan, Riccardo, and I felt that the few samples we had for aggregate series didn’t fully show off the tool’s capabilities. So we’ve added eleven new ones. You can see them here: https://www.portfolio123.com/app/opener/SERIES?cat=-1 . . . If you sort by date created, you can see which are the new ones and which are the old ones.

We’re hoping this will inspire some of you to play around with the aggregate series tool more. You can learn all sorts of fascinating things using it; in addition, the series that you generate can then be used in your screens and simulations using the GetSeries command. You can also use them in the macro charts, multi charts, and, using GetSeries, in fundamental charts.

Very nice, thank you.

Yuval, while you are at it you should fix “Benchmark - AIRLINES”.

Good catch! We’ll do so.

Yuval - Nice work.

A multitude of Custom Series, combined into composites that produce robust signals, is the basis for all of the more advanced systems I use.

I’m just starting to examine each of the new series, and I clicked on an old one I had never noticed. I’m wondering about the series titled “Benchmark - SP500.”

If you choose to view the S&P 500 Benchmark (from the list of benchmarks) behind the series chart, it’s easy to see there is a significant variation between the actual benchmark, i.e., the standard S&P 500 benchmark from the list, and I’m wondering specifically why the difference?

Also, what is the source for each of these data sets - i.e., the Custom Series, and the S&P 500 that’s listed in the benchmark set? Thanks!

The S&P 500 benchmark that we use is simply the ETF SPY. There could be any number of reasons why there might be a slight difference between the ETF price series and the aggregate series produced by a cap-weighted average of all price moves, calculated cumulatively. One is rounding; another is that ETFs track price moves very slightly imperfectly; a third would be slightly different reconstitution dates. You can get a slightly closer approximation by using UnivSum(“1”,“Close(0)*SharesQ”)/UnivSum(“1”,“Close(1)*SharesQ”), which would have less of a rounding error; I’m not sure why UnivCapAvg(“Close(0)>1”,“Close(0)/Close(1)”) was preferred back in 2014.

Yuval, it would appear that this rule will create an equal weight benchmark?

Indeed you can. I created custom aggregate series Non-Cyclical & Cyclicals of the S&P1500 and used it together with 3 other series as a market timer described here:
Consumer Staples/Discretionary Spending As A Reliable And Profitable Stock Market Timer | Seeking Alpha.

1 Like

Thank you, Yuval, that’s helpful. (Edit: But I think Georg is right. It produces an equal weight series.)

Without going through them all, under the Benchmarks list, should we assume everything is an ETF - unless it’s specifically listed under ‘Index’ (without dividends) on the right side of the table? Moreover, it’s unfortunate that we can’t learn what specific ETF is being used until we actually run a Series or a Simulation. It would be helpful if the ETF ticker was put in parenthesis after the designation in the Benchmark table.

No, that’s cap-weighted because it multiplies price by number of shares. So you’re adding up the market caps.

Let’s say there were two stocks in the universe, one with a market cap of $800 and the other with a market cap of $200, and the first went up to $900 and the second went down to $100. Equal weight would mean that the total return would be the average of 12.5% and -50%. Cap weighted means that the total return would be 0.812.5% + 0.2-50% = 0. And UnivSum accomplishes this.

It turns out I was incorrect in my explanation. It now occurs to me that UnivCapAvg(“Close(0)>1”,“Close(0)/Close(1)”) weights the stocks AFTER the daily price move, while what actually happens in real life is that the stocks are weighted BEFORE the daily price move.

Let’s use my previous example again. Let’s say there were two stocks in the universe, one with a market cap of $800 and the other with a market cap of $200, and the first went up to $900 and the second went down to $100. The index would not change. But if you take UnivCapAvg(“1”, “Close(0)/Close(1)”), you would be weighting them at their CURRENT weights, not their weights yesterday. So you would be looking at the sum of 0.912.5% + 0.1-50% = 6.25%, while what has really happened is 0.812.5% + 0.2-50% = 0%. This is why the series is NOT a good approximation of the S&P 500.

Is there a tutorial or help section on using the Aggregate series functions? I could have sworn I saw one somewhere but cannot remember.

Update: Found it here under Step By Step Tutorials.
The link is called “Custom Series” instead of “Aggregate Series”

https://help.portfolio123.com/hc/en-us/articles/360016004732