Momentum trading, AI, neural networks and python …… mmmhhh ….

Momentum trading, AI, neural networks and python …… mmmhhh ….

This is more of an informative post (hopefully) rather than a rant or my trying to make a point!

If you have read this blog you may have picked up that in the past I have been excited about crypto$ and worried about central bank (“CB”) quantitative easing (“QE”) ….

This is still true but as I write this the QE (for countries that have their own reputable CBs at least) seems to be working out to support COVID-19 stricken economies.

In fact, it is working out so well that stock markets no longer seem to be looking at fundamental data about a company’s financial strength and performance but more to the CBs for the next dose of QE.

This means that share prices rise when more money is printed as companies that would normally go bankrupt are able to raise money to buy a stay of execution, whilst simultaneously saving jobs and protecting economies.

So, good news so far amongst all the bad news (except maybe when the QE bill has to be paid).

This is having a knock on (decoupling) effect on some traditional levers used to manage a country’s economy.

So, for example, when stock markets go up in, say, the USA, the dollar loses value against other currencies. And so the foreign exchange (“FX”) markets, too, react more directly to CB QE than to traditional fundamental data such as the relative interest rates of other countries.

And, more investors are looking at the past to try and predict the future. This has given prominence to quant(itative) trading where historic corporate financial data (an example of big data) is used in conjunction with neural networks and artificial intelligence to spot the next trend and give traders an edge.

Also, things like “momentum (or swing) trading” are becoming more common, strategies which, to my mind, without looking at any underlying company fundamentals, are just plain risky ie., just because a share price is going up today doesn’t necessarily mean it’s a sensible share to buy, particularly in light of all of the above. And particularly if an investor has borrowed money (is leveraged) to buy the shares in the first place.

Anyway, I digress. This brings me around to the title of this blog and what I stumbled onto recently, a website called quantopian.com, which to a geek like me is just plain marvellous.

However, having had a play with quantopian.com I decided that I ought to brush up on my programming and AI learning activities, as I’m still interested in the application of, say, raw sensor data harvested from “internet of things” devices via the iota tangle, for example, to a neural network in order to predict actions or calculate results that are helpful to us humans, a subject which I find fascinating and that has boundless useful applications.

So I went back to https://pythonprogramming.net/ and more specifically to the youtube series referred to at https://nnfs.io/?a=2&t=/introduction-deep-learning-neural-network-pytorch

The youtube series is awesome and the reason I’m sharing this post…

Most PARTICULARLY this https://youtu.be/joA6fEAbAQc video animation of how a rectified linear activation function (which is far less expensive in terms of computational processing) helps a machine learn shapes (this is in very simple terms) as opposed to using a sigmoid activation function (very expensive in terms of computational processing) literally blew my mind for it’s eloquent simplicity!

At it’s core machine learning is SO simple – just the plot of a line on a graph, y=mx+c, but multiplied up into many dimensions and each calculation being tweaked by the aforementioned activation functions.

Honestly – if you want to understand more about this subject then these youtube videos are where you should start.

And, neatly full circle, the guy in the video is also the quy behind http://sentdex.com/sentiment-analysis/ which is a website that apparently provides data via quantopian.com to help investors make investing decisions…

What a guy!

Small world heh.