August 3, 2016
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-familiarize myself with Python, its syntax, and its 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. (Quantopian shut down in 2020)
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 follows 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 obtained the following results:
#1 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
(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 sometimes use to explore a new trading strategy.
#3 Accumulate Using 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, and make it more self-financing. Wish me luck.
At this preliminary stage, for me, this is just exploratory. There is a lot of room for improvement, which could bring the program more to my liking.
Created... August 3, 2016, © Guy R. Fleury. All rights reserved