I wrote a bot and gave it 25k to trade

Discussion in 'Automated Trading' started by _terminus_, Feb 23, 2020.

  1. _terminus_

    _terminus_

    I set it up live on November 2019, these are the results so far.

    return.jpg
    It trades 3 contracts of MNQ.

    This is a backtest (green) for the last three years up to January 2020, vs the index (blue).

    bt_3_years.jpg
    The last months have been in a strong uptrend, so I could've been just lucky. On the other hand the bot made more than 140 trades, each spanning from a few minutes to a few hours. The probability of having chosen bad trades was not negligible.
    To verify that, I ran two Montecarlo simulations, the first on the above backtest, the second on a test system that opened the same number of trades, with the same distribution of duration, but at random times. The upper cloud refers to the backtested system, the lower is the random entry:

    mc.jpg

    In other words by doing short-lived, intraday trades at random, the chances of producing a profit are very low. The same is better shown by the percentile rank of the above curves:

    perc.jpg
    The median of the random entry (green) shows a profit of 2.500, but there is a significant chance of loss. The red line is the actual (backtested) system.

    I'm aware that the real test is still to come, three months are just too little. If nothing else, the software infrastructure is running smoothly. The systems runs completely unattended on a dedicated computer (I light candles on it and treat it with deference). It writes a web page for remote monitoring from my cellphone and sends me Telegram messages any time it opens/closes a trade.

    I will post more on how it's doing.
     
    nwoptions, treeman, Poljot and 12 others like this.
  2. traider

    traider

    Why backtest only 3 years? There's tons of data for NQ. You overfitted it to just the last 3 years?
     
  3. d08

    d08

    WL4 is alive and kicking it seems. It would be interesting to see the performance in a downmarket.
     
    congrats likes this.
  4. I agree, backtest 20+ years and use similar symbols and etfs as well... don’t be cheap with buying data

    use real life slippage and then 4-5 times normal slippage

    try to break your system

    still beats the index? you are good to go
     
  5. tommcginnis

    tommcginnis

    Sweet! Nice job. Nice {skeptical} approach to things.
    Looking forward to future reports.

    Just a guess, btw, but I'll bet your pick/algo is tremendously simple? Heh!
     
    _terminus_ and gkishot like this.
  6. Cuddles

    Cuddles

    Good to see it made steady progress through that 2018 downturn. What language is this written on?
     
    _terminus_ and murray t turtle like this.
  7. Are you doing tick-by-tick backtesting? I found that some backtesting algorithms can give results that are pretty far from real-life trading.

    I don't necessarily agree with having to backtest 20+ years. Market's change fundamentally over time, and whether your algo worked in 1992 is irrelevant to whether it works today. Unless you trade really long timeframes.
     
    Ironplates, piezoe, VPhantom and 4 others like this.
  8. southall

    southall

    [​IMG]

    I noticed when the blue line goes down a lot the green equity tends to go sideways.
    Like the system stops trading when the NDX is in a correction.
     
    tommcginnis, _terminus_ and Sekiyo like this.
  9. Trader200K

    Trader200K

    Terminus,

    I am interested in the “stable” products you used to construct your bot.

    Can you give us a high level view of the software infrastructure products in play here and how it is interfaced at IB?

    Kudos!

    T
     
    Colleague and _terminus_ like this.
  10. %%
    He may do well, because it seems to handle a major trend change[bull to bear+ back to bull uptrend again, OCT- DEC 2018......]SO while normaly, that would be NOT enough data; in that case it most likely is; including a slop chop=summer.
    Nasdaq/QQQ is one of the better trenders.Most with real money start with cash, or 1 [one] contract, but one trader blew up his account 6 times, so to each his own...………………………………………………………………………………………. So sure try different ETFs; but don't be surprised IF Nasdaq/QQQ is a top trender
     
    #10     Feb 23, 2020