Fix example R calculation in edge documentation

This commit is contained in:
Matthias 2020-10-08 08:09:55 +02:00
parent 72337a0ab7
commit 1b5cb3427e

View File

@ -82,20 +82,33 @@ Risk Reward Ratio ($R$) is a formula used to measure the expected gains of a giv
$$ R = \frac{\text{potential_profit}}{\text{potential_loss}} $$
???+ Example "Worked example of $R$ calculation"
Let's say that you think that the price of *stonecoin* today is $10.0. You believe that, because they will start mining stonecoin, it will go up to $15.0 tomorrow. There is the risk that the stone is too hard, and the GPUs can't mine it, so the price might go to $0 tomorrow. You are planning to invest $100.<br>
Your potential profit is calculated as:<br>
Let's say that you think that the price of *stonecoin* today is $10.0. You believe that, because they will start mining stonecoin, it will go up to $15.0 tomorrow. There is the risk that the stone is too hard, and the GPUs can't mine it, so the price might go to $0 tomorrow. You are planning to invest $100.
Your potential profit is calculated as:
$\begin{aligned}
\text{potential_profit} &= (\text{potential_price} - \text{cost_per_unit}) * \frac{\text{investment}}{\text{cost_per_unit}} \\
&= (15 - 10) * \frac{100}{15}\\
&= 33.33
\end{aligned}$<br>
Since the price might go to $0, the $100 dolars invested could turn into 0. We can compute the Risk Reward Ratio as follows:<br>
\text{potential_profit} &= (\text{potential_price} - \text{entry_price}) * \text{investment} \\
&= (15 - 10) * 100\\
&= 500
\end{aligned}$
Since the price might go to $0, the $100 dollars invested could turn into 0.
We do however use a stoploss of 15% - so in the worst case, we'll sell 15% below entry price (or at 8.5).
$\begin{aligned}
\text{risk} &= (\text{entry_price} - \text{stoploss}) * \text{investment} \\
&= (10 - (10 * (1 - 0.15))) * 100\\
&= 150
\end{aligned}$
We can compute the Risk Reward Ratio as follows:<br>
$\begin{aligned}
R &= \frac{\text{potential_profit}}{\text{potential_loss}}\\
&= \frac{33.33}{100}\\
&= 0.333...
&= \frac{500}{150}\\
&= 3.33
\end{aligned}$<br>
What it effectivelly means is that the strategy have the potential to make $0.33 for each $1 invested.
What it effectively means is that the strategy have the potential to make 3$ for each $1 invested.
On a long horizon, that is, on many trades, we can calculate the risk reward by dividing the strategy' average profit on winning trades by the strategy' average loss on losing trades. We can calculate the average profit, $\mu_{win}$, as follows: