Progress Update 2
Today I dove deeper into the RSI-based strategy that I stumbled on yesterday. I wrote down potential changes that I could make to the code to have it perform better and started work on it. I removed most of the barrier conditions and variables to isolate the profit-maximizing factors that I found out yesterday: RSI with a simple moving average on top of it.
Before every potential change, I first found the optimal values of the basic underlying strategy and mapped out possible returns on different time frames starting on a 4 hour chart with 18,304.95% net profit in a quick 10.5 years (first trade started in January 2010 for the sample data).
As I made changes, I would map out possible returns on each time frame I was looking at. So today I only went through 4 major changes that overall affects the performance of the strategy. One of the changes that made a significant increase in returns is a "pattern-based" stop-loss instead of a percent-based stop loss. By this I mean, setting the stop loss of a buy or sell order to be the local high/low of a custom set of number of bars back from the bar in which the order was placed. By the end of today, my best performing version of this algorithm brought up a question I have to ask myself: am I comfortable having a bot trading on margin?
I don't usually trade on margin because of the blatant risks involved of borrowing money to make investment choices with. But you have to have a margin account to short-sell. If you don't know, short-selling, or shorting, is a process of betting that the price of the stock will go down by "selling" a stock that you don't necessarily own. To do that, you have to borrow a stock and "sell" it. Therefore, selling on margin.
Just in case of my future decision of taking on that risk I will be coding/improving my algorithm in 2 versions: one that won't shy away from short-selling, and another that is limited to only buying and selling the existing stock that the algorithm will be in charge of.
Back to the results, I optimized the algorithm to generate 24,925.39% net profit over a 10.5 year span (test data starting from February 2010) on the version that allows short-selling and 2,627.33% net profit over the same span of time on the version that doesn't allow short-selling. The short-selling version has a Sharpe ratio of 0.877 and the restricted version has a Sharpe ratio of 0.871. Not a big difference between Sharpe ratios but a massive difference between potential returns. Now you can see the tough decision I am in.
Also, I would like to see the year-over-year return of each algorithm version to better assess how "good" my algorithms are. So tomorrow, I will start coding to plot the algorithms equity over the chart to see the returns in logarithmic scale to better assess the results of what I have created. Tomorrow I also have to read chapter 10 of Trend Following by Michael W. Covel to hopefully gain some insight in creating better trading systems.
I feel like I am making very good progress today and I'm excited for what I can create tomorrow.
-Jamie
Comments
Post a Comment