Memento Fortuna

Asset prices: where random can appear real

NTTP
10 min readOct 17, 2023
Photo by Edge2Edge Media on Unsplash

The concept of modeling stock prices as if they move randomly “within bounds,” or, more precisely, within or according to some previously observed statistical distribution, has been around for quite a while: https://en.wikipedia.org/wiki/Random_walk_hypothesis. The references in the Wiki article (Wikipedia: such a fine source of information!) date to the mid 1960’s, but the first inklings of this idea were earlier:

https://en.wikipedia.org/wiki/Louis_Bachelier

Entertaining (to the present author, though probably not to old Louie) was a note on Bachelier’s thesis (described in the link): “a number of arguments [were] far from being rigorous.”

Stage direction to AUTHOR: [Ahem, cough, throat-clear, adjust necktie, smooth back Vitalis’d coiffure.]

While there is a certain mockery of Wikipedia among pedagogues (“You can’t just use Wikipedia for references.” “But Professah, why not?” “Because you just can’t, that’s why.”), we suggest that there is likely more correct information on Wikipedia regarding market forecasting than is available in many books claiming to help the retail investor make money in the market. At least, the Wiki articles tend to discuss competing views and alternative hypotheses, providing seeds for more reading. And since this is a popular article and not an academic treatise, we shall allow the Wiki reference, since our editor is in Munich at Oktoberfest and has no recourse to complain except via overloaded Deutsche Telekom cell towers. We asked Karl to bring us back some mugs with, you know, the blue and white checkers on them, but he’s probably going to forget. Also: Big suitcase full of glass, issues with the custom-house, et cetera: Might need too much ‘splainin.

And yet… people still try to “read” and interpret stock price charts manually. Hence, this article.

Our “apps” — or, as they used to be called, “programs” — in the MCarloRisk3D series [Note 1] help retail investors do aggregated random walk analysis with a few clicks of the mouse or taps of the touch screen. Recall from our earlier article and the training slides for our apps that what we use to forecast future prices at various probabilities, at various times in the future, is an aggregation of these random walks. What we will demonstrate in this article are some hazards of agreeing with one of the contrary positions: That you can “read” time series charts using human vision, knowledge, and intuition to forecast what will happen in the next few days, weeks, or months with respect to a stock or crypto currency price. We will show that it is exceedingly easy for there to be randomly generated stock price charts that seem, beyond all doubt, that they have patterns and “information” in them that you can use to forecast what will happen to that stock price in the future. The demonstrations that we can do with the app in this area are similar to those done by Prof. Malkiel decades ago as described in the above Wiki, or even proposed over a century ago by Monsieur Bachelier; but now you can do this demonstration on your phone, which they were not able to do at the time.

Photo by Mike Meyers on Unsplash

Let’s start by looking at a recent price series time chart from one of Mr. Elon’s companies: Tesla Motors, symbol TSLA.

The blue curve is TSLA price actual over 100 days, ending about mid October 2023

Don’t confuse this trading symbol with the symbol STLA (Stellantis, a conglomerate including a variety of European automakers like Peugeot and Fiat, in addition to the remnants of the perennial Detroit underdog Chrysler Motors, formerly the Imperial and later always under seige Chrysler Corporation), which is an anagram of TSLA. Coincidence? We think not!

We are imagining the green eyeshade guys in the back room when Stellantis was formed from a merger (or takeover?) of several companies, trying to figure out what their new trading symbol should be. “Really? That one’s available? No way! Way.” Or how ever you say “Way” in Italian or French. Bravo! Bon! No doubt much high-fiving and after-hours bar-room corporate battlefield yarn spinnning occurred after this symbolic coup, along with slaps on the back for the lowly interns or trainees who were sent off to research available symbols.

But back to our story:

In this article, we will make no attempt to discern the meaning of this TSLA chart using any price chart reading techniques that are sometimes promulgated.

Overlaying with random paths

Now let’s add an overlay of some of the random price walks that we can generate in this type of model builder, “over top” of this backtest.

TSLA actual price with a lot of monte carlo generated artificial price paths

In the app and in the snapshot, we only show a small fraction of the walks, because to show them all would just bog down the software and not give any additional meaning, since we usually don’t care about looking at those walks individually; we do so here in this article for example’s sake. We see that this group of price walks gets more sparse as we look at the top forecasted range of the future possible prices, and also at the bottom of the range. There are a few stragglers that walk “way high” in price and some “way low.” But overall, the random paths are a jumble, so we have the software set up so that we can highlight just one at a time (again, for education purposes, not for forecasting).

By dragging the “highlight 1 MC trace” slider, we can showcase one of these random walk traces. Let’s highlight a particularly interesting one that we see:

Highlighting one of the random price paths in black

Patterns?

To the unaided eye, this bold black-colored trace has patterns in it. Look at that “run up” starting at about July 26 2023 (about where the vertical cursor beam is located on the lower graph), slightly disrupted but then regaining steam, all up to the end of the backtest. “It’s pure momentum, man. You’d have to be blind not to see it!” To the unknowing, this could be a real stock price chart. It looks real, doesnt it? Ask someone to pick out the random trace versus the actual historical trace and tell which was a real stock chart and which was fake; they wouldn’t be able to, unless they guessed. We did see an article a while back where randomly generated traces were placed next to real stock traces, and professionals were able to disceren, sometimes, the random from the real. This is something worth looking into, and there may be a conceptual connection here with Jiang, Kelly, and Xiu’s work of automated forecasting with machine recognized patterns. Now that ChatGPT and other large language models (“generative A.I.”) are available, there is a similar quest to discern people-written text from A.I. written text, with also mixed results.

Just a model

But our model of stock prices as random walks is just that: A simplified model, and this simple model may not contain all complexities of reality. We are thinking of issues regarding “memory” in stock prices and related. Our app does have some features in those more advanced areas, but for this article, we are looking at pure random paths. However, even with that pure randomness, there are patterns that emerge that you can easily see.

Setting aside next-level refinement of models for now, the black artificial simulated price trace has both some extreme movements up and down and also some periods of “consistent momentum” (more or less consistent price movement over time, bullish or bearish, aside from daily or weekly up and down noise). It has some jittery behavior during the “periods of strong momentum,” as per most stock traces. It has a “large drawdown” near the beginning… caused by Random Elon making a controversial statement on Random Twitter about Random SEC rules? No. This apparent “draw-down” in random price walk space is not generated by anything but chance: The standard linux-type system random generator function drand48( ) linked to the prior historical returns distribution of TSLA, to be more precise about what we mean by chance.

We can slide the MC selection slider around a bit and make a GIF (Figure A, below) of some of the randomly generated traces highlighted one at a time.

Figure A: Highlighting several of the random walk paths individually

Only the blue trace represents the real stock price, but many or even all of the black simulated curves look like they could be real stock charts for real companies. Sure, some of them just kind of wander around without any consistant direction, up and down every few weeks. Welcome to the real world. That’s what happens with the stock price of some (non-Elon invented?) companies in a flat market.

The point with these types of models is not so much that the world is completely random and that “anything can happen.” There may indeed be many causal, non-random factors that drive stock prices up and down. No, the point here is that the behavior of stock prices can be modeled by random processes, with pretty good fidelity to reality in aggregate. This fidelity can be checked by our exhaustive backtests as noted in our earlier article. Remember, we do not look for fidelity on a given day from these types of models; rather, we look for fidelity over a longer period of time; and fidelity to prices at various probabilities, not fidelity to a specific price on a specific day.

Again, we stress: “Random” here does not mean that “anything can happen.”

Random does not mean: “there will not be any patterns in the randomly generated data.” On the contrary, we see in the above screen shots that there are not just patterns, but strong patterns in some of the randomly generated price charts. The problem, to any itinerant chart analyst, is that those patterns do not have any predictive power. Those patterns could disappear at any moment, since they resulted from luck. True, we do like to point out that Professor Xiu and his team showed that there may be some machine learnable patterns in price history data that allows an ML image recognition system to predict (but not with 100% accuracy) what will happen near-term in some portions of the market, and he does do comparisons of his machine-found patterns to traditional human recognized chart patterns. But as we all know, with these types of systems, an analyst is fortunate if he gets a small boost in real predictive strength (statistically significantly better than 50/50 chance) from applying any automated techniques, and all metrics of predictive strength need to take into account trading costs and also be “risk adjusted” — the analyst needs to look at Sharpe or Sortino ratio or any of the many methods to adjust cumulative returns for the variance or volatility that help achieve those returns:

https://www.investopedia.com/terms/r/riskadjustedreturn.asp

So when you think that you see patterns in any data (not just market data) which you suspect may be predictive, run our app and move that slider around a bit to remind yourself that: Yes, there may be patterns in data. But the thing to ask is: Do the patterns have any predictive power? This is the question you need ask and find an answer to, or else your success or lack thereof using these patterns for forecasting will be the result of luck, not skill. Good for you if you are lucky! But if you mis-attribute your luck to skill, you may be in for a rude awakening some day.

Another reminder is that our app deals with daily data: Daily closing prices then converted to daily returns, then later converted back to price forecasts. Are intraday patterns (especially around market open or close) more useful for forecasting than patterns of daily data? Our app doesn’t have an answer to that, since it does not look into intraday data (yet). If any day traders might be interested in this type of feature, please contact us through the app store feedback mechanisms.

However, regarding intraday data, we leave you with some food for thought: There is the concept that market data is “fractal: https://www.investopedia.com/terms/f/fractal-markets-hypothesis-fmh.asp. That is, when you zoom-in on finer grained data at smaller time steps, it looks much the same as daily data. An analyst can use the same techniques for analyzing minutely or secondly data that he uses for analyzing daily data, including exhaustive backtesting of the sort that we support in our apps.

Going to an extreme, when you zoom in far enough on market data (in the time domain, getting to sub-second and “several millisecond” time steps… even shorter maybe! Let us know the highest frequency market data you’ve worked with!), you start approaching the realm of High Frequency Trading (https://www.investopedia.com/terms/h/high-frequency-trading.asp), and that is a different environment altogether that our app does not address, because those high frequency trades are based upon particular trading mechanisms, exchange hardware and software structures, and delays (or lack thereof) of transactions. At any rate [and not to be too cliche about it, but: see what I did there], HFT is pretty far outside the realm that our apps are directed to: The retail market. HFT is an area where lots of effort is being spent for research: [one recent example: https://link.springer.com/article/10.1007/s13571-022-00280-7] and it seems like there is plenty of money to be made, so: Have at it?

Memento

The more humble Roman emperors of history and many other wise men and women even until today would use the phrase memento mori to remind themselves of their limits. Memento fortuna might be an apropos motto for the enthusiastic forecasters of the world, especially in the rough-and-tumble arena of computerized trading markets: Remember that the correctness of some of your forecasts may be due to chance. Analyze accordingly.

Updates

Oct 18 2023 Add links to apps in Note 1

Notes

[Note 1] The MCarloRisk3D apps including MCarloRisk3DLite are available on all commonly available app stores for macOS, Windows, Android, and iPhone / iPad.

Lite version for iOS

Full version for macOS

Full version for iPad

Lite version for Android

Lite version for Windows

Full version for Windows

--

--