rectangleThe world's leading A.I. powered trading network
PlatformPremiumCompanyContact Us

Trading Tool: Kelly Calculator

Leave a comment

    When you decide to open a trade, you are faced with a lot of decisions at once: some are easy if you have a set strategy (which instrument to trade?), some are harder (where to put the Stop Loss and Take Profit?), but the one that usually becomes the reason traders blow up is the size of the trade. Let’s break down the basics of how trade size affects your bottom line. 

    The size of your trades affects how price movements in the instruments you’re trading correspond to PnL (Profit and Loss). Large trades are impacted heavily by small price swings, which can be either a blessing or a curse – it can result in huge gains, or you can hit a margin call from a tiny price movement, and even a Stop Loss is not guaranteed to save you. Small trades are a lot safer, but limit your gains, wasting your edge. 

    To navigate this trade-off, we’ve created a trading tool that’s based on the Kelly criterion, which is a scientific way to maximize future returns based on your odds (win rate, average win, average loss). It aims to maximize the growth rate of your portfolio in the long run – in other words, it tells you the best trade-off between the long-term risk and potential gains. 

    For those curious to take a peak under the hood, here’s the formula: 

    Optimal Lot Size = Capital * (Win rate * (Average Profit + Average Loss)  Average Loss) / (Average Profit * Average Loss) 


    We took this simple formula, added a lot of useful features and turned it into an easy to use calculator. All you need to do is pick your instrument and Stop Loss and Take Profit – in % of the price or in pips, as well as your trade frequency with that instrument. We will populate the win rate for the chosen instrument, as well as your current equity, but you can customize those as well if you expect them to change.  

    While the Kelly Criterion outputs the optimal bet sizes, real life experience suggests that bets are too largewhich usually leads to very high drawdowns. Moreover, because your real win rate is likely to fluctuate in the future, optimal bet sizes based on past returns are more likely to blow up when a bad streak inevitably comes. For this reason, most experienced traders scale back the formula outputs, to make them more in line with the average person’s risk tolerance, and to account for real-life trading, where odds are always changing (the original formula was mainly used for fixed-odds gambling at a casino).  

By default we divide the results 10x, but you can customize this according to your risk tolerance. 

    The calculator will then show you useful statistics – let’s go over each one. 

  • Pip value per lot is how much a price movement of one pip (the last decimal place of the price) of the chosen instrument will affect your trade profit 
  • Expectancy per trade is the average profit of your trades, if the input win rate and TP/SL hold. The Kelly criterion only works if this value is positive. If you are losing money on average, you need to work on your edge, as you will surely lose money in the long run. 
  • R multiple is the ratio of your loss (risk) to your profit and is simply your SL/TP ratio. Combined with your win rate, this is what decides whether your expectancy will be positive 
  • Kelly lot size is the recommended lot size according to the Kelly criterion. 
  • Optimal lot size is the Kelly lot size scaled back to be more realistic. This is the value you’re looking for. 
  • Optimal bet size is the above value but presented as a fraction of your capital. 
  • Optimal TP/SL shows the profit and loss that would result from the above SL/TP triggering, assuming you’re using the optimal lot size. 

    The tool then runs a Monte Carlo simulation and simulates a year of trading 1000 times.  

    Simulation results include the following metrics – Mean Annualized Performance (average performance per year based on the simulations), Mean Max Drawdown, Mean minimum equity reached (minimum equity in the next year, averaged over all the simulations).  

    Keep in mind that this simulation only considers a single instrument that you chose, so the overall expected performance of your portfolio will be different if you trade other instruments as well.  

    If the expected max drawdown exceeds your tolerance, scale back the risk by decreasing the “Fraction of Kelly” input parameter. 

    For those wanting to take an even deeper dive into the data, the tool also shows Performance and Max Drawdowns histograms, which allow you to get a better picture of the expected performance and drawdown across all simulation runs. 

    It is very easy to get overly optimistic with the input parameters and set the Take Profit too high, or the Stop loss to low. It is very important to remember that when you increase your Take Profit or decrease your Stop Loss, your win rate will suffer. Setting the win rate to a realistic value is key when using this tool. If your parameters are not realistic, the tool will display a warning, at which point you should reconsider your input parameters, as the displayed results will be unachievable. 

    If you are disciplined with the tool and use parameters that you know can hold in practice, it provides a tremendous value and peace of mind that your position sizing is on point and is not holding you back, or leading you towards an inevitable blowup. It can also be a much-needed reality check if your expectancy with the instrument is negative, at which point you should reconsider and improve your strategy before coming back to position sizing. 

PsyQuation Backend is Transitioning to a Faster, Smarter, Better Technology Water Below Zero