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.
Comments
Post a Comment