      A reliable broker, online signals and a robot!
Better together than separately!

I noticed that mathematics in general and some of its sections (statistics, probability theory, and others) are not of much interest to most people. In most areas of life, you can really do without this knowledge. But mathematics plays a critical role in trading: surrounded by charts, numbers on asset values ​​and trading volumes, traders are forced to analyze all this data in order to succeed in the market.

I decided to write a short tutorial article containing all the important mathematical tricks that will significantly affect your trading in the market. You will see that mathematics in trading is not as difficult as it might seem at first glance. Knowing just a few formulas can help you improve your efficiency.

To begin with, there are adherents of the so-called "psychological" trading, who believe that the market is governed by greed for money and fear of financial losses. On the other hand, market participants have to analyze tons of numerical information every day. The truth is that both an understanding of market psychology and knowledge of the basics of mathematics are critical to a trader's success. Although traders-psychologists proceed from the fact that the market seeks to make money on inexperienced participants, and therefore look for "weak" zones, they are aware of the power of mathematical statistics, since it allows predicting certain events with a fairly high degree of accuracy.

## Determining the value of an asset The simplest example of using mathematics in trading is calculating the price of an asset. Changes in the value of an asset are determined with a certain step - a pip (0,0001 points). For example, the EUR / USD currency pair is traded at a rate ratio of 1,2610. For example, if the rate rises to 1,2625, then it has grown by 15 pips. Since the price of a pip differs from position to position, I recommend using the following formula:

P1p = (0,0001 / Ex) * Ps, where P1p is the cost of one pip, Ex is the rate, Ps is the position size.

For example, you want to open a position for the above currency pair in the size of a standard lot, the value of which is 100000 USD. Using the formula, calculate the value of a pip: (0,0001 / 1,261) * 100000 = 7,93 EUR.

## Leverage

Leverage in the Forex market plays a critical role. 1 standard lot is 100000 USD (not every market participant has such large amounts). Leverage - funds provided by a broker on a loan. They can play in the trader's favor or harm if he ignores the simplest mathematical laws.

Leverage is usually indicated as a ratio, for example, 1:50. 1 is the trader's share, 50 is the funds provided by the broker. For example, to open a position of 1 lot, a trader needs to have USD 2000 instead of USD 100000 (the standard lot value). To calculate the amount of funds required to complete a transaction, taking into account the known value of the leverage, use the following formula:

M = L / C, where M is the trader's funds to open a deal, L is the position value expressed in monetary units, C is the leverage (denominator in the ratio).

For example, a trader is offered a 1:25 leverage to open a position of 2 lots. To do this, you need the following amount of your own funds: M = 200000 / 25 = 8000 USD.

## Position sizing calculation

The size of the position in the deal is determined after several calculations. I have listed them in the table below.

 Formula Clarification RM = TM * R RM is the amount of funds a trader is risking, TM is the size of the trading account, R is the risk expressed as a percentage per trade. SL = 1- (SLC / CC) SL - stop loss expressed as a percentage, SLC - stop loss value, CC - current value. PC = RM / SL PC - position size, expressed in monetary equivalent, RM - the amount of money that the trader risks, SL - stop loss, expressed in percentage. S = PC / CC S - number of securities (shares), PC - position size, CC - current value.

Let's consider the calculation using an example. The following initial data are available:

• The trading account is 25000 USD.
• The risk of a trading account per 1 trade is 2,3%.
• The cost of one share is 50 USD.
• Stop loss price - 42 USD.

First, let's define the risk expressed in monetary terms. RM = 25000 * 2,3% = 575 USD. Now let's define the stop loss, expressed as a percentage: SL = 1- (42/50) = 16%. The size of the position, expressed in monetary terms, is calculated as follows: 575/16% = 3593,75. As a result, we have the following number of shares: 3593,75 / 50 = 72.

Taking into account the established risk level for the position size, as well as the current price (\$ 50), the trader will be able to purchase 72 shares in total.

## Expected value

Above, we have provided a few simple examples to demonstrate how important mathematics is in trading. Now let's move on to more complex calculations. In particular, let us consider the mathematical expectation - the sum of the probabilities of positive and negative results for transactions, taking into account the cost of transactions. Consider the math notation:

ME = (p1 * S1) + (p2 * S2), where ME is the mathematical expectation, p1 and p2 are the probabilities of the first and second events, respectively, S1 and S2 are the cost of the first and second deal (S1 is profit, S2 is losses), respectively ...

Consider an example: using a certain strategy, a trader has determined that he can enter 35% of winning trades at \$ 10 and 65% of losing trades at \$ 3. ME = (0,35 * 10) + (0.65 * (- 3)) = 1,55, that is, the mathematical expectation for each trade was 1,55 USD.

How to use mathematical expectation in practice? It's simple - calculate the value and determine its sign (negative or positive ME). If a value with a "-" sign is obtained, the trader loses money. A positive mathematical expectation indicates that the trader is making a profit.

## Probability of positive / negative trades

Not many traders estimate the likelihood of a series of winning / losing trades. The main reason is the lack of knowledge in the field of probability theory, but mathematics in trading will help correct this deficiency. To calculate the probability, you just need to keep statistics of your own trades. Based on this data, it is necessary to determine the percentage of winning and losing trades. For example, it is 65% / 35%. In further calculations, the rule for multiplying the probabilities is used:

• The probability of concluding 2 profitable deals in a row is 65% * 65% = 0,65 * 0,65 = 0,4225 or 42,25%.
• The probability of a series of two losing trades in a row is 35% * 35% = 0,35 * 0,35 = 0,1225 or 12,25%.
• The probability of concluding three winning trades in a row at once is 65% * 65% * 65% = 27,46%.

These figures indicate that with each subsequent profitable trade, the likelihood of another success decreases. The same would happen in the case of a series of losing trades.

## The Martingale system in trading

Known as the smart bankroll / budget management system, this system was originally created for casino games. Over time, she found application on the stock exchange. The system prescribes the following:

• The trader sets in advance the initial amount of the deal that he is ready to conclude.
• In case of loss, the trader will make a deal for a larger amount. The amount of the deal increases proportionally with each loss (for example, we can have a sequence of the following form: 1, 2, 4, 6, 8 ...).

The essence of the Martingale system is that the next won trade will cover the losses incurred as a result of a series of failures. In addition, the trader will receive a profit equal to the initial trade amount. Experienced traders know that the market is a volatile environment full of surprises and unpredictable factors. This explains the high risks of using the Martingale system.

### An example of using the Martingale system in trading

A market participant opened a deal for 200 USD, which turned out to be a winning one. Without changing the amount, the trader enters into a new deal (for 200 USD) and loses. The amount of the third deal is 400 USD (increased since the previous “round” was lost). If the trade is successful, the trader will receive 400 USD, which, minus the previous loss of 200 USD, will mean an income of 200 USD (equal to the original amount of the trade).

The Martingale system clearly shows how mathematics works in trading. But, before using it, you need to learn about the pros and cons. The first (and most important) flaw in the system is zero mathematical expectation. This means that by concluding each new deal, the trader only plays back the losses on the previous ones. The second drawback is that the trader must have a large budget.

Despite the existing drawbacks, Martingale is advisable to use for the following reasons:

• The strategy helps the trader to better "feel" the market.
• Averaging by opening an opposite trade (one of the varieties of the Martingale system).