Start investing in Bitcoin with Pix, in a few minutesSponsoredOpen free account
Trading

Math expectation calculator

How much is each trade worth in the long term, after the costs, and if your results already prove that the strategy has an advantage.

Math expectation calculator

Calculate how much each trade is worth on average, with costs, from its averages or by pasting the list of real results.

By Boletim Bitcoin newsroom

. 6 min reading.

In short: Mathematical expectation tells how much each trade is worth on average in the long run: hit rate times average gain, less error rate times average loss, less costs. If it is positive, the strategy has an advantage; If it is negative, operating more only increases the damage. The calculator does the math by means of averages or with its actual list of results, including confidence interval.

What is mathematical expectation in trading

In the statistics, the expected value is the weighted average of all possible outcomes, each multiplied by its probability. In trading, the possible outcomes are simplified into two groups, gains and losses, and the expectation turns the average of how much you earn or lose per operation, considering how often each thing happens.

It is the most important number of a strategy. High hit rate, beautiful graphics and memorable trades don't matter if the expectation is negative. And a strategy that hits little can be excellent if the expectation is clearly positive after the costs.

math expectation calculator
Image: Pexels (free license)

The formula

By averages, the expectation per trade is: E = hit x average gain minus (1 minus hit) x average loss minus average cost. Dividing and by the average loss, you have the expectation in R, useful for comparing strategies with different sizes. And the minimum hit rate to tie, already with costs, is (average loss + cost) / (average gain + average loss).

Example with standard numbers

With 45% hit, average gain of 180, average loss of 100 and cost of 5 per trade: E = 0.45 x 180 minus 0.55 x 100 minus 5 = 81 minus 55 minus 5 = 21 per trade. In R, 21 / 100 = 0.21r. With 20 trades per month, the expectation is 420 per month. The minimum settlement rate with costs is (100 + 5) / (180 + 100) = 37.5%.

Notice the weight of the cost. Without it, the gross advantage would be 26 per trade; The 5 cost consumes about 19% of it. in short target strategies such as scalping, this slice can pass halfway.

HitAverage gainAverage lossCostExpectancy
45%1801005+21
45%1801000+26
60%601005-9
35%2501005+17,5
50%1001005-5

The 60% hit line shows the classic trap: it hits a lot, but earns less than it loses, and the result is negative. The last line shows that a neutral strategy, 50% and payoff 1, becomes a loser just because of the costs.

Know how much each trade costsBefore operating, check trading and funding fees and put that cost on the calculator.Open free account

List mode: Using your actual results

On the By List of Results, paste the results of each trade, one per line, with negative losses. can come from your trade diary, the brokerage report or a backtest. The calculator shows average, hit rate, payoff, standard deviation, and a histogram of the results.

The most useful point is the 95% range. The average calculated with few trades is just an estimate of the true expectation. The standard error of this estimate is the standard deviation divided by the root of the number of trades, and the approximate range goes from the average minus 1.96 standard error to the mean plus 1.96 standard error. If the range includes zero, you still have no evidence that the strategy is profitable, even if the average is positive.

Tip: The example list has 15 trades with a positive average, but the interval crosses the zero. This is the typical case of those who get excited about the first few weeks. Continue recording before increasing the size.

Reading the example list

The list that already comes in the field has 15 trades, with a total result of 400, an average of 26.67 per trade, 46.7% hit and payoff of 1.87. It looks like a winning strategy. But the standard deviation is 126.25, almost five times the average, and the 95% range goes from about 37 to 91. zero.

How to improve expectations

  • Cut costs: Less operations, limited orders when it makes sense and attention to funding.
  • Respect the stop: Losses greater than planned overturn the average loss and expectation.
  • Let the gains run within the plan: Leaving too early reduces the average earnings.
  • Eliminate bad setups: With the diary, find out which types of trade have a negative expectation and stop doing them.
  • Reduce the size while the sample is small: Risking little per trade gives time to gather data without compromising capital.

Costs that need to enter the account

  • Trading fees at the entrance and exit. See how they work in the guide BingX fees.
  • Spread and slippage, the difference between the price you see and the price executed.
  • Funding in perpetual contracts held for several hours, explained in the funding rate.
  • Performance rate In Copy Trading, when part of the profit goes to the copied trader.
  • Taxes on the gains, which reduce the net result.

To calculate the net result of a specific operation, use the crypto profit calculator.

Positive expectation is no guarantee

Expectations are long-term average. In any short sequence, the result can be far below it, and loss sequences happen even in good strategies. The Loss Sequence Simulator Shows the possible dispersion in hundreds of trades.

In addition, the expectations measured in the past may not be repeated. parameters that are too adjusted to the data create expectations that disappear live, the problem of overfitting. And even a real advantage can be destroyed by excessive risk per operation; The Kelly's criterion Show why. For the simple relationship between settlement and payoff, without cash values, use the Win Rate and Payoff Calculator. The set of these rules forms the Risk Management in Trading.

Warning: No calculator turns a strategy into guaranteed profit. Trading involves high risk, including total capital loss, especially with leverage.
Operate only what has proven advantageMeasure, register and calculate before risking more. Start with small values.Start now

Transparency: The Boletim Bitcoin can receive commission for registrations made through BingX's links, at no extra cost for you. That doesn't change what we write about risks and costs.

Frequently asked questions

What is mathematical expectation in trading?

It's how much each trade yields on average in the long run: hit times average gain, less error rate times average loss, less costs.

What expectations are good?

Any clearly positive value after costs, measured in many trades. Comparing in R helps to evaluate strategies of different sizes.

How many trades do I need to trust the expectation?

It depends on the dispersion of the results. Use List mode: When the 95% range fails to include zero, the evidence becomes more solid.

Why was the real expectation lower than the calculated one?

Underestimated costs, slippage, market change, or parameters too adjusted to the past are the most common causes.

Are expectation and payoff the same thing?

No. Payoff is the ratio between average gain and loss. The expectation combines payoff, hit rate and costs in a single number.

References

  1. Wikipedia: Expected Value
  2. Wikipedia: Standard Error (mean standard error)
  3. Chart.js: Official Documentation
  • calculator
  • math expectation
  • trading statistics
  • risk management
  • tool

This content is informative and is not an investment recommendation. found an error? Write to contato@boletimbitcoin.com.

Read also

Trading

Pivot point calculator

Calculate Pivot Points Traditional, Classic, Fibonacci, Woodie and Camarilla with maximum, minimum and closing. Pull the data from yesterday's BTC. Free and online.

Trading

Win Rate and Payoff Calculator

Find out if your hit rate and payoff make a profit: expectation in r, minimum settling to draw, combination map and cost effect. Free and online.

Start in crypto today

Open your free account, deposit with PIX and access Spot, Futures, Copy Trading and Trading Robots in one app.

  • Easy deposits
  • Copy trading
  • Grid and DCA bots
  • All-in-one app
Advertising. Crypto involves risk, invest responsibly.
Create free account