August 3rd, 2016

Back to Quantopian

Over the past few days, I went back to the Quantopian website after some 3 years of absence to find that they had improved a lot, an impressive job, sufficient in fact to warrant not only a second look but enough to want to make it a strategy design platform. Sure, it will require that I re-familiarized myself with Python, its syntax and packages, but I think it will be worth it. I do like what they did, and it shows promise for what I want to do.

I first decided to scrap my old programs that still resided there, too much has changed. If, for 3 years, I had not touched them, I must have had some reasons. It's a good time to start anew.

Nothing easier to get reacquainted than to study someone else's code. I cloned the first program I found which was a trend following system. Easy choice, my own stuff also follow trends. I would re-learn the syntax and program structure fast enough. Well, it will take more than just one program to do that, but nonetheless, it was an interesting start. I thank the author for having made his program public.

I did a 10-year simulation and obtain the following results:

#1   Trend Follow Algo
Trend Follow Algo

(click to enlarge)

Not so great, but certainly not enough. At least it survived, but for 10 years, an 11.7% total return is not the same as an 11.7% CAGR.

Nevertheless, it was a start. So, I decided to jump right in. Design my own based on my trading principles. That is easy, my methodology simply wants to accumulate shares for the long term and trade over the process. I transferred some of these notions to a new trading script.

The first version came out as:

#2   Accumulate 0.01
Accumulate 0.01

(click to enlarge)

Now that was more interesting. But it used a lot of leverage to get there. Too much for my taste. And in the end, even if the numbers looked good, I could not and would not operate that way. I will have to find better ways, and make it more palatable.

This after all is just a first attempt, a 0.01 version. It worked like a bulldozer over the price data. Nonetheless, it is worth investigating further. At least it survived. So, there will be more to come. I want to study every aspect of the trading procedures and see what I can salvage, to my taste, for future use.

One thing that appears early is that one could simply buy stuff as if in a dollar averaging scheme, and anytime they would get additional money, just keep on buying additional shares. In the end, they would simply win the game. It would be a bumpy ride, but they would win the game. Like buying real estate, it would all be mortgaged but would still appreciate in time and build equity.

Could this kind of thinking be pushed further? So, I tried a test using the same 10-stock data set I sometime use to explore a new trading strategy.

#3   Accumulate Using DEVX8 Data Set
Accumulate DEVX8 Data Set

(click to enlarge)

I know I could not trade like that, not access to enough capital. But, nonetheless, someone else would still win. Does it look like I like big numbers.

My next task is to scale it down some, make it more manageable, make it more self-financing. Wish me luck.

At this preliminary stage, for me, this is just exploratory. And, there is a lot of room for improvements which could bring the program more to my liking.

Created... August 3rd, 2016 © Guy R. Fleury. All rights reserved 

Alpha Project