Seeking feedback on my rules-based system

Discussion in 'Automated Trading' started by morganpbrown, Apr 12, 2019.

  1. %% NOT all reptiles are extinct. LOL

    Initial impressions looks good;
    what you have to watch out for with UPRO+ you may have noticed it?? When the cash market goes sideways slop chop, say up a SMALL %, for time; UPRO+ related will lose. Cash SPY will make a bit+ dividends.
    UPR0, plenty liquid ,does pay a very small dividend; great YTD gain, on UPRO + related :cool:. Not luck; its called a good uptrend; above 200 dma.
     
    #41     Apr 22, 2019
    morganpbrown likes this.
  2. eurusdzn

    eurusdzn

    I wonder if what you are doing is similar to a retail traders package called Stratasearch?
    It is an indicator , interval optimizer where gazillion combos can be tested and best will float to the top. This is just FYI and in no way critical, as I am not qualified to do so.
     
    #42     Apr 22, 2019
    Van_der_Voort_4 likes this.
  3. Thanks . Here is some of my experience which maybe useful or harmful.
    RSI with 2 day period maybe useful.

    note: RSI(i) means the 2 day period RSI value on the i day.
    Here is a intraday strategy based 2 day period RSI I have tested :
    RSI(i) < 1, get long position ;
    Stop loss -1%;
    RSI(i) > 95, close long position;

    RSI(i-1) > RSI(i-2) && RSI(i-1) > RSI(i) && RSI(i-1) > 97 , let's call point i high point A , A = i;
    RSI(i-1) > RSI(i-2) && RSI(i-1) > RSI(i) && RSI(i-1) > 80 && RSI(i-1) < RSI(A), get short position;
    RSI(i) < 90, close short position.

    I backtested it with AMZN 1 min bars data which is from 2018/1/1 to 2019/4/5 .
    The result is as follows, without considering transaction spread or commission :
    2531 winning trades, 536 losing trades, 600% around profit, turning 1 dollar into 7 dollars.
    With considering transaction spread (0.05% for buying and 0.05% for selling ) and commission, well, the result is around -100% , losing all.

    Here is the result:
    (long / short)entry time -> closure time, entry price -> close price, profit, funds(initial 10000)
    v20180102 09:59:00 -> 20180102 10:05:00, 1181.310 -> 1183.360, -16.399, 9983.601
    v20180102 11:16:00 -> 20180102 11:19:00, 1184.455 -> 1183.590, 6.920, 9990.521
    v20180102 12:08:00 -> 20180102 12:10:00, 1187.670 -> 1187.660, 0.080, 9990.601
    ^20180102 12:39:00 -> 20180102 12:46:00, 1185.315 -> 1186.990, 13.400, 10004.001
    ......
    v20190405 13:25:00 -> 20190405 13:28:00, 1832.300 -> 1831.980, 11.843, 69357.602
    v20190405 13:57:00 -> 20190405 14:00:00, 1834.780 -> 1834.785, -0.185, 69357.414
    ^20190405 14:16:00 -> 20190405 14:32:00, 1833.170 -> 1833.625, 16.833, 69374.250
    v20190405 14:53:00 -> 20190405 14:56:00, 1834.885 -> 1834.895, -0.370, 69373.883

    [​IMG]
     
    Last edited: Apr 23, 2019
    #43     Apr 23, 2019
    morganpbrown likes this.
  4. I'm afraid my logic is inverted relative to yours! I mine data, fine the sweet spots, then intellectually justify them after the fact. Pure "machine learning" people don't have any problem with this whatsoever, but I'm more of a deterministic guy at heart.

    That said, the strategies that my "black box" comes up with DO usually seem to make sense. Below is a profit curve for a particular VIX trade. The indicator is the 10-day past return of the VIX itself. When the indicator declines between 6 and 30% in the past 10 days, I make the trade.

    That makes sense to me - on a 10-day timescale, VIX is inversely correlated with itself. I never would have picked those particular edges for the trade, though.

    upload_2019-4-23_8-44-58.png
     
    #44     Apr 23, 2019
  5. Dunno, but thanks for the heads-up! I'm probably way less experienced than you, so I don't have a good idea of the trading packages out there. I'll take a look. Though it's hard to beat FREE ;-)
     
    #45     Apr 23, 2019
  6. Thanks for pointing this out. Whenever I can, I'm trading the leveraged ETF's (UPRO vs SPY, TVIX vs VIXY, TMF vs IEF, TECL vs QQQ), but I keep hearing the horror stories of these ETF's flash crashing. It makes me very nervous. Could actually be safer to just trade the lower-leverage underlying security on margin!
     
    #46     Apr 23, 2019
    murray t turtle likes this.
  7. Thanks for this, I will dig in deeper to your post later today. RSI is one attribute that I've been too lazy to incorporate into my models, but it's very high on the list. For one, I have a hard time getting a firm definition of RSI itself!
     
    #47     Apr 23, 2019
  8. If you like the leverage than you could also consider to use futures instead of leveraged ETFs.
     
    #48     Apr 23, 2019
    morganpbrown likes this.
  9. Intellectually I understand what you're doing. But my brain screams overfit. I assume you are doing cross-validation but I haven't heard anything about that in this thread yet though my apologies if I missed it.
     
    #49     Apr 23, 2019
  10. The contract size has been off-putting. I started with a whopping $4K in my test account. The lower share prices of the ETFs make it much easier to ramp a position up or down.
     
    #50     Apr 23, 2019