We really don’t see small change

My editorial on You Tube

Whatever kind of story I am telling, it is, at the end of the day, my own story, the story of my existence: this is hermeneutic philosophy, which I fully espouse intellectually. What’s my story, then? My essential story, I mean, the one which I weave, barely perceptibly, into the fabric of my narration about anything?

I think this is a story of change and learning. I change, my life changes, and I learn. Yes, I think that change is the most general denominator in my existence. You would say that it is the story of us all. Yes, indeed it is. We change, things change, and we learn. I think I was nine, when I got scarlet fever, AKA scarlatina. Nasty stuff: I spent almost two months with a fever around 39 degrees Celsius (= 102 Fahrenheit), on huge doses of Erythromycin (which is nasty stuff in itself). I remember doctors just sighing and alluding, in conversations with my parents, that we are sailing further and further into the hardly charted at all seas of maybe-it-is-going-to-work medicine. I had cardiac damage, and most probably some brain damage. I am not quite sure of that last one: in 1977, in the communist Poland, it was not like you can go and have your kid’s brain CT scanned just like that. Still, after that scarlet fever, I started to stutter (which had been haunting me until quite recently) and I started having learning problems at school. School fixed itself after like 3 years, stuttering took another 38 years or so (still have some echo of that in me), and here I am, having consumed and hopefully owned that particular avenue of change.

I am (mildly) obsessed about the connection between the collective intelligence of human societies. Not just human, as a matter of fact; viruses become kind of trendy, recently. I am going to develop on the concept of mean-reversed price precisely in that spirit, i.e. the link between us, humans, being collectively smart, and the ways to use artificial intelligence so as to discover how exactly collectively smart we are. In my previous two updates, I outlined the logic of mean-reversed price as analytical tool for nailing down a workable strategy of investment in the stock market. See ‘Acceptably dumb proof. The method of mean-reversion’ (earlier, April 9th, 2020), and ‘Fast + slower = compound rhythm, the rhythm of life’ (later, April 11th, 2020). Now, I go out of the stock market, and about into commodities. I want to check my intuitions in a different transactional context, and I want my writing to be useful for students in the courses of International Trade, International Management, and Macroeconomics.

Here is a perfectly normal world, where the entire social activity is centred on making (mining, growing) and trading 4 commodities: pork meat (lean hogs), uranium, coffee, and cobalt. Perfectly normal, I say. We raise pigs, and eat them, we make a lot of nuclear bombs, and a lot of electronics, and, obviously, doing all those things requires big amounts of coffee. In that perfectly normal world, the logic of ‘Price * Quantity’ still holds (see: https://youtu.be/S9dkez3BEWw ): we, humans, do all kinds of crazy and wonderful things, doing those things makes us generate an aggregate amount Q of economic utility, we go about that utility in recurrently patterned deals of exchange (AKA transactions), and observing transactional prices in, respectively, pork meat (lean hogs), uranium, coffee, and cobalt, can be possibly informative about how’s life going for us. Here is the link to download the Excel file with prices: https://discoversocialsciences.com/wp-content/uploads/2020/04/Uranium_Cobalt_Coffee_Lean-Hogs.xlsx .

I learn by accumulating knowledge, which allows, in the first place, distinguishing the normal from the alarming. I go Gaussian about it, and thus I build my expectations as moving average of past prices, and I denominate my perception in units of just as moving a standard deviation. Once again, I am in the world of mean-reversion.

I allow different temporal perspectives in my learning, and I introduce one more fundamental distinction, namely between learning with full memory, and learning with imperfect recall. The ways of calculating mean-reverted prices, which I showed in ‘Acceptably dumb proof. The method of mean-reversion’, and ‘Fast + slower = compound rhythm, the rhythm of life’, are marked with imperfect recall. I remember over a limited window in time: 30 days, 7 days etc. If my window is 30 days, on the 32nd day I forget whatever I remembered from day 1; on day 33, it is day 2 that I forget etc. Economic sciences convey substantial evidence that most markets, and most societies, as a matter of fact, shake off their memories every now and then. Yes, it seems that we like forgetting collectively.

Still, I want to have an alternative of not forgetting, and I introduce slightly different a method of calculating mean-reverted price: my temporal window stretches as far into the past as my data reaches back. My ‘lag’ in the equation grows every day. On day 15, I mean-revert the actually observed price with an average of prices 14 days back, and a standard deviation with the same window. On day 20, I reach back 19 days; on day 300, it is 299 days into the past etc. I call it mean-reversed cumulative.   

Once again, what mathematically is called mean-reversion is a typical pattern of our human cognition. We learn in order to slow down learning. Now, let’s see if it really works in all cases. I encourage you to go and retrieve the Excel file with those prices of : pork meat (lean hogs), uranium, coffee, and cobalt (link HERE), and practice calculating the mean-reversed prices. You will notice something interesting: sometimes it does not work at all. If you do the operation in Excel, it will yield the ‘DIV/0!’ error, which means that you are trying to divide by zero, which just doesn’t do in decent mathematics. The denominator we are dividing by is standard deviation, and when the phenomena observed are rrreaallly stationary, their standard deviation is equal to zero. In human cognition, it corresponds to a situation when the observable gradient of change is too subtle to be perceived and processed. We need perceivable change in order to learn. No change, no experience to put in your belt, sorry bro’. In this perfectly normal world, where we focus our activity on lean hogs, uranium, cobalt and coffee, such impossible situation happens a lot with uranium and cobalt, whilst taking place much less frequently with pork meat and coffee. In the reality we are currently experiencing, there are phenomena variable enough to offer our brain some material for trying to look clever, and there are others, like undertows of what’s happening, too stationary to be noticed.

The capacity to perceive change depends on the time frame of change. Those ‘WTF!? Division by zero!’ situations happen more frequently with shorter temporal windows. When I compute my moving average and moving standard deviation over a period of 7 days, and I observe the prices of cobalt, ‘DIV/0!’ happens like half of the time. When I stretch my temporal reference up to 30 days, many of those embarrassing absences of judgement disappear, and when I just go for cumulative moving average (and standard deviation), it happens just once, on day one, and then Bob’s my uncle: I always have some change to learn from.

If you have ever wondered why we have memories of various temporal reach, this might be an interesting avenue to walk down in order to find some answers. When our brain suddenly pulls out into consciousness some old stuff from back when I was twelve, it probably needs to compare data, to find some standard deviation as base of new learning.

Now, I put the same data into a simple neural network, a multi-layer perceptron. My question is: what kind of learning can an intelligent structure make out of observing reality the Newtonian way, with a focus on change?  In layer 1, I put three neurons. Each of them computes a different mean-reversion of the actual price: cumulative (from the beginning of time), the 30-day-based one, and the short one, with just 7 days of reference. In layer 2, another set of 3 neurons standardizes the mean-reversed observations on a scale from 0 to 1. In layer 3, I put one neuron, which assigns random coefficients to standardized observations, each random coefficient ranging between 0 and 1. This neuron experiments. It is the ‘what-happens-if-I-change-my-priorities?’ experimentation. In layer 4, three neurons activate, each based on a different function of neural activation: there is one sigmoid-based, another one working with hyperbolic tangent, and the third one made with ArcSinH, or hyperbolic arcsine. I add that third one because it has the interesting property not to require any standardization of raw data. Sigmoid and hyperbolic tangent are like refined intellectuals, who do not accept any input without a cappuccino as accompaniment. Hyperbolic arcsine is like a child, who just accepts what happens for what it is. In layer 5 of my network, three neurons calculate the error that each of those neural activations make in estimating the output, i.e. the actual price as recorded in the market. Layer 6 contains one neuron, which selects the least error among those coming from layer 5 and feeds it forward to the next round of experimentation.       

If I want my neural network to work, I need to get rid of the ‘DIV/0!’ cases and replace them by some arbitrary value. If at least one observation yields ‘DIV/0!’, the neural network goes on strike and yields the same, i.e. structural error of dividing by zero. Looks like intelligent structures do it all the time: I cannot see change, so I pretend that nothing happened. If I don’t pretend that, I face so strong a cognitive dissonance that I just go to intellectual sleep. Openly admitting that some important information has slipped out of our attention is one of the hardest things to do, cognitively. It is always safer to assume that we know everything we need to know.

Perception of actual empirical values, such as typical neural networks are based on, are maybe more natural and less human. There are less filters. Perception based on mean-reverted values i.e. rooted in change rather than absolute states, is more human-like.

Below, you can see visualisations of prices, respectively in coffee and in cobalt. Each of those markets is shown under two angles. Actual prices, i.e. market closures on each trading day over the last year (blue lines on each graph) are put back to back with prices estimated through the neural network which I have just described (orange line).

Two observations sort of jump to the eye (or maybe it is just my eye?). Prices simulated by the piece of AI are consistently lower that the actual ones, for one. An intelligent structure based on the very human cognitive mechanism of habitual perception and assessment (mean-reversion) consistently underestimates the real magnitude of the phenomenon under scrutiny. Secondly, that underestimation is much more pronounced in the case of cobalt than regarding coffee.

As you might remember from your own calculations, which I encouraged you to perform with those prices, mean-reverted prices of cobalt are much more prone to the ‘DIV/0!’ error, fault of sufficient variance, than the prices of coffee. Cognitively, it means that habitual perception (i.e. based on mean-reversion) tends to underestimate the magnitude of mostly those phenomena, which offer really low variance to our direct perception. We really don’t see small change. This is why we need scales of measurement. We need a scale of temperature, and the corresponding measurements, to assess the local kinetic energy of particles. In our perception, the difference between 35 degrees Celsius and 37 degrees Celsius is not a big deal when it comes to the ambient exterior, but it makes a difference when applied to body temperature.

As you might remember, had you followed ‘Acceptably dumb proof. The method of mean-reversion’ and ‘Fast + slower = compound rhythm, the rhythm of life’, I am developing a strategic tool for investing in the stock market, on the grounds of mean-reversion. What I can already see is that approached from this angle, my strategy could be a shade conservative, consistently downplaying the likelihood of sudden spikes in price, susceptible to offer me big rewards. Have to work on this one.

Leave a Reply