AI and machine learning for short term trades

Discussion in 'Automated Trading' started by arman555, Jul 18, 2021.

  1. arman555

    arman555

    Hello Guys,

    I was extremely curios about AI and ML for day trading. But I could not find any proper answer to it online. Some came with 98% win-rate (obliviously false) and some said that it doesn't work.

    As a final reach I posted the job to a couple of places. Talked to many people with varying backgrounds on this topic who were interested in building a system for me. Anyhow, I have a cyber security background and 5 years experience in trading so I understand how all the scams work and how people can fake it.

    So long story short, in the past I used to tell the programmer when to enter and when to exit in the code.... this time its opposite. Its his software that is telling me when to enter and when to exit. So I made the deliverable "Equal distance of minimum 20 pips 1:1 RR, the TP should be hit before SL 6 out of 10".... If this condition is not met, say the wins fall to 5, the contract nullifies and no payment will be released. He has also agreed to it.

    He is asking for quite a big number for price. However, if algo holds true, it should be able to make more than that before I release his payment.

    I am having trouble figuring out how can this falls apart for me. I am also looking for people if they want to partner up, I live in Toronto and we can meet up in person and discuss in great details. (I am not selling anything here, I just want some help to see any angle of this I might have missed lol)
     
  2. fan27

    fan27

    These are not great stats for a strategy. With a 60% win rate I would be look for something closer to 1:2 (risk/reward) than 1:1.
     
  3. arman555

    arman555


    Thats not all. There is a mathematical approach behind it.... as long as the stats hold true
     
  4. easymon1

    easymon1

    It sounds like you have a strat that stands out in your estimate.
    In Total, How much money would you lose in a worst case scenario?
    Can you handle that?
    What are the odds that it works 80% as well as forcast?
    You Likee?
    What are you waiting for? Let's go find out.
     
  5. fan27

    fan27

    You are not following...the stats are not good. The stats you mentioned do not represent a strategy worth trading.
     
  6. arman555

    arman555

    can you explain a bit more please... like run me down a scenario. Lets say if we take 100 trades of 1:1 RR and win 60 out of 100. What do suggest will be the end result?
     
  7. fan27

    fan27

    Transaction costs (slippage/commissions) will erode your already slim expectancy. I could give you strategies all day long with the stats you mentioned. Try to shoot to something closer to 70% win rate with a 1:1 RR. Of course there are other factors to consider....Sharpe, profit factor, max DD, etc.
     
    cobco likes this.
  8. arman555

    arman555

    PLEASE! Give me that strategy and leave the cost and slippage to me... if your strategy can hold that 60% rate for 1000 trades... i will give you all my profits.
     
  9. ph1l

    ph1l

    Here are results for a simple simulation assuming 60% win rate, no compounding, 1:1 reward-to-risk, no slippage or transaction cost, and whether a trade wins or loses is normally distributed.

    winrate 0.6 reward 1 risk 1 numTrades 100 numruns 20
    run 0 numTrades 100 result 26 maxresult 26 maxdrawdown 7
    run 1 numTrades 100 result 28 maxresult 29 maxdrawdown 5
    run 2 numTrades 100 result 18 maxresult 18 maxdrawdown 4
    run 3 numTrades 100 result 10 maxresult 11 maxdrawdown 7
    run 4 numTrades 100 result 4 maxresult 8 maxdrawdown 5
    run 5 numTrades 100 result 14 maxresult 17 maxdrawdown 8
    run 6 numTrades 100 result 30 maxresult 34 maxdrawdown 4
    run 7 numTrades 100 result 32 maxresult 32 maxdrawdown 4
    run 8 numTrades 100 result 6 maxresult 9 maxdrawdown 12
    run 9 numTrades 100 result 4 maxresult 12 maxdrawdown 10
    run 10 numTrades 100 result 22 maxresult 23 maxdrawdown 8
    run 11 numTrades 100 result 22 maxresult 22 maxdrawdown 5
    run 12 numTrades 100 result 30 maxresult 31 maxdrawdown 8
    run 13 numTrades 100 result 20 maxresult 20 maxdrawdown 5
    run 14 numTrades 100 result 22 maxresult 24 maxdrawdown 5
    run 15 numTrades 100 result 10 maxresult 12 maxdrawdown 7
    run 16 numTrades 100 result 18 maxresult 19 maxdrawdown 5
    run 17 numTrades 100 result 6 maxresult 10 maxdrawdown 7
    run 18 numTrades 100 result 16 maxresult 16 maxdrawdown 9
    run 19 numTrades 100 result 22 maxresult 22 maxdrawdown 5


    Code:
    # simulate trades with a particular win rate, risk, and reward per trade.
    # assumes wins and losses are normally distributed.
    perl -e 'use warnings; use strict; use EasyLanguageObject;
    my $winrate = 0.6;
    my $reward = 1;
    my $risk = 1;
    my $numTrades = 100;
    my $numruns = 20;
    print "winrate $winrate reward $reward risk $risk numTrades $numTrades numruns $numruns\n";
    my $normval = `INVCDF=1 cdf $winrate`;      # inverse cumulative normal distribution
    $normval =~ s/\s+$//; $normval =~ s/.* //;  # second token has value corresponding to winrate
    my $rand = RandomGenerator->new();
    for ( my $run = 0; $run < $numruns; ++$run )
    {
        my $maxresult = 0;
        my $curresult = 0;
        my $maxdd = 0;
    
        for (my $i = 0; $i < $numTrades; ++$i) 
        {
            # if ( $rand->randUnitUniform() <= $winrate )
            if ( $rand->randFloatGaussian() <= $normval )
            {     
                $curresult += $reward;
                if ( $curresult > $maxresult ) { $maxresult = $curresult; }
            }     
            else 
            {   
                $curresult -= $risk;
                my $curdd = $maxresult - $curresult;
                if ($curdd > $maxdd) { $maxdd = $curdd; }
            }     
        }
    
        print "run $run numTrades $numTrades result $curresult maxresult $maxresult maxdrawdown $maxdd\n";
    }
    '
    
     
  10. d08

    d08

    60% win rate or even lower is fine but 1:1 RR in that scenario is not. All the stuff I trade is 57-75% WR but with a profit factor over 1.5 (RR 1:1.5).
    There are exceptions like HFT where the law of large numbers makes it worthwhile.
     
    #10     Jul 19, 2021