Me vs. np.random

The efficient market hypothesis states that stock prices already reflect all information available on the market, making it sort of impossible for any investor to generate alpha. Some strong believers of this hypothesis, including my favourite finance professor, would even go so far as to state that any abnormal investment gains are only due to pure luck. 

Following the somewhat discouraging results since Update #0826, I plan to dedicate this today's post to comparing my own investment strategy with a set of completely random ones. Compared to those, it might be that I currently just happen to be out of luck.  

I want the random strategies to work under similar conditions as my own. That is, the investible stock universe should still be restricted to the OMX Stockholm 30 Index, no short-selling should be allowed, and I require a monthly reallocation scheme. 

Keeping this in mind, I start with generating randomized stock weights for, in total, 100 random portfolios. Each portfolio uses two different arrays of random weights, one for July and one for August. 

I use np.random.lognormal() to ensure positive weights only, meanwhile mu, sigma, and n stand for some initial distribution traits. 

Next, I use my previously randomized weights to find the corresponding units of each stock within OMX 30 that is to be obtained given a monthly budget of 5 000 SEK. 


This will give me a set of random unit arrays that look similar compared to the actual units that I have used for my monthly investments in Let's open the black box and Buy-Side _ August 2022. Namely:


I use both my own as well as the random unit arrays to calculate the returns of each strategy or random portfolio. Starting with obtaining the initial price references using yfinance


And continuing with calculating the daily returns.


Finally, this is what the cumulative returns of my own (ParaTopia) vs. 100 random investment strategies look like. 


Apparently, is possible to become both more or less lucky if depending solely on the np.random roulette.  

Comments