Re-examining trading from the perspective of probability theory

Only give you authentic financial knowledge
george.d

Before discussing transactions, let's discuss randomness and probability clearly.

How to understand randomness?

If you flip a coin ten times, will it really come up five times?

Its regularity is actually different from what we intuitively imagined, so that most people in life will misread probability. For example, we know that the probability of flipping a coin is half and half, but if you toss a coin ten times now, do you really get five heads? In fact, this possibility is only about 1/4, which is obviously completely different from most people's intuition.

Another example is that there is a gamble with a 10% chance of winning. Can you guarantee to win at least one time if you play it ten times? If not, how many times does it take to have a high chance of winning once? This result is actually 26 times, which may also subvert your cognition (the above two examples can be easily calculated through Bernoulli experiments). Therefore, we have to get to the bottom of the matter, and use some examples to clarify what randomness means, and how we can get the correct statistical laws instead of subjective bias.

We all know that the laws of statistics can only be obtained after a large number of random experiments, and they are meaningful. But the results obtained by random experiments may be different from the conclusions we calculated using classical probability. Not only are you unlikely to get five heads most of the time when you toss a coin 10 times, the same is true for other random experiments you do.

For example, if you roll a dice 12 times, only about 30% of the time it will come up with exactly two sixes. At this time, can you say that there is a 70% possibility of negating the conclusion that the probability of six dots turning up is 1/6? It doesn't seem like it should be so arbitrary.

What is wrong here? The key here is how to account for deviations between real and ideal probabilities.

Why do actual probabilities always deviate from ideal probabilities?

Hundreds of years ago, in order to answer this question, the French mathematician Bernoulli and others began to do some of the simplest random experiments, which are so simple that there are only two results, either A or B, and there is no third state, and Repeat this experiment under the same conditions, and the probability of occurrence of A and B needs to be the same.

For example, tossing a coin, the probability of each head is 1/2; throwing a dice, event A is "six points up", and the probability of its occurrence is also 1/6 each time. Of course, event B is that other points are up, and the probability of each time is 5/6. In general, the probability of A is p, and the probability of B is 1-p. Such experiments came to be known as Bernoulli experiments.

Ok, the basic settings are explained clearly. Let's analyze the problem of tossing a coin. Logically speaking, if we toss a coin 10 times, the number of heads should be 5 times. But if you actually take a coin and try it, you may find that it may only come up heads three times, or it may come up four times, or it may even not turn up heads once.

If we calculate the possibility of facing up from 0 times, that is to say, all the times are upside down, to 10 times are all upside down, and draw a line graph, which is a bulging curve in the middle:

It can be seen from the figure that although the possibility of 5 heads up is the highest, it is only about 1/4.

The reason for the inconsistency between the experimental results and the theoretical values ​​is that the number of ten experiments is too small, and the statistical regularity is covered up by the randomness of the experiments. Wouldn't the regularity be a little clearer if we did more random trials?

For example, if we do 100 experiments, you will find that in 80% of the cases, heads appear 40 to 60 times. If we continue to enlarge the number of experiments, you will find that the number of heads-ups in most cases fluctuates around half, and the possibility that the proportion of heads-ups is particularly small or too large will hardly appear, not like the beginning That way, anything is possible.

Of course, if you do 1000 trials, 99.9% of the time the number of heads will be between 400 and 600. Even if you narrow the range of floats to 450-550, 99.7% of the time the heads fall within this range.

In general, if this simple Bernoulli experiment is performed N times, how many times will event A occur? Although we feel that it should be the total number N multiplied by the probability p of each occurrence, it is actually possible for event A to occur as many times as possible. Of course, the possibility of N*p occurrences is the highest, followed by N*p+1 or N*p-1 occurrences, and then gradually decreases towards both ends.

If we draw it as a curve, it is a curve with a high middle and low ends. By the way, a probability distribution that satisfies this curve is called a Bernoulli distribution, also known as a binomial distribution, because there are two outcomes for each trial.

We also look at this experiment. In fact, if the number of trials N is relatively large, there will be a big bulge in the middle, and then it will drop rapidly, and the sides will be almost zero. This means that the probability of event A occurring at around N*p is very high. Large, other possibilities are extremely small. On the contrary, if the total number N is relatively small, the bulge in the middle will be relatively gentle, and the values ​​at both ends will be small, but not zero. In fact, it is difficult to determine how many times event A has occurred.

Thus, we come to such a conclusion: the law of uncertainty can only appear when there are a large number of random experiments, and when the number of experiments is insufficient, it will appear accidental and random.

How to find out the nature of this deviation?

Of course, in mathematics, we cannot describe a law with loose language such as "the curve is more bulging" or "relatively flat". We need to use two very accurate concepts to quantitatively describe the difference between "drum" and "flat". The first concept is the average value or the mathematical expectation value, which is N*p, because after N trials of an event with probability p, the average number of occurrences is also the most likely number of occurrences, well, this is N*p . Next, we use the concept of squared difference (referred to as variance) to describe the "drum" and "flat" of the curve. The word "variance" may be familiar to you, so what is variance and how is it calculated? Let's briefly talk about it below.

Variance is actually a measure of error. Since it is an error, there must be a comparable base point. In probability, this base point is the mathematical expectation value (referred to as the expected value), which is what we usually call the average. For example, if you do 10 coin tosses, the average is 5 heads, and 5 is the basis point.

If we do 10 trials and only face up 4 times, there is an error, and the error is 1. If 9 heads come up, then the error is large, which is 4. Well, next we will consider all kinds of errors and the possibility of those errors together, and make a weighted average, and the calculated "error" is the square difference.

The reason why the word "square" is used is because the square is used to calculate the error of the variance. In order to further facilitate the comparison between the error and the average, we usually open the root sign of the variance once, and the result obtained in this way is called the standard deviation. (Strictly speaking, there is still a slight difference between the square root of the variance and the standard deviation, but the difference is very small. For ease of understanding, we assume that the standard deviation is the result of the square root of the variance).

The formulas about variance and standard deviation are omitted (interested friends can Baidu by themselves). Let's directly talk about the conclusion, that is, Bernoulli experiments or other similar experiments, the more the number of experiments, the smaller the variance and standard deviation, and the more the probability distribution is concentrated in the position of the average value N*p. Obviously, in this case, it is more accurate to use the number of occurrences of A divided by the number of trials N as the probability of A occurrence.

Conversely, the fewer the number of trials, the flatter the probability distribution curve, that is to say, there is the possibility of A happening as many times as possible. At this time, you use the number of A occurrences divided by the number of trials N, as the probability of A occurrence , the error may be large.

Specific to the experiment of tossing a coin, 100 experiments are performed, and the standard deviation is about 5 times, that is, the error is about 10% compared to the average value of 50. But if we do 10,000 trials, the standard deviation is only about 50, so compared to the mean, it drops to about 1%.

Ideal and reality: success requires more preparation

With the concept of variance, we can quantitatively analyze the gap between "ideal" and reality. What is ideal? We conduct N Bernoulli experiments, the probability of each event A occurring is p, and N times occur N*p times, which is the ideal. So what is reality? Due to the influence of the standard deviation, the actual number of occurrences seriously deviates from N*p, which is the reality.

For example, in life, many people think that something has a 1/N probability of happening. As long as he does it N times, it will happen once. This is just an ideal. In fact, the smaller the probability of an event, the greater the gap between ideal and reality. For example, the probability of something happening is 1%. Although its mathematical expectation value reaches 1 after 100 trials, its standard deviation is also about 1 at this time, which means that the error is about 100%. Therefore, after 100 trials It may not be successful even once.

What if you want to be sure of getting the first shot? You're doing about 260 or so trials instead of 100. Friends who are interested in the mathematical details here can ask me to discuss it. Here we use the conclusion directly, that is, the smaller the probability of an event, if you want to ensure that it happens, the number of trials that need to be performed is much more than the ideal number.

Things like buying lottery tickets. Your chance of winning is one in a million. If you want to be sure of winning once, you may have to buy 2.6 million lottery tickets. Even if you hit the jackpot once, you spend far more money than you get. Therefore, if you understand the standard deviation, you should understand why people don't gamble. This is the first point we need to understand in terms of cognition.

The second point we need to understand is that improving the single-shot success rate is far more important than doing more experiments. If you have a 50% chance of success, you basically try 4 times to ensure success once. Of course, the ideal state is to try twice. To be on the safe side, do 100% more work. But if you only have a 5% chance of success, it will take about 50 attempts to ensure one success, not the ideal 20. To be on the safe side, do 150% more work.

Many people like to bet on low-probability events, thinking that the cost is low, and it’s a big deal to do it a few more times. In fact, due to the effect of errors, the cost of ensuring the occurrence of low-probability events is much higher than that of ensuring the occurrence of high-probability events.

Regarding the laws of probability theory and statistics, there are still many places that do not match our intuition. For example, the large number of random experiments we mentioned earlier need to be carried out under the same conditions, and the previous and subsequent experiments will not affect each other. In reality, these two things are really not easy to satisfy.

Take throwing dice as an example. It seems that throwing N times is just a repetition of one throw, but in fact, if you throw too many times, the dice will wear out, and the table will also have holes. These small differences will accumulate and produce Different results, what we thought would happen after a few tries, may not happen, which requires us to consider more margins in advance.

Let's talk about transactions

Those who were good at fighting in ancient times were invincible first, and waited for the enemy to be victorious. In the market, you must first find a suitable product, build a trading system that suits you, and ensure the balance between the transaction winning rate and the profit-loss ratio, in order to accumulate your own advantages. After all, trading is a game of probability.

How to manage funds in the account

I believe that through the probability knowledge above, everyone has already understood. The most important part of trading is money management. Because no matter how powerful our trading strategy is, if there is not enough number of transactions as a guarantee, it is impossible to give full play to our strategic advantages.

When doing fund management, some people on the Internet suggest that the risk limit value (including transaction costs) of each transaction is set at 2%. Let's see if it is reasonable. If every transaction reaches the risk and limit value, the total number of transactions that can be done is 50 times. From the probability knowledge above, we can know that our strategic advantages have not been brought into play in 50 experiments. Therefore, even in the worst case, we need to do enough transactions to allow the advantages of this strategy to play out. When the number of transactions is sufficient, this strategy is still not profitable, and we can determine that it is a problem with the strategy. For example, we can try to set the risk limit at 0.2%, so that the account can do about 500 transactions even in the worst case.

How to optimize the trading strategy

Many people would say that the profit-loss ratio and trading winning percentage are like two ends of a seesaw, when one end rises, the other end will fall. In fact, we should compare and optimize our strategies on the same baseline, for example, how to increase the profit-loss ratio under the same transaction winning ratio; or how to increase the transaction winning ratio under the same profit-loss ratio, which is the key to our optimization strategy , which is also the process by which we screen effective signals.

How to determine the trading position

In short, one sentence: the loss is quantified, and the probability is the priority.

What does that mean? We need to determine the entry position first, then determine the stop loss position, and then calculate the trading volume that needs to be done based on the stop loss position space and risk limit value we have determined. This is quantified by loss.

Then, every transaction we make needs to meet the optimized trading strategy set by ourselves. This is probabilistic.

Summarize

Only when a trader achieves an appropriate order accuracy rate, an appropriate take-profit and stop-loss ratio, and an appropriate position control, when these three points complement each other, can he have the opportunity to move towards long-term sustainable and stable profitability.

When I was writing the manuscript for this article, I saw someone in the group send the following picture:

So please think about it, why is the content in the picture unrealistic? You can start from the following directions:

1. What is the probability of success of this strategy?

2. If you need to ensure the success of this strategy, how many such accounts do you need to make?

3. What is the principal required for all accounts?

Welcome to write your thoughts in the comment area below. In the next article, let's talk about how to tame the goddess of luck and make her favor me.

Good luck with the transaction

Copyright reserved to the author

Last updated: 09/05/2023 16:15

698 Upvotes
67 Comments
Add
Original
Related questions
About Us User AgreementPrivacy PolicyRisk DisclosurePartner Program AgreementCommunity Guidelines Help Center Feedback
App Store Android

Risk Disclosure

Trading in financial instruments involves high risks including the risk of losing some, or all, of your investment amount, and may not be suitable for all investors. Any opinions, chats, messages, news, research, analyses, prices, or other information contained on this Website are provided as general market information for educational and entertainment purposes only, and do not constitute investment advice. Opinions, market data, recommendations or any other content is subject to change at any time without notice. Trading.live shall not be liable for any loss or damage which may arise directly or indirectly from use of or reliance on such information.

© 2024 Tradinglive Limited. All Rights Reserved.