Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
No Algo will be Consistently Profitable

I have been working recently on producing algos in Quantopian's desired format, based purely on fundamental factors. Partly to amuse myself, partly to stick them into the competition, just for fun.

It has been interesting to note that some factors which rode splendidly through the 2008 crash and produced wonderful equity curves for much of the period since have produced flat or worse performance in the past couple of years.

10 responses

Keep in mind there is no market mechanism that ties fundamentals to price action. It is all mediated by trader/investor psychology (and quant models), so these relationships can easily change.

While recency bias is important to consider, the opposite is also dangerous. Just because a factor performed well during the great recession doesn't mean it will perform well during the next downturn. Indeed no two crashes have ever occurred for the same underlying reason (and I don't think that's coincidence). In addition, alpha signals fade and may not come back. Markets are constantly changing and becoming more efficient as quants become more and more sophisticated. In addition, the world is always changing and we are constantly entering into new, unprecedented eras. When before have we had a comparable low interest QE environment? Never, right? So what historical time period can we use to model the relationship between fundamental factors and price during whatever happens next? It doesn't exist. We are entering uncharted territory, always.

if you have an algo based purely on a fundamental factor or factors which have historically and over long periods proved predictive

What do you mean historically predictive? If you mean you create the strategy today and the backtest reveals that in ancient history it would have predictive, then you have fit your strategy to the data (overfit bias). If conversely you mean you started this journey pre-2007, likely you had lots of ideas and the ones that "proved" themselves suffer from survivorship bias.

Food for thought.

You would expect there to be some constants over time if you use fundamental data as a prediction mechanism for future stock prices,

If it were constant and predictive, why wouldn't the market price it in?

Earnings growth

Isn't earnings growth the classic counter-example in fundamental trading? (I think I remember that from a Peter Lynch video.) Turns out companies with high earnings growth already tend to have high valuations. By the time you buy the shares, you already missed the ride up.

Personally I find it difficult to imagine that such common sense valuation based metrics could ever cause survivor bias

Fundamentals update four times a year, so for fundamental factors that don't include valuation, it's not a lot of data points. I forget the exact lag, but I believe Morningstar updates Quantopian's fundamental data 1-3 trading days after the data is released. So our bets are simply on whether the fundamentals have been mispriced by the rest of the market, with the hope that that mispricing disappears, rinse and repeat.

In an efficient market, more "value" stocks should turn out to be "value traps" while more "overvalued" stocks are able to sustain their growth -- to the point that there is no edge in trading off the fundamental data.

So unless future investors come to value losses instead of profits, cash flow shortages instead of cash ....

Fundamentals give us a a clue as to future earnings and how well the business will prosper. (Though there are plenty of exceptions.) But I don't see a mechanism wherein just because a company has strong fundamentals today that their share price should go up tomorrow. That should be priced in.

I agree about diversification. I'd extend that principle to investment/trading strategy. Don't you think having a number of profitable strategies is worthwhile in case the "value stock" market inefficiencies get arbitraged away.

I also agree about your generalizations about value investing -- I think it gives a long investor the best exposure to real economic growth. However, in practice, within the confines of an investment portfolio where you'll realistically want to stay at 100% fully-invested at all times to avoid ill-fated attempts at market timing, you won't have that extra cash like Warren Buffett to throw at companies when they're suddenly all at a discount. In a long-short hedged portfolio it becomes even more difficult. How long can you afford to short Netflix, Amazon, and Tesla before you've caused so much drawdown you can never hope to recover? Even if all three ultimately end up going to $0, if they double or triple first it's unlikely you'll be able to recoup your losses. Ultimately the generalization isn't what matters -- it's the application.

Interesting perspective, though I'd caution against hyperopia just as much as myopia.

For example, you mentioned that:

Long term companies will only succeed (and their share price rise) if the economy in which they operate prospers. Within that field, the individual company will only succeed and grow in the long term if its earnings per share grow, if it has sufficient cash to pay its obligations, and if its debt is manageable. I do not believe that statement should be too controversial.

While this traditional and fundamentals-based claim is absolutely correct, this does not necessarily translate into a profitable investment strategy. Regardless of whether you are a long term value investor or a high frequency math nut or anything in between, profits come from identifying and capitalizing on market inefficiency. The idea of long-term value-driven investing is appealing because it makes logical and economic sense, yet as markets become more efficient, these factors become priced in and the profitability of value investing diminishes.

I may agree with you if you had said no algorithm will be consistently profitable in the long run based on a static set of fundamental factors. While this seems similar to your claim, its implications are not. For such an algorithm to exist would imply that there exists persistent market inefficiencies over the long run which are not arbitraged away or capitalized on. While developing such an algorithm would prove highly profitable (or at least a significant contribution to financial literature such as Fama-French's factor models), that should not be the goal of investors and traders. The markets are simply far too dynamic to be captured fully in a model - for example, it's difficult to accept that market dynamics function exactly the same pre- and post- the tech boom which spurred on a new wave of electronic trading, high frequency trades, market making, etc. Instead, one should be looking for market inefficiencies dynamically and objectively.

To use an analogy from physics: Suppose you are trying to describe the motion of an object. If this object was the size of a tennis ball, you might refer to Newton's Laws of Motion. If this object was the size of a planet, you might refer to Kepler's Laws of Planetary Motion. If this object was the size of a subatomic particle, you might refer to principles of quantum mechanics. In finance, we are looking at changes in the time-dimension rather than size. Creating an algorithm that works persistently across all time would be analogous to a physics model of motion that works persistently across all space - certainly possible, but it would be extremely nuanced and not practical. For traders and investors, it makes much more sense to focus on adaptability and capitalize on market inefficiencies as they come.

Very well said Adam W.

@Zeno, this is why you're the billionaire and Steve Cohen, Ray Dalio, Vincent Viola, Ken Griffin, etc. are not... ;)

What happened to the ‘they are just marketing people making money off fees’ comments? Doing your research? :) There’s more than one game in town. Long only index investing is one. Effective and one that most people should play perhaps, but it’s far from the only one, and it too has its drawbacks and limitations.

That all said, I suppose one could argue that it’s all arbitrage in the end, with different time horizons and residual risk exposures. How I see things anyway, could be wrong. :)

@Adam W -- I mostly agree but I would replace the word "profit" with "excess returns" or "alpha" or something along those lines. Beta is also a fine way to profit in the long-run, depending on your goals and needs.

@Zeno, you deleted all your responses, but I got them in email notifications. For one, I think we need to distinguish between value and strong financials. Sure, companies with strong financials are the most likely to succeed and deliver dividends, but in cases where that's already been priced in, it may too expensive to provide a decent return. Then we must also consider that companies are not static -- they may have poor financials deliberately for extended periods of time until they reach a critical mass with their business, and then flip the switch into profitability. So I don't know if we can make a priori statements about the investability of companies based on the strength of their financials. I think that's where analysis and backtesting helps.

Also, I think you are a bit too skeptical about "alpha." I think the Q contest leaderboard provides some evidence of it -- here are strategies that are forward-testing consistent with their backtests. None of those returns are attributed to simple market beta, though no doubt many utilize other known factors such as value, momentum, mean reversion, size. Some may be utilizing other unknown sources of alpha.

It should not be too surprising that: " ... some factors which rode splendidly through the 2008 crash and produced wonderful equity curves for much of the period since have produced flat or worse performance in the past couple of years". Many trading concepts that used to work well decades ago just don't work very well any more, and that process continues and accelerates rapidly. I expect that, just as having a copy of Edwards & Magee is no longer sufficient to make one a profitable trader these days, a time will probably come in a few years (or less) when anyone without access to a neuromorphic or quantum computer will similarly be left too far behind to be profitable anymore ;-( (

@Adam W writes " The markets are simply far too dynamic to be captured fully in a model".
Yes, absolutely, although that doesn't stop us from trying. All our algos are just attempts at simplified models that we hope have some predictive value.

Although it is of course appealing to use analogies from physics (e.g. planetary motion vs sub-atomic particles) or engineering (e.g. modeling fluid flow in hydrocarbon reservoirs, etc) or any of the other "hard sciences", there is definitely a much greater problem than that of scale or of unknown system state variables & parameters when we try to model markets. In physics / geology / engineering we can usually make reasonable forecasts & predictions subject mainly to the limitations & uncertainties in the data. However markets are much, MUCH worse because they are complex adaptive systems, continually evolving over time like ill-behaved living creatures. Not only do we NOT ever have all the data, but even the laws (?) governing market behavior change continually over time. Just imagine if the laws of physics kept changing on us like that ;-))

From this perspective, it is rather amazing that some financial / trading models, concepts & algos are actually reasonably robust over time. Figuring out the characteristics of those models that are likely to be robust is a very worthwhile exercise and it seems that Mr. Buffett, Mr. Soros & Mr. Simons certainly think so.

@Tony, well said. The object of the game is not to win the contest. It is to make sure we are there a long time after. Short-term victories represent little compared to what needs to be done, and that is survive and thrive for a long time, meaning decades. But winning is not enough, our programs have to outperform the other players over the long term, and that is achieve higher CAGRs whatever the constraints might be.