I found out that in the context of trading there are at least 3 formulas for calculating Expectancy: Formula 1) Expectancy = (1.0 - AvgWinAmt / AvgLossAmt) * pWin - 1.0 2) Expectancy = AvgWinAmt * pWin - AvgLossAmt * (1.0 - pWin) 3) Expectancy = (AvgWinAmt * pWin + AvgLossAmt * (1.0 - pWin)) / AvgLossAmt where Expectancy: multiplying by 100 gives a pct number AvgWinAmt: $ AvgLossAmt: $, as positive number pWin: probability for win (a number between 0 and 1). BTW: the saying "50:50" means pWin=0.5, not 1.0 Which one is the correct formula for Expectancy? Formulas found at these links: https://www.tradingwithrayner.com/risk-reward-ratio/ https://easycators.com/trade-expectancy-formula/ https://www.iexpats.com/expectancy-ratio/ https://www.dara.trade/blog/2019/10/7/does-your-strategy-has-positive-expectancy https://tradeciety.com/ultimate-math-guide-for-traders https://easylanguagemastery.com/rank-your-trading-system-with-expectancy-score/ https://www.netpicks.com/profit-factor-expectancy/
Fixing typos/bugs: 1) Expectancy = (1.0 + AvgWinAmt / AvgLossAmt) * pWin - 1.0 2) Expectancy = (AvgWinAmt * pWin - AvgLossAmt * (1.0 - pWin)) / (AvgWinAmt + AvgLossAmt) What about this 4th formula? : 4) Expectancy = AvgWinAmt * pWin / (AvgWinAmt * pWin + AvgLossAmt * (1.0 - pWin))
Over 9,999 iterations For P(Win): 50% Average Gain: 10 Average Loss: 100 We get an average of -45 (Yellow) The 1st & 3rd formula get it right Mine also (The last) 2 & 4 miss it. Wanted to add ... If we work with percentage and over multiple iterations Then we have to use none of them. We need to use a Geometric mean (vs Arithmetic). It implies Multiplication and Power (Multiplicative) vs Addition and Multiplication (Additive)
@Sekiyo, thanks! But I'm not sure about your interpretations. Can you explain what you do in each iteration?
I simply use a Rand() Random number between 0 and 1 If Rand() > P(Win) then $Gain else $Loss I take the average of 9,999 of them. AVG(-100,10,10,-100,10,10,10,-100-,100, ...) Which should be a good estimate of our expectation.
In most case P(Win)xAVG(Loss) + P(Loss)xAVG(Loss) For AVG(Loss) <= 0 Works like a charm. It tells you what amount to expect. -45$ in my example. No need to divide then multiply it by AVG(Loss) or Risk The only issue is that it’s going to overestimate our E(x) if we apply it to a multiplicative domain (Percent over multiple iterations).
Since all parameters are known in advance, then I'm a little bit confused why we still need rand(), ie. such a Monte Carlo experiment... And: rand() generates random numbers that are uniformly distributed, but don't we instead need normally distributed random numbers for such returns?
Because we don’t know which formula is correct. I am running an experiment to get an average. Then I compare it with the formulas. I discard those too far away. How would you do otherwise ? Use mathematical proof ? We know the average of a six sided dice is 3.5 But without formula, we roll it 9,999 times Then we compute an average out of it. Maybe the dice is loaded xD We wouldn’t know it by logic alone.
That seems to make sense, yes. What result does your simulation program give for coin tossing (ie. pWin=0.5), and dice throwing (pWin=1/6)?
Rand() is perfect for my purpose. If you need / want a normal distribution You can add multiple Rand()+Rand()+Rand() With mean 1.5 and tails around 0-0.5 and 2.5-3