Share →
Buffer

Being one who understands something of economics, the stock market, the arts of war, high cuisine, technology and can dance a pretty mean salsa, it stood to reason that of all people, your humble Lighthouse Keeper should be able to write a decent trading bot.

We have all heard how an ever increasing amount of the day-to-day market activity is dominated by Quants and their bots. With this algorithmic trading, computer programs basically buy and sell securities with lightning speeds, making decisions based on any number of measurable criteria far more quickly than any human could.

Still, the trick is to know what “measurable criteria” should tell a bot to buy, hold or sell what security and how much of it. Physicists, nuclear neurosurgeon rocket scientists and PhDs of unknown types reportedly dominate this Quant world. Never one to be stymied nor overly impressed with titular authorities¹ and academic regalia, I dusted off my one of my old trading strategies I had developed and delved into the Quant world. Apparently, python was a good language to do this with, and though I get by well enough with JavaScript, VBscript, and even php, had never even seen Python.

All the available options were foreign to me, with perhaps the exception of C++ which at least has a very similar syntax to JavaScript. However, I noticed that python seemed to be very easy to read once you take a closer look at it (that is one of its main goals and touted advantages) and figured a higher level programming language was probably a better choice than a lower level one. MatLab was also an interesting choice, but ultimately went with Python. There are surprisingly few platforms for regular users to do backtesting, and they have their limitations.

Quantconnect was the one I used and it is overall a nice platform, not without its drawbacks. So after teaching myself some crude python… here is what I got.

 

¹ It may very well have been the case during Wallace’s time, that men “don’t follow Titles, they follow Courage”, but today there are either much less men around, or they started following titles. Oddly enough since the Titles have gotten much less impressive. I can easily ignore what a Dr. Rubin, PsyD says, but I would find it rather more difficult to do likewise to the noble commands of a Duke of Norfolk, Earl of Surrey and Baron Mowbray, Earl Marshal of England and Queen’s Lieutenant in the North, and of course also Knight of the Most Noble Order of the Garter². I might just listen to him.

² Apparently, now only called “Order of the Garter”. I would suspect leftists at work.

Comments

Leave a Reply

Online Marketing at OnToplist.com
%d bloggers like this: