The paper contains 5,155 words and is expected to last 15 minutes
Source: Pexels
Readers are no doubt aware that data science is an interdisciplinary subject involving statistics, mathematics, computer science and business knowledge. The mindset and multiple skills that data scientists need are powerful tools. They, not PHDS, are the qualifications for being a good data scientist. Not only will they help you in your career, but they can be a huge positive influence on life decisions.
For anyone who pursues the freedom of wealth, investing is a lifelong subject. Whether investing in stocks or investing in yourself, there are many rules you should follow. These principles are important but easy to forget. The reason is human nature: it takes a bad investment experience to understand the importance of these principles.
Is there a way to master these principles without experiencing failure? The answer is yes. Great data scientists, with their mindset and multiple skills, should know this shortcut. Hopefully, these two shortcuts will serve you well in investing as well.
“All science begins with a refinement of everyday thought.” — Albert Einstein
1. Don’t be greedy → it can be proved mathematically
Gambling is a high-return business, sometimes even supporting the welfare system of an entire city, such as Las Vegas. Besides tourists, the main source of revenue is the greed of gamblers.
Source: Pexels
There are very few data scientists in casinos. If so, they are either employed in casinos or pretend to gamble in order to socialize with friends who are not data scientists. What are the reasons for this phenomenon? Because good data scientists understand math.
Let’s look at a simple example.
1. A gambler has a 50-50 chance of winning the game.
2. If he wins, he gets a dollar. If he loses, he loses a dollar.
3. The bookie starts with X dollars
4. There are only two ways to end the game: 1) lose all X dollars, or 2) the gambler reaches his goal: win Y dollars.
The game may seem straightforward, but it reveals two important attributes of all gambling games. First, they all seem fair. This makes players think that if you’re not unlucky, you’ll end up with a draw. Second, all gamblers are greedy.
Let’s say the probability of losing all X dollars is P (X).
Starting with x, a person has a 50 percent chance of losing a dollar, and a 50 percent chance of winning a dollar.
so
· P(X) = 50%× P(x-1) + 50%× P(X + 1)
· That is, 2 × P(X)= P(x-1) + P(X + 1)
, namely, P (X) – P (X – 1) = P (X + 1) – P (X), which meet the typical nature of the arithmetic progression.
We know that for all arithmetic sequences, we have 1, 2, 3
So the NTH term in the sequence is equal to the first term plus the difference between the NTH term and the first term, which is n minus 1 times the difference between any two adjacent terms.
We also know:
· P(O)=1. When a person has no money, the probability of losing all their money is 100 percent
· P(Y)=0, if a person already has Y dollars, then the game is over, so the probability of losing is 0%.
· Therefore, d=1/Y
The sequence can be deformed as follows:
By the following formula:
P (X) = P (Y) + (n – 1) = P (Y) + d (Y, X) forced the 1 / Y = (Y) X/Y
In other words, if X is equal to 1000
If Y = $1,200, P(X) = 1/6
If Y = $1,500, P(X) = 1/3
If Y = $2,000, P(X) = 1/2
4. 如果 Y = $5,000, P(X) = 4/5
So it’s relatively easy to win $200, but if you’re greedy and you want to win 5 times your principal, there’s a 4 in 5 chance you’ll lose nothing.
“Don’t rush forward” — ancient Chinese wisdom
2. Beware of cryptocurrencies and penny stocks — game theory proves it
The currency chart from https://coinmarketcap.com/
You may have heard of the cryptocurrency mania of 2017, when bitcoin rose 20-fold in a year, and the aftermath of the financial crisis that followed has continued to this day.
Here’s a simple example of how to invest in a volatile market in the future:
1. Sofia invites Noah to play a game. Each person holds a coin
2. Each turn requires two people to flip a coin
3. If it’s 2 heads, Noah will win $3
4. If it’s 2 heads, Noah wins $1
5. If it’s 1 heads and 1 tails, Noah loses $2
It’s easy to imagine that there’s a 50/50 chance of getting heads, so there’s a 25% chance of getting 2 heads, a 25% chance of getting 2 tails, and a 50% chance of getting 1 heads, 1 tails.
The probability of flipping two coins
The outcome of the game under different possibilities
So Noah and Sophia’s result is expected to be $0:
25% × $3 +25% × $1-50% × $2 = $0
Yes, it seems like a fair fight, and Noah has always wanted to play with an attractive lady like Sofia, so why not? But after hours of competition, Noah was losing even his wallet. What’s going on here?
The reason: Sofia controls the odds, rather than displaying coins randomly in each turn. Here’s her strategy:
Let’s say A represents Sofia showing the heads of the coin, and B represents Noah showing the heads of the coin.
So Noah’s expected return is:
Graph the above equation:
The region under the plane means that E (Noah) is negative, and P (A), the probability of Sofia getting heads is within A certain range, and E (Noah) is always negative! This is Sofia’s game. The following code shows this range:
- import numpy as np
- # P(A) and P(B) probabilities within [0, 1]
- Pa = NP. Arange (0., 1., 0.01)
- Pb = np.arange(0., 1., 0.01)
- # transform into 100 x 100s
- pa_v, pb_v = np.meshgrid(pa, pb)
- # function to calculate Noah’s reward
- defexpectation(pa_v, pb_v):
- return8* pa_v * pb_v -3* pa_v -3* pb_v +1
- # Noah’s reward expectation
- ea = expectation(pa_v, pb_v)
- # How Sofia manipulate the probability
- # so Noah’s reward expectancy < 0
- print(pa_v[ea <0])
View rawNoah’s rewards. Py Hosted with ❤ By GitHub
[0.34 0.35 0.36… 0.38 0.39 0.4]
In other words, if Sofia keeps this probability between 0.34 and 0.4, Noah will keep losing money!
This game is a problem in game theory. This might be the perfect analogy for how seemingly “fair” games can be deceptive. Here, games can be thought of as an investment, with Noah representing individual investors and Sofia representing institutional investors, commonly known as “big whales.” In small capital investments like cryptocurrencies and cheap stocks, the big whales can easily manipulate the market with large amounts of money by selling or buying in large quantities. If individual investors are lucky enough to follow the whales’ movements, they can make money, but ultimately they will suffer as a result of the manipulation.
3. Always “give up” faster than expected → think objectively
Source: Pexels
In the investment process, it is normal to lose and win. When winning money, don’t be greedy (as has been proven before). Be wise to stop your losses when you lose.
Sam holds $10,000 worth of stock. Recently, though not manipulated, the company’s stock price suddenly fell below the purchase price, and Sam’s stock is now worth just $8,000.
Should Sam have stopped his losses in time?
Sam has a 90% chance of losing more if he holds or increases his share. Obviously, the loss must be stopped in time. But even if they are provided with statistical information beforehand, many are unable to do so. This is all due to human overconfidence, such as “if you never sell, you won’t lose money”. “You’ll never lose money.” Don’t believe that.
It’s not as easy as it seems. It takes regular practice and persistence. This skill is essential for any scientist and researcher.
If the losses are irreparable, such as if the company itself is a fraud, don’t expect it to get better any time soon, acknowledge that the losses have become sunk costs and get out immediately. While losses can sometimes be made up by holding for the long term, given the opportunity cost, the money could have been doubled if the time spent waiting for investment to return to its previous level had been spent moving it elsewhere.
In terms of investment survival, do more research on stocks and do some calculations to justify investment decisions. Another simple and sensible approach is to treat stocks as freebies in your mind. If you treat that $10,000 stock as a gift from the sky, you can make an easy decision one day if the stock drops to $8,000.
4. See through “expectations” → “Monte Carlo Simulation”
Images from Marvel (Cyclops)and https://screenrant.com/
There are countless ways to evaluate an investment, some good and some bad, and the three worst are listed above. For individual investors, value investing, discounts, scorecards, PB +PE +PEG are great places to start investing. This article will not cover them in detail. Click on the links to discover their usefulness.
This article wants to introduce an interesting and sometimes counterintuitive approach that many people, including professionals, rely on — expected returns. Details on when it works are provided below.
When it works
Imagine a coin-op game. Each turn, the player will earn $1 if the coin comes up heads, and $2 if it comes up tails. So, how much does he have to pay to play this game?
The expected revenue is $1.50, so you can only play the game if you charge less than $1.50 per game.
When it doesn’t work
Given X dollars, there is a 50% chance that it will change to 0.9×X in the next unit time, and a 50% chance that it will change to 1.11×X. Do I have to go all in every time?
The formula says that in the next unit of time, $X will earn 0.5%. That is, every investment will be profitable, so of course, every time you should bet!
In practice, everything would be lost. Counterintuitive? Here’s why:
Based on the Monte Carlo simulation, I created 10,000 investors who started with $100 in over 500 time units.
Each dot on the chart represents investor returns in a specific unit of time. As you can see, only a few investors have made very good returns over time, and most have not been so lucky.
What kind of misfortune? 88.56% of the investors had lower returns than the $100 they started with. Unfortunately, 84.76% of 10,000 investors ended up with a $0 return. Indeed, most investors end up penniless.
On the surface, this investment is extremely promising and theoretically one can make zillions of money if he sticks with it, but in reality there are few real winners in this investment market.
The following code recreates the simulation:
- import numpy as np
- import random
- import matplotlib.pyplot as plt
- # simulate 10000 investors
- N =10000
- # over 300 time units
- T =500
- # all starting with $100
- X_0 =100
- # a space to store all the results
- # , with X axis as time, Y as return
- X = np.full((N, T), X_0)
- # increase/decrease rate
- a =.9
- B = 1.11
- # simulation
- random.seed(888)
- for i in np.arange(1, T):
- P = np.random.choice([a, b], size= N)
- X[:, i] = X[:, i -1] * P
- # plotting
- x_plot = np.tile(np.arange(0, T), N)
- y_plot = X.reshape(1, N * T)
- plt.scatter(x_plot, y_plot, s=2)
- plt.xlabel(“Time”)
- plt.ylabel(“$Return”)
- plt.title(“Simulate %s investors over %s time units”% (N, T))
- plt.show()
- # stats
- print(“%s losers”%sum(X[:, T -1] < X_0))
- print(“%s total losers”%sum(X[:, T -1] ==0))
View rawSimulate 10,000 Investors. Py hostedwith ❤ By GitHub
If you’re still not entirely convinced, here’s why, mathematically:
You know your expected return is zero
What about the revenue limit:
Because:
Because of the law of large numbers
so
Counterintuitive again! The expected return is positive, but the limit is zero. That’s because the last X’s are big, but that’s hard to do. Because of these low-probability X’s, the average return is seen as positive, but in reality most X’s are almost zero.
When investing, tools should be used wisely. Expected returns are a simple and useful tool, but relying too much on them misses some important information, which can sometimes be fatal.
conclusion
Source: Pexels
The author wants to convey two messages through this article:
1. Data science is more than a day job. The mind-set and multidisciplinary skills needed to be a good data scientist are powerful weapons that help people communicate with everything.
2. Don’t be greedy, keep your distance from volatile markets, stop your losses, and know what tools are before you use them. These four investment principles are probably familiar. But only a few people take it to heart, because they learn the rules only through word of mouth rather than the blows of actual failure. By revealing the data and science behind these rules, this article hopes to enable readers to become expert investors without experiencing failure.
Leave a comment like follow
We share the dry goods of AI learning and development. Welcome to pay attention to the “core reading technology” of AI vertical we-media on the whole platform.
(Add wechat: DXSXBB, join readers’ circle and discuss the freshest artificial intelligence technology.)