-1

Let say I do some trade operations, such as buy an asset at X price and sell at X + P%.

Buy and sell have both a fees of Y.

How much percentage should I add to get X + P% compensating the fees on both operation?

Tried P+Y+Y%, but of course the trade ends with a gain < of X + P%

markzzz
  • 61

1 Answers1

1

Percentages are not additive: for instance, if you subtract $10\%$ from a number and then add $10\%$ of the new number's value back, you end up with a number $1\%$ smaller than you started with. Instead, they are multiplicative: subtracting $10\%$ means multiplying by $0.9$, adding $10\%$ means multiplying by $1.1$, and $0.9\times 1.1=0.99$, a subtraction of $1\%$.

Using the interpretation given in the comments below, and using multipliers instead of percentages (so a $10\%$ fee is a multiplier of $0.9$ and a $10\%$ increase is a multiplier of $1.1$): I purchase a commodity with value $X$, and pay a fee of $YX$. The value of the commmodity increases by $T$ and then you pay a fee $YXT$. You want a profit of $P$ after subtracting the two fees.

In other words: $TX-YX-YXT=XP$, or $T-Y-YT=P$ (it should be intuitive that the percentage increase required is irrelevant of $X$). The two knowns are $Y,P$, so we manipulate the equation to get: $T(1-Y)=P+Y$ and $T=\frac{P+Y}{1-Y}$.

For instance, if you want a $20\%$ gain and there is a $5\%$ fee then $T=\frac{1.2+0.05}{1-0.05}=\frac{25}{19}$. Calculating concretely, if $X$ has the price $100$ then you pay $5$ for buying, and then it should increase its value to $\frac{2500}{19}$, and then you pay $\frac{125}{19}$ for selling, so your gain is $\frac{2500}{19}-100-5-\frac{125}{19}=20$.

A.M.
  • 3,944
  • Thanks. There isn't a general formula instead of substitute and solve equation to get P? Values of course are going to change every time... – markzzz Jun 19 '22 at 10:16
  • @markzzz I've changed the answer substantially upon re-reading, because I realised I could find at least three different interpretations of the question. – A.M. Jun 19 '22 at 10:16
  • fee in this case is a percentage subtracted when buyed/selled. Example if I buy 200 with fee of 1%, I get 198. The same later after sell... – markzzz Jun 19 '22 at 10:19
  • @markzzz so the asset X now has a value of 198? It's not that X has a value of 200 and you've paid 2? This changes what the percentage increase in X is. – A.M. Jun 19 '22 at 10:26
  • Once buyed the asset, I gain 198 instead of 200, because of 1% of fee. Than i sell at +10%, so I got 198+50% = 297 - 1% of fee = 294,03. So, in fact I don't get 200+50% (i.e. 300). But I want end up with that gain. More clear now? – markzzz Jun 19 '22 at 10:31
  • @markzzz no, gain is not the point. The point is that increasing $X$ from $198$ to $300$ is not the same percentage increase as increasing $X$ from $200$ to $300$. Your comment now implies the commodity remains at the value $X$, and I have answered the question with this assumption. – A.M. Jun 19 '22 at 10:38
  • don't get your formula. What Is T? I Just need the value of P such as 200+50% (with fee) give to me 300 and not 294,03 :O – markzzz Jun 19 '22 at 10:43
  • Tried your last formula, still don't get it: 200-5%=190. 190*(25/19)=250. 250-5% is not 240... – markzzz Jun 19 '22 at 11:12
  • @markzzz You should be multiplying $200$ by $25/19$, not $190$, because you just told me that the asset remains at the value $200$ rather than decreasing to $190$. You also can't use the variable $P$ for two different things, the desired overall profit and the necessary percentage increase for that profit. – A.M. Jun 19 '22 at 11:23
  • Nope :) but I think with multiply hits I got the formula. I.e. X * ( (1+P/100) / (1-fee/100 * 1-fee/100) ) – markzzz Jun 19 '22 at 11:27
  • Resolved. Thanks man :) – markzzz Jun 19 '22 at 11:32