Dr. Toad's Journey to Bankruptcy or Financial Freedom

Are you including trading costs (spread, commission, whatever) in your P/L ?

It wasn't included in what I was posting since I was more just trying to see if what I was doing had any merit and was worth further investigation. Since you asked though:

MCD from 5/31/17:
Net with commission: +0.73%

GLPI from 5/31/17:
Net with commission: -0.55%

NEE from 6/1/17:
Net with commission: +0.64%

PM from 6/1/17:
Net with commission: +1.11%

XEL from 6/1/17:
Net with commission: +1.08%

AON from 6/2/17:
Net with commission: -0.12%

Overall net with commission: +2.89% (without would be 3.11%).

Since the targets are 1 to 2 orders of magnitude higher than commissions with this, the commission costs don't kill it to bad.

Having said that my preliminary investigations into this with backtesting makes me think there is nothing there and these results have simply been due to the overall market being up the past few days. I haven't​ yet had time to look closely enough at it to completely rule it out yet though.
 
Spent a bit of time vetting the system I have been posting calls for. I made the system a bit more sophisticated...where the stock opens for the day is now a factor in determining the signal levels so can't really make advanced calls anymore :( guess I will just be a hindsight trader again.

Still not convinced it has merit, but I will be running it in simulation since I have it coded up now and might as well. I am currently running fairly extensive backtesting on it to see if I can determine any commonalities between failed and good trades, or if there are no discerning features between the two which would indicate that further improvement can't be made to it and I should just bin it.

Since I haven't posted pretty charts for a while, I will be posting all the failed trades (stop losses) and successful trades (profit targets) the system makes in the backtest. Since the signals currently are generated purely based on OHLC and V data on the daily level, I will not be posting the intraday charts but the daily charts leading up the the signal days and beyond.

Perhaps there is something to be gained from an in depth analysis...I normally would just spend a bit more time throwing additional criteria in code at it and running the backtests, then would give up, and move on to something else. BUT...time for a change I think...after all, they say insanity is repeating the same thing over and over and expecting different results. I like to think I am not insane, so I will vet this idea further by looking at the good and bad trades it took.

The basic idea of this system should be pretty obvious from the charts (or if you have been looking at my live calls at all). It is a system based on stocks that have momentum --> trending up.

So for the first set of failed trades:

On all charts, yellow up arrow is the day the trade occurred so the signal day was the one before it. Blue down arrow is 20 days back (arbitrary - 1 trading month basically). Straight line drawn from 20 days back low to signal day low (arbitrary - to help see general trend).

Notes to self: Basic 03 and Basic 04, June 2nd 2016 to June 2nd 2017, 1 minute.

Stop Loss 001:


Stop Loss 002:


Stop Loss 003:


Stop Loss 004:


Stop Loss 005:


Stop Loss 006:


Stop Loss 007:


Stop Loss 008:


Stop Loss 009:


I haven't had a chance to study these yet and it is late, so I will return with an analysis later. Bonus points to anyone who has suggestions for additional filtering criteria, and a free profitable system to the person who makes me a millionaire.

There is one obvious additional filtering criteria I see right off the bat, and I have known about that one for a while, just haven't had time to code it up yet and it is visually obvious so easy enough to eliminate those stocks from trading. It will be interesting to see if any trades with target profits occurred on those signals...hoping none (obviously).
 
Last edited:
Have you added the context of major indices to your entries?If indices are negative , the buys tend to underperform but if they are positive ,then there is less chop.
 
Have you added the context of major indices to your entries?If indices are negative , the buys tend to underperform but if they are positive ,then there is less chop.

In short, no.

I have looked at this before for a different strategy. I found it to be an ineffective way of filtering, but then, I have never really properly backtested it. So, I suppose I will look at that. How would you recommend I apply this to a strategy? What index would you recommend to compare against?

In the past I have always used SPY as my basis since it mirrors fairly closely the S&P 500. Which of the following would you recommend:

1. Enter trade only if SPY is positive at the time a valid entry level is reached in my system (I believe this is the intent of your suggestion)?

2. Enter trade only after x amount of time has passed, my entry level is reached, and SPY is positive (if so how long should I wait -- this is potentially an important consideration since signals often occur in the first 30 minutes of the day before an obvious trend is established if it ever is)?

3. Enter trade only if SPY is positive by x amount when a valid entry level is reached in my system (if so how much should said index be up by)?

There are infinite possible ways to implement your advise. I am not saying it is bad and brushing it aside, simply wishing you would be more specific in your suggestions as you seem to believe you know what you are talking about. Perhaps you do, perhaps you don't, but unless you are more specific I will never know and will never be able to implement the advise you give properly.

I am assuming the intent of your suggestion is the first option I have listed. Is this correct?


Simulation trades from today -- note I am fairly sure I will be implementing a "stock must be greater than $50" filter to this system - the lower priced stocks seem to perform worse in this system likely due to their movements being smaller and eating into commissions more. Commissions are $0.02 round trip per share. Am still including all valid signals in results for now:

Simulation 06/05/2017

SPY - for context


G


Entry: $27.52
EOD Exit: $27.54
Net: 0.000%

IART


Entry: $51.22
Exit: $51.12
Net: -0.274%

PM


Entry: $121.00
Exit: $121.86
Net: +0.958%

UL


Entry: $56.15
Exit: $56.44
Net: +0.740%

MCD


Entry: $153.25
Exit: $152.86
Net: -0.509%

Day net: +0.915%
 
Backtest - first set of successful trades:

Notes to self: Basic 03 and Basic 04, June 2nd 2016 to June 2nd 2017, 1 minute.

Profit Target 001


Profit Target 002


Profit Target 003


Profit Target 004


Profit Target 005


Profit Target 006


Profit Target 007
 
1. Enter trade only if SPY is not negative at the time a valid entry level is reached in my system ?

2. Enter trade only if SPY is not withing 5 points below resistance at the time a valid entry level is reached in my system ?Resistance is defined as two sets of peaks on daily charts.
 
If it helps, I'd somewhat reluctantly agree with Lluzer
the additional verificaton of the index can help quite significantly in backtest results of mine.
another criteria for me has been relative strength to the index. im only interested in positive relative strength if long and vice versa short
hope it helps
 
If it helps, I'd somewhat reluctantly agree with Lluzer
the additional verificaton of the index can help quite significantly in backtest results of mine.
another criteria for me has been relative strength to the index. im only interested in positive relative strength if long and vice versa short
hope it helps

It helps knowing someone has backtested this before and it yielded improved results. This isn't the first time this particular advise has been given to me, so I will more thoroughly investigate it this time around...I think last time I looked at it I wasn't automating, so fairly difficult to properly test things out.

I think the basis of the system I am looking at addresses the relative strength, as I am only looking at strongly trending up stocks (for long entries). I would imagine that will by default make them have positive relative strength to the index. Something to consider for other systems though for sure.

Thanks for the comments!
 
It helps knowing someone has backtested this before and it yielded improved results. This isn't the first time this particular advise has been given to me, so I will more thoroughly investigate it this time around...I think last time I looked at it I wasn't automating, so fairly difficult to properly test things out.

I think the basis of the system I am looking at addresses the relative strength, as I am only looking at strongly trending up stocks (for long entries). I would imagine that will by default make them have positive relative strength to the index. Something to consider for other systems though for sure.

Thanks for the comments!

ok, but if you do get the chance for relative strength, i'd at least try it
I only trend trade, and the first criteria is the index is also in an uptrend, but i often find some are relatively trending better than the index and that has added sometimes 5% on a hit rate
and lastly (apologies for not mentioning) higher timeframe confirmation
I don't have the backtesting capability for industry sector as confirmation. if i did that would also be a factor, and quite a major one (if only I could!)
 
Simulation 06/06/2017

SPY - for context


UL


Entry: $56.18
EOD Exit: $56.27
Net: +0.223%

NEE


Entry: $141.83
EOD Exit: $142.04
Net: +0.352%

YUMC


Entry: $40.41
PT Exit: $40.97
Net: +0.956%

G


Entry: $27.46
SL Exit: $27.30
Net: -1.292%

BSFT


Entry: $41.55
Exit: $41.40
Net: -0.377%

Day net: -0.138%


General notes: Pretty clear and no real surprise to me that a second sell need to be coded into the system to lock in profits. Generally when developing systems I leave the criteria pretty loose initially (such as target profit, stop loss, end of day as is the case with this), and try to tighten it up to improve profitability.

Never really been able to figure out a good way of doing this since what I tend to find is adding complexity through trailing stops based on trade action tends to just ensure you are selling at an inopportune time. My entries for the most part with this seem to be good, but entries are useless since they don't make the money, exits do. Perhaps something along the line of tightening the stop up if the trade stalls at a location in profit would be useful...or not...not really sure since that is always what I try to do and fail to notably improve the system.
 
Simulation 06/07/2017 - no valid trades today

SPY - for context




Backtest - second set of failed trades:

Notes to self: Basic 01 and Basic 02, June 2nd 2016 to June 2nd 2017, 1 minute.

Stop Loss 010


Stop Loss 011


Stop Loss 012


Stop Loss 013


Stop Loss 014


Stop Loss 015


Stop Loss 016


Stop Loss 017


Stop Loss 018


Stop Loss 019


Stop Loss 020


Stop Loss 021


Stop Loss 022


Stop Loss 023
 
Now for a bit of analysis on the backtest failures posted so far:


Stop Loss 001

The day preceding entry:
- No clear intraday trend
- Very low volume
- Trend on daily charts still holding strong

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 3 days - 2 slightly up, 1 slightly down
- Volume appears to be decreasing

Overall thoughts:
Clear and steady upward trend throughout, no clear indication of the upward trend being broken. Entry matches the overall systems intent.

Other notes:
A few days after the trend breaks, a fairly significant gap up occurs and then the stock begins trading flat.


Stop Loss 002

The day preceding entry:
- Clear uptrend
- Fairly low volume
- Trend on daily charts appears to have been broken or at the very least the slope of the trend has decreased significantly

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 1 day - slightly up
- Volume appears to have died off completely from the trend volume

Overall thoughts:
Initial impulse up steadily tapering off to an essentially flat trading region by the time the signal is generated. Fairly clear indication the trend has broken and entry does not match overall intent of system.

Other notes:
The trend never completely breaks down, after trading flat for a while another impulse upwards occurs.


Stop Loss 003

The day preceding entry:
- Clear uptrend
- Fairly low volume
- Trend on daily charts appears to be continuing when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 3 days
- Days with clear downtrend (open near high, close near low): 2 days
- Days with no trend (close near open): 0 day
- Volume appears to be relatively low

Overall thoughts:
The trend generate from this one, although present, is somewhat erratic. The intent of this system is not to enter in trends that are re-establishing themselves, but enter in trends that are extremely obvious and ongoing. Thus this signal does not match the intent of the system since the upward trend was broken and was trading flat prior to the signal being generated.

Other notes:
The stock trades flat beyond this point.


Stop Loss 004

The day preceding entry:
- Uptrend, although closed about midbar
- High volume
- Trend on daily charts appears to be intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 1 day
- Volume appears to be increasing

Overall thoughts:
This trend began with an initial impulse up which turned into a fairly steady increasing trend. The signal generated for this trade matches the intent of the system.

Other notes:
The steady trend up continues well beyond this point.


Stop Loss 005

The day preceding entry:
- Fairly clear downtrend
- Moderately low volume
- Trend on daily charts appears to be broken

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 0 days
- Days with clear downtrend (open near high, close near low): 3 day
- Days with no trend (close near open): 0 day
- Volume appears to have died off after very high volume day with clear downtrend near the apparent end of the trend

Overall thoughts:
This trend began with an initial impulse up which turned into a fairly steady increasing trend. The trend appears to have been broken in the immediate lead-up to the signals as indicated by a flat trading region. The signal generated for this trade does not match with the intent of the system.

Other notes:
The stock trades up beyond the failed trade day and then quickly falls back down to the level it was trading at prior to the failed trade day. It then continues trading flat/slightly downwards.


Stop Loss 006

The day preceding entry:
- Uptrend although opens near midbar
- Average to low volume
- Trend on daily charts appears to be intact

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 day
- Days with no trend (close near open): 1 day
- Volume appears to be holding fairly steady

Overall thoughts:
This trend has been holding steady for a fairly long time and is still holding on the signal day. This trade matches the intent of the system.

Other notes:
This failed trade marks the break in the trend. The stock trades flat beyond this point.


Stop Loss 007

The day preceding entry:
- Clear downtrend
- Very low volume
- Trend on daily charts appears to be intact

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 1 day
- Volume is somewhat erratic but appears to be dropping slightly.

Overall thoughts:
This trend has been holding steady for a fairly long time and is still holding on the signal day. This trade matches the intent of the system.

Other notes:
Not enough data beyond this point to establish if the uptrend has broken completely. The stock does appear to be trading sideways, or at a reduced slope upwards now though.


Stop Loss 008

The day preceding entry:
- Fairly clear uptrend
- Fairly low volume
- Trend on daily charts appears to be reducing in slope

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 day
- Days with no trend (close near open): 2 day
- Volume is somewhat erratic but appears to be dropping

Overall thoughts:
This trend, although clear, has a fairly low slope and appears to be leveling off on the signal day. Although this is the case, this signal matches the intent of the system as it would be difficult to rule this one out.

Other notes:
Stock begins trading more erratic beyond this point, but continues upwards.


Stop Loss 009

The day preceding entry:
- Upwards but not a clear trend
- Fairly high volume
- Trend on daily charts appears to be intact

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 day
- Days with no trend (close near open): 1 day
- Volume is somewhat erratic but appears to be holding fairly steady

Overall thoughts:
A long term upwards trend was broken, but a new continuation of the upwards trend is well established by the time the signal is generated. This signal matches the intent of the system since a secondary trend is well established.

Other notes:
This failed trade marks the break in the trend as the stock trades sideways beyond this point.
 
Simulation 06/08/2017

SPY - for context



NI


Entry: $26.37
SL Exit: $26.22
Net: -1.170%

AEP


Entry: $72.53
SL Exit: $72.14
Net: -1.074%

YUMC


Entry: $41.86
SL Exit: $41.19
Net: -1.035%

PM


Entry: $121.79
SL Exit: $121.21
Net: -1.026%

FCPT


Entry: $25.42
SL Exit: $25.24
Net: -1.152%

Day net: -5.457%


Well, it was bound to happen eventually. Complete system blow up, although looking back at the signals I probably would have tossed 3 of these since they didn't really match with the system intent (NI, FCPT, AEP), and then YUMC is trading below the $50 floor I am planning on implementing, so at least there is that.
 
Backtest - second set of successful trades:

Notes to self: Basic 01 and Basic 02, June 2nd 2016 to June 2nd 2017, 1 minute.

Profit Target 008


Profit Target 009


Profit Target 010


Profit Target 011


Profit Target 012


Profit Target 013


Profit Target 014


Profit Target 015


Profit Target 016


Profit Target 017


Profit Target 018


Profit Target 019


Profit Target 020


Profit Target 021


Profit Target 022


Profit Target 023


Profit Target 024


Profit Target 025


Profit Target 026


Profit Target 027


Profit Target 028
 
Simulation 06/09/2017 - no valid trades today

SPY - for context




Backtest - third set of failed trades:

Notes to self: Basic 05 and Basic 06, June 2nd 2016 to June 2nd 2017, 1 minute.

Stop Loss 024


Stop Loss 025


Stop Loss 026


Stop Loss 027


Stop Loss 028


Stop Loss 029


Stop Loss 030


Stop Loss 031


Stop Loss 032


Stop Loss 033


Stop Loss 034
 
Backtest - third set of successful trades:

Notes to self: Basic 05 and Basic 06, June 2nd 2016 to June 2nd 2017, 1 minute.

Profit Target 029


Profit Target 030


Profit Target 031


Profit Target 032


Profit Target 033


Profit Target 034


Profit Target 035


Profit Target 036


Profit Target 037


Profit Target 038


Profit Target 039


Profit Target 040


Profit Target 041


Profit Target 042
 
More analysis on the backtest failures posted so far:


Stop Loss 010

The day preceding entry:
- No clear trend
- Moderately low volume
- Trend on daily charts appears to be broken as stock has been trading flat the past few days

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 2 days - both slightly down intraday
- Volume appears to be decreasing

Overall thoughts:
Upward trend appears to have been broken 5 days prior to entry as stock has been trading flat since then. Entry does not match the overall systems intent.

Other notes:
Stock continues trading flat for a while.


Stop Loss 011

The day preceding entry:
- No clear trend
- Moderate volume
- Trend on daily charts appears to be intact

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 3 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 2 days
- Volume appears to be holding fairly steady

Overall thoughts:
Trend appears to be holding steady perhaps even increasing in slope slightly at the signal day. Entry signal matches the intent of the system.

Other notes:
The stock begins trading somewhat erratically beyond this point continuing up overall for a bit before having a significant gap down.


Stop Loss 012

The day preceding entry:
- Up - day ending midbar
- Low volume
- Trend on daily charts appears to be continuing when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 3 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 0 days
- Volume appears to be decreasing

Overall thoughts:
The trend for this one is fairly steady up until it reaches near the signal day. There is an impulse up which slightly tapers off just before the signal, but the trend is still indicating upwards momentum so this trade matches the system intent.

Other notes:
The trade day marks the end of the trend. A slight downward trend follows immediately afterward followed by an erratic upwards trend.


Stop Loss 013

The day preceding entry:
- Clear uptrend
- Low volume
- Trend on daily charts appears to be intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 3 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 0 days
- Volume appears to be decreasing

Overall thoughts:
This trend began with an initial impulse up which turned into a fairly steady increasing trend. The signal generated for this trade matches the intent of the system.

Other notes:
The trend breaks beyond this point and the stock trades flat and then down.


Stop Loss 014

The day preceding entry:
- Up, opening near midbar
- Moderate volume
- Trend on daily charts appears to be intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 1 day
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 0 days
- Volume appears to be increasing

Overall thoughts:
This trend began with a slightly steeper slope than it has when the signal is generated however the signal matches the intent of the system.

Other notes:
A new uptrend with a greatly reduced slope continues beyond this point eventually ending in a large gap down.


Stop Loss 015

The day preceding entry:
- No major trend, but overall intraday is up
- High volume
- Trend on daily charts appears to be intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 3 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 0 days
- Volume appears to be increasing

Overall thoughts:
This uptrend began with a gap up and then a fairly steady slope. The trend paused and then re-established itself. The secondary trend has established by the day the signal occurs so the trade matches the intent of the system.

Other notes:
This trade day marks the end of the trend up. The stock trades erratically and overall flat beyond this point.


Stop Loss 016

The day preceding entry:
- Clear uptrend
- High volume
- Trend on daily charts appears to have just re-established itself when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 2 days
- Volume appears to be increasing

Overall thoughts:
This uptrend has had a fairly steady slope for a long time prior to the signal, however immediately before the signal the steady slope is broken and the stock trades flat/slightly down for a while. The trend appears to have re-established itself the day the signal is generated by making a new high above the previous trend high. It is not clear that the trend is re-established so this signal does not match the intent of the system.

Other notes:
The stock trades overall fairly flat but slightly up beyond this point.


Stop Loss 017

The day preceding entry:
- Up but not a clear trend
- Moderate volume
- Trend on daily charts appears to have been broken a while before signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 0 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 0 days
- Volume appears to be holding fairly steady

Overall thoughts:
This uptrend had a fairly steady slope gradually tapering into a flat region. This flat region has been present for 5 days prior to the signal being generated. so the signal does not match the intent of the system.

Other notes:
The stock trades overall fairly flat but slightly up beyond this point eventually ending with a large gap down.


Stop Loss 018

The day preceding entry:
- Clear uptrend
- Very low volume
- Trend on daily charts unclear when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 1 day
- Volume appears to have dropped off completely from the trend volume

Overall thoughts:
This uptrend had a fairly steady slope gradually increasing until an eventual gap up right before the signal was generated. No clear trend was established after the gap up, so the signal does not match the intent of the system.

Other notes:
The stock trades slightly down and then back up beyond this point


Stop Loss 019

The day preceding entry:
- Downtrend
- Very high volume
- Trend on daily charts appears broken when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 0 days
- Volume is fairly erratic and has no clear pattern

Overall thoughts:
This uptrend had a fairly steady slope gradually increasing until a bit before the signal day when the trend became extremely steady. However, just before the signal day there was a fairly clear break in the trend, so the signal does not match the intent of the system.

Other notes:
The stock drops slightly and then re-establishes the initial trend upwards beyond this point.


Stop Loss 020

The day preceding entry:
- Clear uptrend
- Moderately low volume
- Trend on daily charts appears intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 3 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 2 days
- Volume appears to be holding fairly steady

Overall thoughts:
This uptrend had a fairly steady slope and is well established, so the signal matches the intent of the system.

Other notes:
This stock has a substantial gap up two days after the failed trade day.


Stop Loss 021

The day preceding entry:
- Clear downtrend
- Extremely low volume
- Trend on daily charts appears intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 1 day
- Volume appears to be holding fairly steady until the signal day when it dropped to an absurdly low level

Overall thoughts:
This uptrend began with a steady slope followed by an impulse up and re-establishing the steady trend. This signal matches the intent of the system.

Other notes:
This stock trades fairly erratically and overall flat beyond this point.


Stop Loss 022

The day preceding entry:
- Clear uptrend
- Low volume
- Trend on daily charts appears intact when signal is generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 2 days
- Days with clear downtrend (open near high, close near low): 0 days
- Days with no trend (close near open): 1 day
- Volume appears to be decreasing

Overall thoughts:
This uptrend is well established and extremely steady. This signal matches the intent of the system.

Other notes:
Not enough data beyond this point to know how the stock trades although this failed trade appears to be the day the uptrend broke.


Stop Loss 023

The day preceding entry:
- Down but no clear trend
- Very low volume
- Trend on daily charts appears broken well before the day the signal was generated

For the 5 days preceding entry:
- Days with clear uptrend (open near low, close near high): 0 days
- Days with clear downtrend (open near high, close near low): 1 day
- Days with no trend (close near open): 4 days
- Volume appears to have died off completely from the trend volume

Overall thoughts:
This uptrend started fairly steady and eventually tapered off into a flat trading region. The signal was generated well into this flat trading region and does not match the intent of the system.

Other notes:
Stock trades flat for a good amount of time beyond this failed trade and then begins to re-establish an uptrend.



This probably marks the end of my in-depth analysis of the stop losses. I am going to go back through my summaries to see if there are any commonalities and will likely just tabulate the remainder.
 
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?
 
Last edited:
So, my backtest run on the v0.04 system (SPY must be positive at time of entry) as well as my initial analysis of it is now complete.

Notes to self:
- System version: 0.04
- 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.04 system: SPY must be above the close of the previous day at time of entry.
- Trades in backtest period with no filters: 503 (63% of the v0.03 system)
- Commissions $0.01/share per trade
- Price must pass through limit order to consider it executed in backtest

The unmodified (SPY filter only) per trade normalized:



Similar to the initial run in that it is completely impossible to trade, however it does end positive rather than break even. As a general summary, of the 7 backtest runs, 6 yielded improved results (net profit), and 1 yielded worse results. This is illustrated quite well in the above graph by the positive end result.

The unmodified (SPY filter only) per day normalized:



Overall a slight improvement over the v0.03 system in my opinion since the max peak to valley DD on this one is around 400% which is slightly more manageable. Overall net is slightly reduced when compared to the v0.03. Still a bit too mediocre with a low net/DD. Not something I would be likely to bother trading.




Looking at the same filters - the entry time filter results were:



A fairly substantial improvement on the immediate entries, and overall improvements on most entry time frames. For this iteration it still appears to be most beneficial to limit entries to the first five minutes of the day though. The per day risk normalized results of this were:



This has a very nice max DD of 200% the daily risk...hard to get much lower than that in my opinion. The overall net result is reduced fairly substantially though to 1600% daily risk vs. ~ 2000% daily risk.




For the stock price filter:



There is an identical max benefit for cumulative results when a $50.00 stock price floor is set.



Likewise, very similar results with the per trade normalized results, showing the per trade net leveling off around the $80.00 level. The sample size gets quite small at above $100 in this set (less than 100 instances) which may account for the slight drop off.

The per day normalized results of the stock price filter:



The DD of this one is essentially the same as in the v0.03 system, overall the net is lower though.




For the combined stock price floor and entry time filter results:



This yields an absurdly low DD of 175% of the daily risk but with a cost of a fairly substantially lower net of 1750% the daily risk.

The plot of SPY with the trade days for the v0.04 system with both filters applied is:



Overall, quite sparse, but with 3 filters in place...not surprising at all really.




Finally, as a direct comparison between the v0.03 and v0.04 systems:

For equal risk each trade:



Interesting to note that the max DD in the v0.04 system for this one is just 500% of the per trade risk. In my opinion, that is a completely acceptable DD. Overall the SPY filter system yields better results when the market is flat/trending down. This result is not all that surprising.

For equal risk each day:



Similar to the per trade risk, the addition of the SPY filter performs better when the market is flat/slightly down, but suffers quite substantially when the market is trending up.




So, my overall takeaway from this is that perhaps the addition of the "SPY must be trading above the close of previous day" entry filter is not the best for this system. As can be seen from my v0.03 analysis, the basic stock selection filter I have for the system appears to already do a good job of limiting trading during the market going sideways or down.

However, I do believe that the SPY being positive at the time my entry signal is generated can be used to increase risk on the trade, and additionally, if it is negative at the time the signal is generated, reduce the risk on the trade. So, perhaps not useful in this case as a absolute filter, but more a filter to adjust the risk taken.




I am in the process of running some out of sample backtests now (different time period) to see if the results still hold or if, by creating the filters the way I did, I have simply over-fit the data.
 
Out of sample testing complete!

Notes to self:
- System version: 0.03
- Backtest dates: June 30th 2015 to June 30th 2016
- 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: 343
- Commissions $0.01/share per trade
- Price must pass through limit order to consider it executed in backtest

Skipping to the results with the absolute filters I plan on using:

Per trade normalized results:



Per day normalized results:



Overall, a rather meager 500% daily risk cumulative net at the end. However, when you see what SPY did over the course of this test period:



The overall results start to look quite a bit better. Quite literally SPY ended at the same point it started at with this backtest (overall was down 0.47% from the start of the test period). What is more impressive to me is how well the system stayed out of the large drops. When comparing the out of sample results to the in sample results, for me, it becomes pretty clear that the filters I developed are not overfitting the data set I used to develop them, and should remain valid.



Naturally the time in market is much less since there were several drops in the market over the out of sample period (the one just shown above). However, the % positive days is fairly comparable, as well as, surprisingly to me, the max DD. The net gain per unit risk is quite significantly lower, but I believe this is simply due to a more volatile market than anything else.

So...I guess at this point, there really isn't any reason I can see to hold off on a live trial run of this strategy. I am going to be developing how I will determine the risk to use on each trade as well as try and get a handle on how many trades I can expect to enter for the number of signals I have each day.

I also hope to do a few selective backtests using a 15 second resolution. My past experience has shown that going from a 1 minute resolution to a 15 second resolution in a system such as this tends to yield a fairly substantial positive impact. This is because it allows entries during the first minute that were missed by the lower resolution test. I have found in live testing that these are the ones more likely to be missed or partially filled since they tend to occur on spikes down, but overall do tend to improve the live system as well.

If I am able to get through those items over the weekend, I will bring this live on Monday. Then I will begin to find out if I just wasted a huge amount of time...still certainly have more to look at with this one, but there will always be ways to tweak systems and if you spend all your time in trial mode, you will never make any green (won't lose any either though I suppose).
 
Last edited:
Top