Is that a GO or a NOGO?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"; } '
and my oversimplified simulation has 17 out of 20 cases with 5 or more consecutive losses in 100 simulated trades, it's a little ...If this condition is not met, say the wins fall to 5, the contract nullifies and no payment will be released.
I trade risk = reward all day. All I need is +52 win rate to he profitable on the year.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)
I am sorry for the late reply. But i didnt understand what your variables were representing. "result" "maxresult" "drawdown".Given the requirement,
and my oversimplified simulation has 17 out of 20 cases with 5 or more consecutive losses in 100 simulated trades, it's a little ...
View attachment 263792
shaky.
I know this doesn't really matter for the simulation, but you can't really have a bell curve with just two values ... -1 and 1 ... correct? It would be a uniform distribution. Or am I missing something.and whether a trade wins or loses is normally distributed.
To simulate a 60% win rate, the script uses a Gaussian distribution. A more common solution is generating random numbers uniformly distributed over [0,1], and then applying the "is random number < 0.6" test.I know this doesn't really matter for the simulation, but you can't really have a bell curve with just two values ... -1 and 1 ... correct? It would be a uniform distribution. Or am I missing something.
Thank you. Which method do you guess/know to be, generally, more performant?To simulate a 60% win rate, the script uses a Gaussian distribution. A more common solution is generating random numbers uniformly distributed over [0,1], and then applying the "is random number < 0.6" test.
So it's not the result (-1 or 1) that is normally distributed, but rather the random numbers used in the simulation.