OK, one more time. Why change definition of Bars?

So a Bar typically represents a trading day.

From the Multi-country change document;

Clearly, these functions are not pre-computed, so why can’t the holiday trading day schedule be dynamically loaded based on the currently selected active region? Selecting US, would skip US holidays. Selecting Canada, would skip Canadian holidays. Selecting North America should use the holiday schedule of the exchange that holds the primary ticker.

Maybe I’m not getting how P123 envisions subscriber will be using multi-region support.

Walter

I’ll try to explain our thinking:

Some countries have more holidays than others, and on different dates. For example, let’s say you were running a system that used Close(0)/Close(10) somewhere. Close(10) would point to different days around Labor Day whether you were running it in the US or in Europe. Same thing goes for May 1. Worse yet, what if some exchanges were open only 240 days a year rather than 250? The functions that use bars would be incompatible. This goes especially for the European universe, whose various exchanges are closed on different holidays.

I hope this clarifies our thinking behind this change.

Lets use SMA(60). Agreed, the start/end dates of SMA(60) could be different b/c of holidays. But they wouldn’t be incompatible - they would be consistent and comparable. SMA(60) should always use 60 trading days. Filling in non-trade days with prior day data will change the SMA value. This change would make P123 different from every other financial site that I know of.

I’ll think about it some more, but it seems to me that this optimization will lead to years of debate and confusion for new users. I’m not even sure that it’s much of an optimization. But then again, I’m not driving the bus.

What do other users think?

Let’s say you have a seven country universe, each with it’s own trading schedule. What calendar date will “close(30)” fall on? In the worst case scenario it could vary a lot between the seven markets. Problems like these make me think that fixing everything to a 5-day week is the optimal (but not great) solution.

It’ll be interesting to see if anyone can find an real-life example where using weekdays is a significant problem.

This seems to be a strange discussion. SMA(60), or Close (60) requires 60 bars of data. For there to be a “close” there needs to be an open, a high, a low, etc. which means that the market was open and trading took place. Labor Day is a holiday, so there was no trading and so there is no open, high, low, or close. SMA (60) should be 60 trading days of data, and close (60) should be the close 60 trading days ago. As Walter already said above, this is how EVERY trading SW works.

IMO, to try and align market data across different markets with different holidays would create even more problems.

I believe that the industry standard is to simply use bars and skip holidays, even if they don’t align. They are okay with close(60) for stock A being a different day than close(60) for stock B.

Indeed, the definition of a “bar” is a trading day with OHLCV.

I am now wildly curious as to why P123 felt the need to align bars (dates) across countries. A bar is a bar…

A bar is used primarily for technical analysis, though I suppose you may want to know what the dividend yield (or whatever) was x bars back, but that would be a highly unusual use of data.

A few more arguments:

The planned bar definition seems to be at least a little less complicated for P123.

The correct comparision of price and indicator values between different websites gets more complicated for P123 users, adding inaccuracies to the existing ones (different prices, different indicator calculations). But are these (aditional) differences big and really important? I think, most of us have occasionally acknowledged the differences that existed and that was it.

The comparision of price and indicator value changes of one asset between different exchanges is much better with the planned version, if there is a different number of holidays in between and the 2 compared days are not holidays (which is the more likely option), because with the planned version all calculations are made between the same days . If one of the compared days is a holiday at one exchange, it depends.

An extreme, but not unrealistic example: Let’s take a micro cap, a russian stock or another aset which was not traded / tradable in the last 3 months, for what reason ever. The comparision between prices 84 bars ago / a MA of 100 ignoring this period would point 3 months further back, compared to the planned version (and to the calculated values of other assets using the same numbers). Which is the more realistic and comparable method (inside P123, for screening and backtesting)?

Matthias

This year, the Borse Frankfurt has 258 trading days while the Tokyo stock exchange has 244. (The US has 251.) If you used holiday-excluding bars in a universe that had all three of these exchanges, you’d get some extremely strange comparisons. How would you calculate alpha, beta, or a Sharpe ratio if for some stocks 750 bars was less than 3 years and for others it was a lot more than 3 years? How could you use Close(0)/Close(10) - BenchClose(0)/BenchClose(10) if Close(10) referred to different days for different stocks? What would BenchClose(10) even mean? If you’re using a multi-country universe, you’d need to use a different benchmark for each country! And that would obviate the whole point of comparing stocks from different countries on the same basis. I know from experience that if your benchmark is off by two days from your return, the numbers for performance measures go crazy: a beta of 0.88 can become a beta of 0.21.

When comparing stocks on different exchanges, I don’t think there’s any other option but to use weekdays rather than bars.

Aren’t there other differences between countries as well? Aren’t the available fundamentals different for different countries? Aren’t the accounting laws different? The exchange listing requirements? The reporting standards? Aren’t we always comparing apples to oranges anyway? Why make a stand on the holidays?

Why make a stand on the holidays?

Because for some of us, bars are a critical aspect of our model’s ability to perform well. My firm specializes in data-driven strategies using Exchange Traded Funds (ETFs), and because ETFs are not affected by individual-company fundamentals, technical aspects are the most crucial factors in determining exposure, selecting positions, and producing returns.

In my account, I have 926 Custom Formulas and 996 Custom Series – almost all based on bars. I’ve spent years building sophisticated Custom Formula/Series that include systems such as a Zero-Lag Momentum Oscillator™, six-factor Breadth Composite, an eight-factor Momentum Composite, and a 10-factor Trend Composite. In total, I’ve built more than 50 indicators (each with dozens of variations) offering significant returns based on bars; macroeconomics, fundamentals, breadth, momentum, sentiment, and many other factors.

These uncorrelated, bar-based ETF strategies are offered independently – and also combined into a six-model combination that produces steady, consistent returns:

My point is that BARS are crucial to my investment-advisory business. After putting in years as an analyst with Merrill Lynch, Drexel, and Goldman, I launched my business on the internet in 1998 using the scant stock research and screening resources available then. I joined P123 shortly after Marco introduced it, and I have never experienced a money-losing year from any of the models built on P123 and run live.

However, I’m concerned that the recent change to bars to accommodate other nations’ bourses is going to undermine all the cognitive sweat I’ve put into P123 since joining in 2004 – 18 years of work.

I’ve set aside three days this week to examine the effect of these recent changes. If the impact is negligible, then great! If it’s substantial, then… well, I don’t know what. Hopefully, I won’t have to cross that bridge.

For those interested, I’ll post an update after the analysis is finished.

Either you misread me, or I was unclear! I’m on your side- prefer not to count holidays as bars-

Well, that’s why we pay data vendors a ton of money, for the standardization.

Ok, I think this is sinking in for me.

Since counties will have different market closing holidays, some accommodation needs to be made to maintain portfolio value during those times. At the close of a trading day, if some markets are closed, the prior day ticker close prices in those markets must be used to maintain the proper portfolio equity curve. That could be done dynamically, on-the-fly, with data lookup, but that would be relatively slow. To make sims run faster, P123 has decided to pre-compute all ticker price series w/ back-filled holiday data. Because of that, functions that use bars, like SMA, will be affected since they can’t detect and back-out the holiday data. Is that right?

I’ll post later about how I think this will wack benchmark derived factors like beta.

Walter,

I don’t honestly know of a way that a formula using trading days only and a single benchmark could possibly work in a multi-exchange universe. You suggest that this “could be done dynamically, on the fly, with data lookup.” But how? If a benchmark has 251 days but the Tokyo exchange only has 240 and the Frankfurt exchange has 258, how could alpha, beta, a Sharpe ratio, or an information ratio possibly be calculated without including ALL days?

The key to performance measures, as Marc Gerstein often pointed out, is benchmark comparison. Without that, you’re nowhere. Multi-country universes therefore can’t use trading days.

And that’s leaving aside the simple fact that ranking a Japanese company against a German company on the basis of a formula like SMA(50)/SMA(200) is going to give you some rather odd results if you use trading days only.

Well, for one thing, if a stock isn’t a constituent of a benchmarking index, then that index can’t be used to calculate beta. Right? What benchmark would work for a multi-country portfolio?

ACWI would work very well for international large caps. GWX is a good ETF for international small caps. We’ll probably introduce some other benchmarks when we bring European stocks in.

Another project we’re seriously considering is allowing users to create their own benchmarks based on the universe they’re using.