So, my initial backtest run on this system as well as my initial analysis of it is complete.
Notes to self:
- System version: 0.03
- Backtest dates: June 2nd 2016 to June 2nd 2017
- Backtest resolution: 1 minute bars
- Symbol lists in backtest: Basic 01 - Basic 15 consisting of 1,430 symbols
- Additional basic filters in v0.03 system: None
- Trades in backtest period with no filters: 794
- Commissions $0.01/share per trade
- Price must pass through limit order to consider it executed in backtest
So to summarize the results of the system in it's complete unmodified state:
The following graph represents the equity curve if each trade is set to have equal risk. This is not a practical way to trade this system (at least not initially) since there are a good number of days that have > 20 possible entries --> A $150k trade allowance with margin, would likely be exceeded shortly after about 10 open positions...depends on the specific target, stops, and stock price, but point is it's not practical on a modest account.
Base unmodified system is clearly impossible to trade psychologically as well as practically with an approximately 3,500% peak to valley DD of the per trade risk. This would mean a $3,500 DD with $100 risk/trade. No thanks. Additionally, it is just break-even so pretty pointless.
When we look at a more practical way of trading this system, equal risk per day, the results improve a good deal. Although this is a more practical way of trading the system, even this is not completely possible since it is not possible to know ahead of time how many of the signals will execute during the day. An approximation can be made from past execution results which is what I will do if I go forward with this. So although this is somewhat idealized, it is possible to fairly closely match this style of trading with this system.
Clearly, this is a much better style of trading this system than the per trade alternative. However, the peak to valley DD is still rather high at approximately 500% of the per day risk. At a per day risk of $500 this would be a $2,500 DD which would still be quite unpleasant and I still say no thanks to. With this method of trading the end net is + 1,000% of the daily risk. Really fairly modest considering the overall backtest duration of ~1 year. A modest and realistic $500 risk per day yields ~$5,000 over a year. With the fairly low net/DD though, I would stay away.
For the unmodified system, I have also charted SPY over the backtest period with days that trades occur in the unmodified system highlighted in blue:
It is clear from this that there are no major down periods in the backtest, only flat, moderately down, and up periods. One would expect a long only system to work during this period. One thing I think worth noting though is that my system largely stays out of the market without any filtering during the major flat/slightly trending down period between Sept. through the middle of Nov. last year. It tends to be in the market for most of the upswings.
From these, slightly disappointing but altogether unsurprising results, I began working through the basic filters that I consider after running a backtest such as this.
The first filter I examined was an entry time filter. Simple to implement, and basically just is a don't enter in the trade after xx:xx time. The basic reasoning behind the validity of this filter is as follows.
All my system entries are either at or below the open of the day. If a stock in an uptrend starts the day above my entry and then goes down to it later on, the stock is less likely to have an up day and therefore the trade is less likely to be successful.
This chart illustrates the average per trade risk normalized net based on various entry times. On the bar, the entry times the bar represents is listed at the top, and the number of entries that occurred during that time in my backtest is the number below this. So for example with the first bar, this shows that for entries that occurred from 9:31 ET - 9:32 ET, of which there were 277 of the 794 total trades, the average per trade risk normalized net was approx 1.25%. The time ranges were formed to keep the bars approximately equal in number of trades. No trades were opened in the first minute due to the backtest resolution of 1 minute bars being used.
This result is not altogether surprising to me since this is what I have seen in other systems I have looked at. Entry in the first 5 minutes (9:30:00 - 9:34:59) tends to yield the best results as the volatility during the opening few minutes of the day often establishes close to the low or high of the day for the stock.
So the overall results with a filter limiting only entries within the first 5 minutes yields the following equity curve:
Now we are starting to see something that is probably worth trading. With a max peak to valley DD around 400% the per day normalized risk, the DD is still unpleasant (~$2,000 for a $500/day risk). However, the net at the end of the backtest period is double what the unmodified system was at about + 2,000% the daily risk. While this is still somewhat unimpressive perhaps for someone more experienced than me, I would be pleased with a + 2,000% return on daily risk over a year with a 400% max DD.
The second filter I looked at was a basic stock price filter. The reasoning behind this is that with lower priced stocks, I will tend to be looking for lower overall movements in price. With lower overall movements in price, the relative cost of commission can become an issue. For example, with the commission I have of $0.01/share, if I am only looking for a price move of $0.20 (not uncommon with a lower cost stock), the commission cost for this trade is 10% of my target (0.02/0.2). Needless to say, commissions of 10% what you hope to gain will quickly erode away profits (but will keep your broker happy as mine is with me I am sure).
I have been saying for a while now that I intend to put a $50.00 floor on this system...it was arbitrary at the time I said it, but from this chart it appears that I was right on the money with that one. In this graph above each bar is a number representing the price floor for trades in this system as well as the number of trades my system took with these price floors. So for example, the first bar shows that for stocks at or above $30.00 when my entry signal was generated (of which 659 of the 794 trades had), the cumulative net of these trades was approximately 2,100% the per trade normalized risk.
Initially when I was thinking about a price floor, I was thinking in terms of cumulative net as is shown in the chart above. Partially by accident I discovered another interesting phenomenon from this set which is illustrated below:
This is a bit of an interesting (and I think exciting) discovery. This chart shows the per trade risk normalized net, not the cumulative. So obviously, when the stock price floor rises, fewer stocks are eligible and therefore fewer trades will be taken. So, there will be some point at which raising the floor more will restrict cumulative profits (which from the previous chart is somewhere in the $50-$60 range). I figured that this point would correlate fairly closely with the point at which any per trade gains from a higher floor would level out as well.
From this chart though, that clearly is not the case. It appears that the benefits of a higher floor on a per trade basis levels out somewhere in the $90-$100 stock price range as there is minimal fluctuation in the per trade normalized net beyond this point. I didn't take it any further than a $120 floor since at the $120 level the sample size is only 111 trades so beyond this any conclusions would not be very statistically sound.
What these two charts do suggest to me though is that I should not only implement a $50.00 stock price floor, but I should also not equally weigh the risk for all of the trades taken each day. The higher priced stocks should have a higher percent of the risk for the day for optimal results. This does add a layer of complexity to determining how much to allot for each signal since as mentioned previously, at the start of the day, the number of signals that are entered in is an unknown. This will be something I will revisit later on when/if I get close to taking this live.
The overall results with a filter limiting only entries to stocks above $50.00 yields the following equity curve (note that all stocks are weighted equally per day in this):
Overall, this equity curve is fairly similar to the one when only signals before 9:35 ET were entered. The max peak to valley DD in this one is slightly lower at approximately 250% which is extremely manageable and easy to trade through. The overall net is around the same at + 2,000%. A system with + 2,000% daily risk and a max DD of 250% daily risk over a year...yes please.
A third item I looked at adding into the system was a reward:risk cap. So, even if my target was 2 x my risk, I would sell when I reached the cap. Or, conversely, if my target was lower than my cap, the system would sell at the original target. It is clear to me that the system could probably benefit from a second sell signal in order to prevent profits near the target turning into a stop loss (as is the case on occasion in systems such as this). A second "profit cap" style target is the only thing I can really assess without more rigorous backtesting so that is what I looked at to see if it is worth pursuing.
This chart shows the per trade risk normalized net for various reward to risk ratios. So for example, the first bar has a reward: risk cap of 0.5:1.0 of which results in an average per trade risk normalized net of approximately -0.90% (so if you want to lose your money...). This indicates that somewhere around a 1:1 or 1:25:1 reward to risk ratio is ideal (0.75:1 is not to far behind either).
The overall results with this second sell signal yielded the following equity curve (note that both the 1:1 - blue and 1.25:1 - red were checked).
From this it is clear that really there is not much difference between the 1:1 and 1.25:1 caps in place, and really they provide only minimal improvements over the unmodified per day risk normalized system. So, I do not think a second sell ceiling is the answer to maximizing profits, it will need to be something that factors in the price action of the day...something that I need to investigate further for sure.
One final item I looked at was combining the $50.00 price floor and the entry in the first 5 minutes only filters. This yielded the following equity curve:
Although this does have a marginally higher max DD of around 325%, it also has a fairly notable overall higher profitability of + 2,380% of the per day risk. Since the actual trading is likely to fall closer to this per day risk, but really somewhere between the per day and per trade, I also looked at the equal risk per trade chart on this one:
Which also looks rather good and much more manageable than what it started out as.
As a comparison, I charted the trade days in the modified for entry time and entry price system on SPY:
Overall, in the market less, but certainly to be expected with added filters.
I am currently running the same simulations on the v0.03 system but with the added filter of "SPY must be positive on the day at time of entry" criteria as has been suggested (thus it is the v0.04 system). Too early to draw complete conclusions, but after running the backtests on 3 of the 7 sets (I selected the best, worst, and a middle case), all 3 of the sets yielded improved results so far.
I can't pull up the exact figures at the moment since I am currently running one of the backtests but from what I recall, the net improvements were notable and seemed fairly uniform. It will be interesting to see if the additional filters I am considering now will further improve these results, or if the SPY filter and the filters I have developed tend to eliminate mostly the same trades taking place. I would not expect that to be the case, but I will see.
So...other than an additional sell signal that factors in the price action of the day, perhaps slightly better overall trade entry/momentum signals, and some out of sample backtesting, what am I missing or what have I overlooked? Any suggestions?