Random Walkers

Random Walkers and the Irrational Market


21 January 2024


Finance

Random walkers, statistics, luck

To start off the topic of probability, I want to introduce a concept of a game to understand 'winning in probability':

Imagine if there's a cointoss game, a coin toss is 50/50 heads or tails.

I'll use a visualization to make it easier as understand as the complexity of this article will grow over time.

Here's the python code for those of you who want to actually run the chances

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

init = 100

amount = 100

p = 0.5

num_trades = 100

bets = np.random.choice([1, 0], size=num_trades, p=[p, 1-p])

equity = [init]

for bet in bets:
    if bet == 1:
        equity.append(equity[-1] + amount)
    else:
        equity.append(equity[-1] - amount)

df = pd.DataFrame({
    'Bet': bets,
    'Equity': equity[1:]
})

df.to_csv('bets.csv', index=False)

plt.figure(figsize=(10, 6))
plt.plot(equity, 'o-')
plt.title('Equity Curve')
plt.xlabel('Number of Trades')
plt.ylabel('Balance')
plt.grid(True)
plt.show()

it's a fair game, yet somehow you peaked at 1000 through consecutive wins out of chances of 50%, You could theorethically stop playing the game there. I mean if you were to flip a coin two times there is a chance to land on head two times and even four times in a row. This kind of chance could also happen:

You get the point. Series of consecutive wins and losses are possible even in 50% chance of bets. The point of trading is to have an edge, in terms of probability, it wants to 'skew' from probability of 50% to at least closer to 60% or if they can't skew it then every trade must have a return greater than the number that it risk.

Like this simulation with probability of 60%

or when the game of coin flip is changed if you're right you get 150 but if you lose you lose 100. But the probability will still be 50%. Will you take it?

Yea if you answer yes, you're honestly fucked, let me show you.

I mean yeah there are sometimes you can win over consecutive wins but that's just 'luck' LMAO. So much about luck. Yeah I mean by consecutive luck with Return to Risk ratio of 150/100 = 1.5, you can also win something like this:

So ideally, a 'good' as in 'consistently profitable' skew the probability to be above 50% and also have a RR to be 3.0

so the stats will be 'foolproofly' profitable.

Like this:

  • Probability = 55%
  • RR = 3.0 (Win flip rewards 300 and lose flip loses 100)

So come back to random walk, in which I think I read from some book that I've forgot.

Say replace the money gained and money lost with walking upwards and backwards. Now to much surprise if you want to replicate with no loss the experiment. U might find it that they might not end up on the same place where they started.

But if the rule is measured, if it heads then walk 3 times forward and the coin is skewed to be right by 55% they will invariably walk forward.

Ok now the funny thing is that traders are measuring their success tightly knit to their result, in which is inevitably PnL.

Skewing the coin flip to be above 50% is called an edge.

Increasing the RR is also called an edge.

A 'consistently priftable' trader MUST have an edge to survive in the market.

BUT, through luck and through the example of the random walk theory in which there are no edge (50% and 1.0 RR) someone could still be profitable doing edgeless trades, just like how it shows that's even edgeless cointoss can make you profitable.

BUT a trader will inevitably see their result and accounts their result out of their own talent. This is just inevitable.

There's a research article written by Simon Gervais from University of Pennsylvania and Terrance Odean from University of California with the title of "Learning to Be Overconfident". As I would like to quote their conclusion of their research.

We go through life learning about ourselves as well as the world around us. We assess our own abilities not so much through introspection as by observing our successes and failures. Most of us tend to take too much credit for our own successes. This leads to overconfidence. It is in this way that overconfidence develops in our model. When a trader is successful, he attributes too much of his success to his own ability and revises his beliefs about his ability upward too much. In our model overconfidence is dynamic, changing with successes and failures. Average levels of overconfidence are greatest in those who have been trading for a short time. With more experience, people develop better self-assessments.

When after a series of good trades, a trader would say 'ah yeah, im just too good at this fucking shit' and goes leverage tits up with zero remorse on risk. This story is as told as time.

The encouraging 'circumstances' is where I would say 'when random walkers are rewarded'.

Say chances wise, random walkers, without knowing anything about any shits like fundamentals or technical, can still be profitable, until the odds are proven otherwise. And now it just gets back to the 'economy' and how 'well' the economy is doing that grants such 'circumstances' where random walkers are rewarded.

It's really hard for me to summarize how such circumstances that we live in, the economy, and how it rewards the cyclical nature of bull market and bear market in which 'rationality' is getting thrown out of the window and everyone thinks they're a genius out of the result they are profitable in the market. But I'm going to try:

Your spending is another person's income. Your nation wants to raise GDP which is the total economic output of your country. I'm not going to shit on capitalistic 'nature' on how the world CURRENTLY runs but let's step aside the communistic belief and doomer capitalistic society as it is currently how the world run. So apparently your nation wants to prove its worth to other countries by increasing GDP or in a sense, by measuring how productive your people are that it can buy goods and generally increasing better wellfare. Let's face it you may not want the fact that you need to fucking find clean drinking water every day and hunt and forage and escape lions and bears. So we got all that problem figured it out and we have convinient stores to buy salmon fishes, processed chicken meat, and electricity and fucking delivarable clean drinking water to your house. Ok so these 'companies' actually just the sum of people. Let's say my mom. My mom runs a F&B business, in order for the business to scale up it needs higher output, higher output means higher revenue, higher revenue means higher costs of production to buy the raw material and also labor costs to hire expansion of employees and stalls to rent.

My mother can either increase her own 'productivity' and clock in more work hours or borrow money from the bank as credit to expand her business. Ultimately her business went well and she can payback interest. BUT my mother will not borrow money when 'interest rate' is too high. The bank knows this and supporting businesses is a mean to produce their civilian productivity and ultimately welfare. So the bank wants to make their people borrow money, so in circumtances where they don't want to borrow money, banks will 'adjust' interest rate to the point it's agreeable to borrow money for the sake of improving the 'economy'.

so when people say 'the economy is doing great' is to be taken comparatively that people are generally having better wellfare.

Comparatively when people say 'the economy is doing bad', people are worried that their wellfare is on a constant state of despair. Fear and people are less reluctant to invest in things.

ok so how to make economy good? Policies, adjusting interest rate, fucking governmental shits, avoid wars, avoid fear, make sure the people having good welfare and good rules and such.

Because recession is measured by ultimately, the peoples productivity-> unemployment, reduced business investment, decline in customer spending. Because if people decline their spending, means they are cutting another person's income, and that another person's income decline spending they are also cutting another person's income, and so on and so forth. So the economy is really can be measured on how well people spent their money and through it we can roughly measure the people's productivity and their willingness to invest in things. A bit mumbo jumbo, but that's just how it is.

Ok moving on to bull market where people have so much fucking money and they want to increase their money through investments of financial assets.

Ok measuring by market cap.

The S&P 500 Index, or Standard & Poor's 500 Index, is a market-capitalization-weighted index of 500 leading publicly traded companies in the U.S. The index actually has 503 components because three of them have two share classes listed.

It is not an exact list of the top 500 U.S. companies by market cap because there are other criteria that the index includes. Still, the S&P 500 index is regarded as one of the best gauges of prominent American equities' performance, and by extension, that of the stock market overall.

Investopedia

SPX market cap is 40 trillion dollars.

cryptocurrencies market cap is 1.64 trillion dollars. So what I'm saying is, regardless of the industry, there are money being 'punted' on markets. In which it's impossible to be punted when people are even considering it's not worth their money to be 'punted' at when they are already concerned about their income and spending -> bear market. People need a reason to 'punt' these assets, in which first it needs to come through 1. good economy, and then 2. narratives

Now let's talk about 'narratives'. Sometimes, it doesn't really matter if the narrative is 'true' or not, as long as it keeps the money flowing. The 'collective' unconscious of the 'random walkers'.

There's undeniably a trend here on 'narratives', as people see these 'assets' as 'a quick way to 'grow wealth', most people don't even do their due dilligence before investing. In a fuckingn bull market, it doesn't matter whether you're a PhD Stanford graduate that actually understands the bitcoin whitepaper or you're a hippie that hates the government and taxes, or you're a teenager on wallstreet bets punting money on something that remotely moves on the minute chart. People, as smart or dumb as they think they are, will walk a random walk and still make money, because it's not even finding your own edge anymore, it's about the environment shapes winners.

I will show you a simulation on how fucking dumb it actually looks like it will look unbelievable.

Ok typically, when it's a bull market, everyone knows, it's called for and everyone's shouting.

I ran a simulation, in where a starting balance can be put, each trade can be a % of the balance, and the condition to open and close a trade is simple. Open a trade every opening day and close every time it closes. This is as stupid as its unheard of (the strategy), it's impossible to anyone would want to hear and then use this strategy, but I'm just showing how random walk can be profitable in an environemnt when it favors people to do random walks and still be profitable, as everyone is punting money to each other.

So in this simulation, as stupid as it seems, apparently the strategy in a bull market, where someone have an intial balance of 10k. Then choose to long a position every daily close with a 10x leverage of the position and punt 0.5 / 50% of their balance as their position and close regardless if it ends up green or red on the daily, it just close the position. It will ended up making 796% gain by the end date. You can run check the csv here: (CO is Close - Open Price)

,Equity,Trade Size,CO,Profit/Loss
0,10204.643571977296,5000.0,0.004092871439545933,204.64357197729666
1,10196.10477017441,5102.321785988648,-0.00016735129929150588,-8.53880180288557
2,10768.66379792723,5098.052385087205,0.011230936532305264,572.5590277528188
3,13458.265589976176,5384.331898963615,0.04995237742618811,2689.6017920489467
4,13207.358153122379,6729.132794988088,-0.003728674176866817,-250.90743685379715
5,13009.366638667523,6603.6790765611895,-0.002998200126920129,-197.99151445485558
6,13898.755434554452,6504.683319333762,0.013673052971593781,889.3887958869299
7,16196.775840104894,6949.377717277226,0.033068002618956926,2298.0204055504423
8,16838.001394860974,8098.387920052447,0.007917940719638023,641.2255547560794
9,17049.730177359295,8419.000697430487,0.0025148920888311646,211.7287824983199
10,25380.796944789792,8524.865088679648,0.09772666993280048,8331.066767430497
11,28542.999558719934,12690.398472394896,0.024918071885676414,3162.202613930142
12,31012.094418366014,14271.499779359967,0.017300878658996918,2469.0948596460807
13,29449.8156149287,15506.047209183007,-0.010075287288639883,-1562.278803437315
14,28386.292345287933,14724.90780746435,-0.0072226141144438654,-1063.5232696407668
15,29147.489386318382,14193.146172643967,0.005363131132247392,761.1970410304477
16,31067.502915610596,14573.744693159191,0.013174469360599227,1920.0135292922137
17,30935.34490372826,15533.751457805298,-0.0008507797504120078,-132.15801188233752
18,31687.220594344257,15467.67245186413,0.004860949137343439,751.8756906159981
19,35252.90979851816,15843.610297172128,0.02250553464326456,3565.6892041739047
20,32749.627308834475,17626.45489925908,-0.0142018488912873,-2503.2824896836814
21,31764.825366075827,16374.813654417238,-0.006014126105752606,-984.8019427586495
22,33346.244118218005,15882.412683037914,0.009957043578341856,1581.4187521421788
23,33153.064753063045,16673.122059109002,-0.0011586274272455167,-193.17936515495938
24,33117.977024877415,16576.532376531522,-0.00021167109856644732,-35.08772818562709
25,34987.86455907932,16558.988512438707,0.011292281124522128,1869.8875342019037
26,36152.50144662322,17493.93227953966,0.006657376220131054,1164.6368875439036
27,41527.099796476235,18076.25072331161,0.02973292654611055,5374.598349853018
28,44987.77394841865,20763.549898238118,0.016667064008337364,3460.6741519424145
29,43950.684530547434,22493.886974209327,-0.004610538939136264,-1037.089417871221
30,43480.377209572114,21975.342265273717,-0.002140159253485284,-470.30732097531813
31,40149.59176204981,21740.188604786057,-0.015320867302821093,-3330.785447522304
32,34900.647924305835,20074.795881024904,-0.026146935036611654,-5248.943837743974
33,46350.57636280125,17450.323962152917,0.06561441760811182,11449.928438495419
34,35795.59186523135,23175.288181400625,-0.04554413483427933,-10554.984497569903
35,37932.842946152174,17897.795932615674,0.011941420546795109,2137.2510809208275
36,37727.42266055179,18966.421473076087,-0.001083073503834077,-205.42028560038392
37,41856.27061019682,18863.711330275895,0.021887781663719113,4128.847949645032
38,42432.37729781353,20928.13530509841,0.002752785564590474,576.1066876167116
39,33059.290737292446,21216.188648906766,-0.04417893673378544,-9373.086560521087
40,40806.15969164889,16529.645368646223,0.046866516380628914,7746.868954356451
41,40092.91892290487,20403.079845824446,-0.003495750514792926,-713.2407687440198
42,42371.69465126602,20046.459461452436,0.011367472309726467,2278.775728361147
43,42795.0525856802,21185.84732563301,0.001998305415436233,423.3579344141768
44,40996.450722380956,21397.5262928401,-0.00840565324553932,-1798.6018632992432
45,39901.74667585627,20498.225361190478,-0.005340482052642934,-1094.7040465246798
46,43024.92966292083,19950.873337928137,0.01565436727587836,3123.182987064563
47,43209.11942944722,21512.464831460416,0.000856200198208003,184.18976652639103
48,42362.47453401404,21604.55971472361,-0.003918825037920977,-846.6448954331777
49,47813.85486403603,21181.23726700702,0.02573683615032883,5451.380330021985
50,52677.23318972517,23906.927432018016,0.020342966863971523,4863.378325689144
51,56054.84407388603,26338.616594862586,0.012823797605298944,3377.6108841608584
52,70086.34312351549,28027.422036943015,0.05006346652622745,14031.499049629463
53,87566.77753210804,35043.17156175774,0.0498825694979868,17480.43440859255
54,84253.44428234945,43783.38876605402,-0.007567557795634765,-3313.333249758597
55,79667.5488464131,42126.72214117472,-0.010885953624799317,-4585.895435936346
56,87704.25031905723,39833.77442320655,0.020175596184433046,8036.7014726441275
57,83197.59624803143,43852.125159528616,-0.010276934252630042,-4506.654071025792
58,83685.76907225251,41598.79812401572,0.0011735262705564664,488.17282422107496
59,59338.064517676685,41842.88453612626,-0.0581883988747347,-24347.70455457583
60,60859.60797104684,29669.032258838342,0.005128389224481337,1521.5434533701573
61,71296.36297362146,30429.80398552342,0.03429780555780042,10436.755002574626
62,72457.73095297544,35648.18148681073,0.003257860375805347,1161.367979353984
63,63208.66187166353,36228.86547648772,-0.02552955760459706,-9249.06908131191
64,65487.363363003366,31604.330935831764,0.007210092490065456,2278.7014913398393
65,58731.45513158497,32743.681681501683,-0.020632708004961774,-6755.908231418399
66,67788.96304721397,29365.727565792484,0.030843805573473673,9057.507915628998
67,64840.117535627294,33894.481523606984,-0.008700075584672543,-2948.8455115866777
68,75510.55469436671,32420.058767813647,0.03291307161149546,10670.43715873942
69,77422.42345712145,37755.27734718336,0.0050638451021665165,1911.8687627547288
70,78559.99689638482,38711.211728560724,0.002938614908879435,1137.5734392633697
71,76126.59496079909,39279.99844819241,-0.006195015355703805,-2433.4019355857363
72,69926.82456602105,38063.297480399546,-0.016288053860731774,-6199.770394778038
73,74825.10320178108,34963.412283010526,0.014009727071577046,4898.27863576002
74,65562.50124175297,37412.55160089054,-0.02475800650765458,-9262.601960028107
75,72689.41657925528,32781.25062087648,0.02174082807250677,7126.915337502314
76,65663.1194228247,36344.70828962764,-0.019332380110025003,-7026.297156430583
77,61693.54398355913,32831.55971141235,-0.012090730608469198,-3969.575439265575
78,62170.981682424004,30846.771991779566,0.0015477719969924366,477.43769886487024
79,63004.97417755094,31085.490841212002,0.002682899553965721,833.9924951269318
80,77065.50870915462,31502.48708877547,0.04463309354585379,14060.53453160367
81,83787.40344370996,38532.75435457731,0.017444625610462887,6721.894734555346
82,64095.21583372786,41893.70172185498,-0.04700512678665762,-19692.187609982102
83,73996.88530820001,32047.60791686393,0.030896750547368443,9901.669474472148
84,73743.30472853349,36998.44265410001,-0.000685381766030708,-253.5805796665294
85,72159.5904069941,36871.652364266745,-0.004295208432465622,-1583.7143215393953
86,71705.56620157775,36079.79520349705,-0.0012583890868991111,-454.02420541635587
87,96356.99175036515,35852.783100788874,0.0687573555433274,24651.42554878741
88,87662.995752695,48178.495875182576,-0.01804538692987414,-8693.995997670148
89,92474.01953667327,43831.4978763475,0.010976179270785091,4811.023783978262
90,89624.95889893398,46237.00976833663,-0.006161861789968818,-2849.060637739285

It's an insane find in my opinion. The problem is that this is what how people usually ended up

The chart should've stopped the moment it hits sub zero as the account is liquidated.

But people just tend to be over-levered as they encounter the profitable random walk and feel undefeated, not knowing that he is just lucky in to be in such cirucmstances and cranked up the leverage more than he should. But still if navigated properly, we can walk alongside the left curve and be profitable.

This is data from Hyperliquid, one of crypto exchange and is kind enough to show how their traders are performing and is probably the same with other exchanges

There are 'reoccuring' patterns that reasons why traders become 'consistently unprofitable' and how it's such to be in human nature to do so and the article's job is to explain why profitable random walk can leads to a person demise and how to avoid it by understanding and be humble for the opportunity given and not to go levered tits up just because you're right.

This is to be approached by human nature and why people make decisions in which it ultimately explains why traders trade and how they decide their position size and risk.

I would like to quote my previous article, Artist's Ego Death as it explains the nature of such:

If we were to follow the pleasure principle, as I were to quote Memory Reconsolidation, Cristina M. Alberini, 2013:

With the pleasure principle, Freud postulated that certain aspects of mental life are guided by pleasure-seeking behaviors originating from the unconscious. The principle of pleasure, which supposedly governs mental functions, was also viewed by Freud as a principle of non-displeasure.

Is essentially speaking that in a roundabout way, life is inevitably spent doing what one loves doing or finding pleasure with. In the other hand, the Drive Reduction Theory states that:

Drive Reduction Theory states that needs which are currently not satisfied constitute behavioural drives working towards their satisfaction (Hull, 1943).

Similarly, based on need-related changes in neural activation patterns, it has been argued that unfulfilled needs cause primordial emotions that dominate the stream of consciousness (Denton, McKinley, Farrell, & Egan, 2009). More generally, self-regulation researchers consider unfulfilled needs special forms of desire which—because need satisfaction has a very high reward value for the individual—are especially likely to hijack cognitive capacity, at a cost to other currently to-be-pursued goals (Hofmann & Van Dillen, 2012).

[Jan Rummel, Do drives drive the train of thought? 2017]

End Quote.

It says that there's a part of human nature that seeks pleasure-seeking behaviors. In which this is to be framed as when he is on a winning day, on an ongoing trade position, that made him smile, he become infatuated with the idea and want it again and again, it levered up to chase the sensation that he is under the illusion of being smart just because he is proven to be right dismissing the fact that he is walking the random walk. The unconscious is fairly strong in this behavior as it encourages the trader to open up another position and it just cant be helped if the conscious is not willing to cut the fact that he is walking the random walk and wait until the strategy prove him wrong. This is why backtesting strategy becomes important but such is such that most people doesn't even know the nature of economy and bull markets, due dilligence is out of the window (conscious effort) as the pleasure-seeking behaviors (unconscious) feeling PnL goes up is enough of a motivation to punt another trade. barely any trader even wants to journal where he went right, what he got wrong last week, and how he can be better next week, as an effort to cut off bad habits and behaviors when it comes to trading and how one formulate one's edge. Without self-awareness, one is bound to lose.

The behavior of a losing trader is as biologically mechanical as the pleasure seeking behavior to talk to your crush again. You just cant help the sensation as it gives you pleasure. We live in a such a world where pleasure seeking behaviors are reinforced as it what make us happy and seek happiness.

Most of us tend to take too much credit for our own successes. It's me, not the market. Then how come when you're drown in minus gazillion dollars loss, suddenly you want to blame the market?

This is just irrational by hindsight. But how come it's irrational when it's the same behavior wire principle that drove us into practically doing anything at all? Pleasure-seeking behaviors that are hard to buffer down. But people are too lazy to analyze themselves, people are too easy to take credit to their own for their successes. Much of such nature, the rational keeps being(or seems to be) rational only until proven wrong.

A good trader is the one that understand himself. The one that can tame his primordial emotions as much as it is part of human nature. A good trader is the one that doesn't blame the market for its shortcomings as he is calm as he believes in something, his fucking strategy. As much as he can be in a loss, it's impossible to be 100% right all the time. That's trading is to be seen as flipping a coin as the first explanation i give to you in the article. Even on an edge of 70% right, there's still 30% chance to be wrong. Bull market just gives a tendency to be right more than to be wrong.

End


This is probably my favorite strategy as of now

If you put 100% of your balance per trade with 10x leverage, a 10% price drop would indeed liquidate your position. This is because the 10% price drop is magnified by the 10x leverage, resulting in a 100% loss of your position.

If you only put 10% of your balance per trade with 10x leverage, the price would need to drop by 100% to liquidate your position. This is because you are only risking 10% of your balance on each trade. So, a 100% loss on that trade (caused by a 10% price drop magnified by the 10x leverage) would result in a 10% loss of your total balance.

To lose your entire balance, price needs to drop 100% on a single day and that's just practically impossible.

This strategy allows you to be in and out of a trade at any day of the week! And allow you to have more liquidity than ever. It's amazing.