Australian (ASX) Stock Market Forum

US Trend following system portfolio (Hypothetical)

@peter2

I looked at backtested 700 trades by the system on russel 3000 over 20 year block.

The median rise from low point prior to buying is 30% (IQR 22-55).
The time from low point to buy is is 12 weeks (IQR 6-20).

When you plot rise from low point, rate of rise or low days there is no correlation with profits.
 
Thanks for posting the FMG chart with your flipper template. My first suggestion would be to test the performance of the first buy signal after a sell signal. Ignore the subsequent buy signals.

I've noticed in some of your US stocks that you've been buying 2nd buy signals as well as 1st.

2nd suggestion: Daily or weekly charts? I know you scan for a close above the trigger each week. The trigger is based on price and when it happens that's the time to buy. I noticed in a few charts that you bought right after a price spike due to a good earnings report. Buying significantly above the +20% trigger level skews your R:R badly. I think you should place a limit, that is the maximum you should pay for a stock after it triggers (eg 25%, or a few % above the flipper trigger price).
 
Hi Peter,

thanks for the suggestions,

1) Removing excess signals - I did explore that early on when designing the flipper and my impression then was that return was poorer after removing extra buys. (That was when testing on XAO). Retesting now shows similar return/draw down
2) Changing code to limit buys to 5% or even 10% of trigger price reduces profitability - looking at trades made by backtester with the system as is. Even if i divide the trades which were 5% or less above initial trigger vs those 10% or above trigger the mean profit per trade is very similar.

I have made a lot of tweaks to this code. Particularly with the buy signals (trying to filter based on volatility). I think it may be worth going back to a very basic code and retesting your suggestions.

The other thing I tried (partially inspired by your other threads) was to try incorporate sector specific filters into trading. So only buy if Index UP and sector index Up. For this I would have to trade SP1500 as I don't have sector indexes for the Russell 3000.

Cheers
J
 
Hi all,

Quick update for the week
Portfolio up 0.6% for the week (0.1% to date) vs 2.14%(2.9% to date) for the Russell 3000

4 new trades lined up for Monday.

Bought and sold ENZ this week. (Actually sold before trail triggered due to error in ordering. I always put in a fixed stop loss when I order and add trail stop the following day. I think I entered the wrong value for the fixed stop loss. )

upload_2019-6-23_13-47-18.png

I am thinking of how to optimise entries. Many of the trades so far seem to drop a few percent before rising again Would be interesting to look at back test results to see if this is more general occurrence. If so may be I should wait for a second signal after 20% rise to confirm buy.

Will do some analysis and post

Cheers
Jj
 
As mentioned I am back to the drawing board.

I've trimmed my flipper code to just the bare minimum and a market filter to test different situations. I using backtester to generate all possible trades and then performing simple statistical analysis of various factors around the time of entry to see there is statistical significant predictors of the price. Backtester produces 20,000 trades and you can add whatever metrics you want and then copy the information to excel or statistical analysis program to investigate.

This is different from optimisation in a few ways. The main difference is you can optimise a parameter (e.g. only buy if close price <10) but you do not know if a 2% improvement in profit is statistically significant or just explained by chance.

For example. This is a plot looks at buy price and profit

upload_2019-6-23_18-0-39.png

I think it is pretty obvious that 1-10 is a sweet spot. Simple statistical testing (e.g. t-test or anova can confirm this).

I looked at a few things
1)Buy price
2)Delaying buy by a few bars post signal and looking at whether price drops are rises in this period
3)Current price relative to 100-period high.

After applying this to the flipper

On SP1500 i get
CAGR - 12% with max DD-28.55% over 1997-2011 period. (Data used from this period for analysis)

I then tested from 2012-now
CAGR - 14% with max DD 12.85%

and if i used a market filter from 2012-now
CAGR-10.91% with max DD 9.29%


Now whats interesting is that if I apply this to all ords results are equivalent (slightly better) but removing the extra conditions I added result in less than 5% chance in profit and draw down and you still have a profitable system.

But if you remove this extra conditions for the SP1500 your profits crash to 0% and drawdown 40%.

I think this adds to what @peter2 mentioned about the us market.

Just for fun I applied that scan (Oct18) over my list of US optionable stocks (3600) and there were 1571 results. At 2 sec/chart it would take me almost an hour to go through. With distractions 2hrs.

This is why setting up trading systems for the US markets are so much more difficult. The number of available stocks is huge. The first task is to reduce the trading universe to a much more manageable number of stocks.

Reducing trading universe is potentially not only important to save time but profit.
On the note of time. The reason I didn't run the analysis on russell 3000 is that it when you also include historical constituents the analysis takes much longer (e.g. 30 seconds vs 90sec). It adds up!

(But a final run of new flipper on russell 3000 from 2012-2019 has CAGR of 13% and maxDD of 19% without filter and 12%/19% with filter on.

I would love if people continue with suggestions and ideas and I will try to test these. These results are weekly and it will be interesting to look at things on a daily basis as well at some point

Cheers
JB
 
Also thought I'd share some results on a daily system largely based on new highs I have been testing on all ords.

I started recording trades for this system late Feb (25th onwards)

These are results so far
upload_2019-7-21_20-3-3.png
I'm not too sure if the big rise and drop from week 10-14 was partially due to typo in spreadsheet for one stock.


What's interesting is that back test shows quite big difference in portfolio equity curve just adjusting starting day by 1-2 days.

1. Portfolio Equity.png
Start 25/2

1. Portfolio Equity.png
Start 26/2

1. Portfolio Equity.png

If i started at start of Feb (2/2/2019)
1. Portfolio Equity.png

Overall this is not an amazing system. Average annual return is 10% with draw down of 30%
 

Attachments

  • upload_2019-7-21_20-4-17.png
    upload_2019-7-21_20-4-17.png
    17.6 KB · Views: 2
I used to worry about how different backtest results could be by just nuging the start data too jjbinks, but it probably makes sense when you consider TF systems have a relatively small number of large winners and missing (or catching) just one of those can have a considerable effect on the equity curve.
There's nothing wrong with wanting to maximise return and reduce variability, but the equity curve is always going to fairly "lumpy".
 
Grrr, I need to slow down my typing.

nuging = nudging
data = date
going to fairly = going to be fairly

Promise I wasn't on the turps last night! :rolleyes:
 
upload_2019-8-4_16-25-57.png

Portfolio continues to largely follow russel 3000. Ahead (although slightly for the first time)
Overall portfolio up 3.3% after 11 weeks) vs russell 3000 which is now 2.34% up since start of this system.

Trading/system development has taken a back seat to other priorities unfortunately. I can't see myself testing/tweaking until late august but definitely have a few ideas to test and report back on hopefully when I have the time.
 
I think i had my colouring on the graph switched last week.
The russell 3000 also had 2-3% fall earlier in the week but recovered to end the week -0.48%
Portfolio was up 0.7%
upload_2019-8-11_15-30-47.png
No new trades this week. (Still 1 position available to fill )
 
Finished quite flat this week.
Small error in data entry last week so was up ~2% last week
~0.2% this week.
Interesting Russell 3000 was down only 1% for the week. Had strong recovery on Friday so hopefully we see XAO follow this on monday. (vs 2.7% decrease for the XAO)

upload_2019-8-18_14-21-47.png
 
What sort of strategy modification did you end up with in the end jjbinks, out of interest? Appreciate you sharing this experiment. I've never found the time or strategy to warrant tackling the US or any other other global market.
 
Modifications
1. Limit price to $1-20 (this was main one)
2. Delay buy for few days to ensure price continues to trend up.
3. Pick stocks trading close to 2 year highs. (this helps reduce DD without market filter)
 
No 3 sounds particularly interesting. Most appreciated - you never know how these ideas can help (or hinder) a strategy. Feels like modern day gold prospecting when something promising comes up after lots of programing/backtesting.
 
upload_2019-8-25_15-18-11.png

End of week 13 since trading started. (That's a quarter of an year .. right?!)

System and russell both down this week.
Currently portfolio 4.9% profit since start (down 0.9% for the week)
Russel 3000 -0.78% for since start of trading period. (down 1.48% for the week)

With the flipper positions tend to be held for a long time. Have only sold one position since starting and that was an error in execution! I suspect if US markets continue to fall portfolio will take a fair hit. (20-30% DD not ruled out)
Time will tell.
 

Attachments

  • upload_2019-8-25_15-17-26.png
    upload_2019-8-25_15-17-26.png
    17.8 KB · Views: 5
Top