Simple problem: Gain after n trials given success rate and profibility

  • Context: Undergrad 
  • Thread starter Thread starter qwirky64
  • Start date Start date
  • Tags Tags
    Gain Rate
Click For Summary

Discussion Overview

The discussion revolves around calculating the expected gain or loss from a trading strategy based on probabilities of winning and losing trades, as well as the percentage gains and losses associated with each outcome. Participants explore the implications of compounding returns over multiple trades, addressing both theoretical and practical aspects of the calculations involved.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks to calculate the expected profit or loss after a series of trades, given a win probability of 0.4 and a loss probability of 0.6, with respective gains and losses of 5% and 2% per trade.
  • Another participant suggests a formula for net gain/loss based on the number of trades, but questions arise regarding the basis for calculating percentage gains or losses—whether they are based on the original investment or the current investment at the time of each trade.
  • Some participants discuss the implications of carrying forward gains or losses from trade to trade, emphasizing the importance of defining the initial stake and the nature of the gains.
  • There is a proposal to define the outcome of each trade as a random variable, leading to a discussion about calculating expected values and the impact of compounding over multiple trades.
  • One participant expresses confusion over the application of a formula when considering different sequences of wins and losses, highlighting the complexity of the calculations involved.
  • Another participant attempts to clarify the expected value of a trade and suggests raising this value to the power of the number of trades to estimate overall outcomes.

Areas of Agreement / Disagreement

Participants express differing views on how to approach the calculations, particularly regarding the definitions of gains and losses and the appropriate formulas to use. There is no consensus on a single method for calculating expected outcomes, and the discussion remains unresolved with multiple competing perspectives.

Contextual Notes

Participants note ambiguities in defining terms such as "gain" and "percentage," which complicate the calculations. The discussion also highlights the dependence on assumptions about the nature of trades and the initial stake, as well as the impact of compounding on expected outcomes.

qwirky64
Messages
3
Reaction score
0
I'm stuck on what I'm sure is a very simple problem.

I'm trying to calculate predicted output for my share trading model.

For example, for a strategy the probability of it winning on each trade may be 0.4 and hence a loss is 0.6.

But for each trade it wins, my account balance is increased by 5% and each loss it loses 2%.

How do I calculate how much I would have won or lost after n amount of trades?

Can you break it down to on average each trade its a win or loss of x% so I can just use a simple compound interest formula to calculate expected profit after n amount of trades?
 
Physics news on Phys.org
qwirky64 said:
I'm stuck on what I'm sure is a very simple problem.

I'm trying to calculate predicted output for my share trading model.

For example, for a strategy the probability of it winning on each trade may be 0.4 and hence a loss is 0.6.

But for each trade it wins, my account balance is increased by 5% and each loss it loses 2%.

How do I calculate how much I would have won or lost after n amount of trades?

Can you break it down to on average each trade its a win or loss of x% so I can just use a simple compound interest formula to calculate expected profit after n amount of trades?

Your net gain/loss n trades is [itex]\delta_G np - \delta_L n(1-p)[/itex] so for 10 trades you have: 0.05 (10)0.4 -0.02(10)0.6= 0.08 This is a net gain per trade of 0.008 (0.8%). The formula for compound interest is [itex]N(t)=N_{0}e^{rt}[/itex] where r is the rate and t is the time in units over which the rate is calculated.
 
Last edited:
qwirky64 said:
Can you break it down to on average each trade its a win or loss of x%

What is the basis for the percentage? Is it x% of your original investment? Or is it x% of your current investment when the trade is made?
 
Stephen Tashi said:
What is the basis for the percentage? Is it x% of your original investment? Or is it x% of your current investment when the trade is made?

I think he's working from a trading account where the number of trades is a surrogate for time. So the average net rate of gain per trade is 0.008 and t=n where n is the number of trades. His "stake" N(0) can be any reasonable amount to sustain extended trading assuming his assumptions hold. He would be carrying his gains forward from trade to trade for this calculation to be valid. If he takes any money out, he would need to redefine his base.

EDIT: Note that for the ten trades I described above, I did not add the compounding which would be quite small. N(t)= 1.00 exp{(.008)10}= 1.08329 vs 1.08000 without compounding. Note I'm just working from the fixed assumptions of the model described and not saying anything about actual trading in stocks.
 
Last edited:
Yes its from a trading account, so if I start with $5000 and I have a win and earn 5% then I end up with $5250, then If I win again I win 5% of the $5250 ($5512.5) and so on...

I'm confused with the formula because let's say I start with 1000. and my probability of winning or losing is 50/50. and each win or loss results in a 10% gain or loss of my account.

If I win first I end up with 1100, then I lose I end up with 990.

Of if I lose first I end up with 900 and then if I win I end up with 990. (same result)

But if I put these values into the formula I end up with a value of 1000.
 
qwirky64 said:
Yes its from a trading account, so if I start with $5000 and I have a win and earn 5% then I end up with $5250, then If I win again I win 5% of the $5250 ($5512.5) and so on...

I'm confused with the formula because let's say I start with 1000. and my probability of winning or losing is 50/50. and each win or loss results in a 10% gain or loss of my account.

If I win first I end up with 1100, then I lose I end up with 990.

Of if I lose first I end up with 900 and then if I win I end up with 990. (same result)

But if I put these values into the formula I end up with a value of 1000.

That's the answer you should get. The only way I know how to estimate your gains or losses with a simple formula is to establish your long term net gain/loss probability and use that in the compounding formula (see my last post). If you want real time trade to trade compounding, you're better off with a simple computer program. But it won't be predictive of the long term outcome given your assumptions.
 
Last edited:
If I win first I end up with 1100, then I lose I end up with 990.

Of if I lose first I end up with 900 and then if I win I end up with 990. (same result)

But if I put these values into the formula I end up with a value of 1000.

Which formula? Also, there are 4 possible combinations of winning or losing in a sequence of two trades. You only considered two.



Depending on whether you define the random variable in terms of percent of your current stake or percent of your initial stake, you get different problems to solve.

To consider it as a percentage of your current stake, let's get rid of the idea of "percentage" completely , since it is a source of ambiguity in practical discussions:

Define the random variable X as:
P(X = 1.05) = 0.4
P(X = 0.98) = 0.6

Let {X1,X2,... Xn} be an independent sequence of n random variables, each with the same distribution as X.

Let the random variable R equal the product (K)(X1)(X2)...(Xn) where K is you initial stake.

The term "gain" is also ambiguous. (e.g. is its R - K? R/K ? (R-K)/K etc.). Let's look at the expected value E(R) of R.

E(R) =K E( (X1)(X2)...Xn)). Since the Xi are independent random variables, you can compute this as E(R) =K E(X1) E(X2)...E(Xn) = K (E(X))^n
 
Stephen Tashi said:
ine the random variable X as:
P(X = 1.05) = 0.4
P(X = 0.98) = 0.6

Let {X1,X2,... Xn} be an independent sequence of n random variables, each with the same distribution as X.

Let the random variable R equal the product (K)(X1)(X2)...(Xn) where K is you initial stake.

The term "gain" is also ambiguous. (e.g. is its R - K? R/K ? (R-K)/K etc.). Let's look at the expected value E(R) of R.

E(R) =K E( (X1)(X2)...Xn)). Since the Xi are independent random variables, you can compute this as E(R) =K E(X1) E(X2)...E(Xn) = K (E(X))^n

OK. I'm not quite sure how to apply this product formula since you have two independent values X= 1.05, Y=0.98. I applied it as [itex]E(R)= (E(X)^k)(E(Y)^{n-k})[/itex] Using this get 1.076 after ten trades (from a base of 1) where k=4, n=10. My original result is was 1.08 without compounding and 1.08329 with compounding for 10 trades.

I'm sure I'm missing something obvious. Could you show how to apply your formula for say 11 trades using P(X)=0.4, X=1.05, and Y=0.98?
 
Last edited:
SW VandeCarr said:
OK. I'm not quite sure how to apply this product formula since you have two independent values X= 1.05, Y=0.98.

I'm viewing the result of a trade as one random variable with two possible outcomes.
It's expected value is (1.05)(0.4) + (0.98)(0.6). So I'd raise that quantity to the 11 th power to get the expected multiplier for 11 trades.
 
  • #10
Stephen Tashi said:
I'm viewing the result of a trade as one random variable with two possible outcomes.
It's expected value is (1.05)(0.4) + (0.98)(0.6). So I'd raise that quantity to the 11 th power to get the expected multiplier for 11 trades.

Interesting. That formula looks something like mine except I multiplied both additive terms by the delta terms specified by the OP in order to get an average rate estimate for each trade to use in the compound interest formula (as requested by the OP). That formula requires the delta term (in this case an average +0.008 per trade). When I computed this for 11 trades I got 1.0920 vs 1.0916 when raising to powers, so both ways give very similar results. In fact for 100 trades I get 2.226 with the compound interest formula (using x=.008 x100, base = 1) and 2.218 raising to powers.
 
Last edited:
  • #11
So are you saying.

If I have a 0.5 chance winning and hence 05. losing, and each win or loss is +10% or -10% respectively. I would write it as...
P(X = 1.1) = 0.5
P(X = 0.9) = 0.5

and that after 5 trades I would have ((1.1)(0.5) + (0.9)(0.5))^5=1

Does this mean on average after 5 trades with those odds I would end up with the same amount of money?
 
  • #12
SW VandeCarr said:
Interesting. That formula looks something like mine except I multiplied both additive terms by the delta terms specified by the OP in order to get an average rate estimate for each trade to use in the compound interest formula as requested by the OP

I had a different interpretation of the mention of the compound interest formula. I didn't interpret it as a request to determine an equivalent interest rate for the result of the trading or to give the trader credit for having his funds invested while not trading. I took it merely as a question about whether the formula could be somehow be used to find the result of N trades without considering time at all.
 
  • #13
qwirky64 said:
So are you saying.

If I have a 0.5 chance winning and hence 05. losing, and each win or loss is +10% or -10% respectively. I would write it as...
P(X = 1.1) = 0.5
P(X = 0.9) = 0.5

and that after 5 trades I would have ((1.1)(0.5) + (0.9)(0.5))^5=1

Does this mean on average after 5 trades with those odds I would end up with the same amount of money?

Yes.

In any practical application, there will be some minimum stake that the trader needs in order to make a trade. The above formula doesn't account for the possibility of "ruin" when the traders stake falls below that minimum.
 
  • #14
Stephen Tashi said:
Yes.

In any practical application, there will be some minimum stake that the trader needs in order to make a trade. The above formula doesn't account for the possibility of "ruin" when the traders stake falls below that minimum.

You could put in some kind of a safety feature into the program if the size of the stake drops below some fraction of its original size, say 50%.
 

Similar threads

  • · Replies 76 ·
3
Replies
76
Views
7K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 28 ·
Replies
28
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
11K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K