• Australian (ASX) Stock Market Forum

Hello and welcome to Aussie Stock Forums!

To gain full access you must register. Registration is free and takes only a few seconds to complete.

Already a member? Log in here.

US Trend following system portfolio (Hypothetical)

Discussion in 'Trading Diaries and Journals' started by jjbinks, Apr 22, 2019.

  1. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    @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.
     
  2. peter2

    peter2

    Posts:
    3,633
    Likes Received:
    5,813
    Joined:
    Jan 12, 2008
    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).
     
    jjbinks likes this.
  3. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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
     
    peter2 likes this.
  4. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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
     
    qldfrog, peter2 and Skate like this.
  5. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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.

    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
     
    Skate likes this.
  6. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    upload_2019-6-30_16-27-9.png

    upload_2019-6-30_16-27-20.png

    Currently portfolio is almost completely invested. (Room for 2 more trades!)
     
    peter2 and Skate like this.
  7. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    Portfolio finally making some gains in what was a good week overall for the russell 3000

    upload_2019-7-7_18-26-53.png

    upload_2019-7-7_18-37-42.png
     

    Attached Files:

  8. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    Portfolio down 1% this week following the russel 3000 after a couple of good weeks.
    No new trades recently although cash for more positions.

    upload_2019-7-20_20-25-7.png
     
    peter2, Newt and Skate like this.
  9. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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%
     

    Attached Files:

  10. Newt

    Newt

    Posts:
    453
    Likes Received:
    603
    Joined:
    Oct 17, 2012
    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".
     
  11. Newt

    Newt

    Posts:
    453
    Likes Received:
    603
    Joined:
    Oct 17, 2012
    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:
     
    qldfrog and Skate like this.
  12. rnr

    rnr

    Posts:
    487
    Likes Received:
    226
    Joined:
    Jul 1, 2007
    Hmm, given the deep purple colour of the emoticon I'm tipping a good mature red, rather than turps. ;)
     
    jjbinks, Skate, qldfrog and 1 other person like this.
  13. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    upload_2019-7-28_21-20-34.png
    Portfolio tracking along with the Russell 3000.
    90% invested at this stage but now new trades recently.

    Been busy this weekend but may be more of an update next weekend. :)
     
    debtfree, rnr, peter2 and 3 others like this.
  14. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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.
     
    qldfrog, Cam019, peter2 and 1 other person like this.
  15. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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 )
     
    peter2, Newt and Skate like this.
  16. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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
     
    qldfrog, Skate, Newt and 2 others like this.
  17. Newt

    Newt

    Posts:
    453
    Likes Received:
    603
    Joined:
    Oct 17, 2012
    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.
     
    qldfrog and Skate like this.
  18. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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)
     
    Skate likes this.
  19. Newt

    Newt

    Posts:
    453
    Likes Received:
    603
    Joined:
    Oct 17, 2012
    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.
     
    qldfrog and Skate like this.
  20. jjbinks

    jjbinks

    Posts:
    290
    Likes Received:
    253
    Joined:
    May 14, 2013
    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.
     

    Attached Files:

    peter2, Newt and Skate like this.
Loading...

Share This Page