Decentralized cryptographic currencies
A cryptocurrency is a decentralized digital currency.
Cryptocurrencies were born to achieve the crucial and immutable goal of decentralization. Decentralization means that there is no central authority to control the cryptocurrency, the circulating supply, to confirm transactions. They have transaction immutability, meaning that any attempt to revert transactions would lead to chaos in the lives of those who own the cryptocurrency, at least if many other transactions have been performed after the transaction to revert. The potential of such chaos is meant to persuade any central authority that reverting transactions would be far more damaging than not reverting them. A digital currency which isn't decentralized in this manner, isn't a cryptocurrency, and it (and by extension, the lives of the people who have it) is at the whims of any central authority.
Cryptocurrencies, unlike traditional assets, are not owned by companies or governments, so while their creators can disappear, the software and the peer-to-peer network can continue to run, and can be maintained by others. Currently, there is some centralization in most cryptocurrencies; some of them have just a few miners, some have most of their consensus nodes owned by their creators, but things will decentralize more in time.
The vast majority of people probably get involved with cryptocurrencies in order to get rich, and believe that they invest money in companies which will bring them profit. While there are a lot of cryptocurrencies that are designed to work like that, the ones designed to be money are created by companies which want to jumpstart a decentralized platform (of protocols and software) in which anyone can participate to influence and strengthen it. The founding companies will, at some point, fade into the background, while the platforms will remain as infrastructure of this civilization.
Some states want to, and will, create their own cryptocurrencies. A state created cryptocurrency is not a cryptocurrency because it's controlled by one entity, the state, so it's in fact digital fiatcurrency owned by the state, not by the people. It's not decentralized currency, it's centralized.
Blockchain is a small piece of technology which defines how data is chained in order to create a proof of validity that starts from the genesis of the ledger (of a cryptocurrency or digital currency). Blockchain has no relationship with decentralization, which is why it's a preferred buzzword for governments and corporations, as it let's them maintain control while giving most people the illusion that it's somehow related to the financial revolution brought by cryptocurrencies. The same thing is true about the word "distributed (ledger technology)", word which has no relationship with decentralization. Blockchain-based projects are permissioned, centralized, segregated and lack transaction immutability on purpose. They will not reduce corruption of the (highest ranking officials of) governments and corporations, they'll only limit the influence of lone insiders over a system.
A cryptocurrency always uses a Decentralized Consensus Protocol for reaching consensus. The used technology is called Decentralized Consensus Technology.
What is the financial industry sector from which cryptocurrencies are part of? You may hear two names: FinTech and DeFi. FinTech means Financial Technologies and represents a fusion between finance and technology (especially online); it makes no separation between centralized and decentralized services. DeFi means Decentralized Finance and represents a fusion between finance and decentralized technology, the kind started by Bitcoin; it excludes centralized services because it sees them as the main path to institutionalized corruption.
Ignore any cryptocurrency whose creators don't make public the source code which runs the cryptocurrency.
For some cryptocurrencies the entire amount of available units is issued before the cryptocurrency is made public, but for some cryptocurrencies the units are created / mined in time (although some can be mined before the cryptocurrency is made public). In both cases, the software which runs the cryptocurrency can be modified by its issuer to issue more cryptocurrency later.
Most cryptocurrencies have a finite supply (= amount of available units), or have a very small inflation of the supply. Such cryptocurrencies can act as a store of value, like gold, meaning that they can preserve or increase their purchasing power over time; this means that in the future you will need to pay an equal or smaller number of units in order to buy the same thing; this is called "deflation of prices".
In contrast, a currency whose circulating supply increases in time, like fiatcurrency, has a decreasing purchasing power over time; this means that in the future you will need to pay a larger number of units in order to buy the same thing; this is called "inflation of prices".
Since the cryptocurrencies with the largest market capitalization have a fixed circulating supply, it means that their prices (relative to fiatcurrency) may increase in time, in the absence of bad news. This means that the value of the cryptocurrencies that you hold today may increase in time. Obviously, there is no guarantee that a specific cryptocurrency will survive for years or decades.
Be very careful when comparing cryptocurrencies by market capitalization. The market capitalization is calculated from the circulating supply because not the entire supply may have been issued. The supply that will be issued in the future will act as inflation, so someone has to buy the incoming supply just to keep the price at the same level.
Since you can usually own and use fractions of a cryptocurrency's units, with many decimals, a high price per unit is not a problem.
In the first half of 2010, Bitcoin was worth less than 1 cent / unit. 7 years later it was worth over 1'000 USD / unit. This means an increase in price of over 100'000 times, so someone who has invested 10 USD in 2010 and kept it until 2017 became a millionaire. This kind of growth will never be achieved again, not even by far. This has happened because Bitcoin was the start of a financial revolution. As the market capitalization of a cryptocurrency raises, its potential percentual growth decreases because the total possible market capitalization is economically limited.
The World Economic Forum predicts that the market capitalization of the entire DeFi industry could reach 8 trillions USD by 2027. The problem is that you don't know which cryptocurrencies will still have value then, nor which of them will grow faster than most of the others.
The main use cases are: transfer of value, store of value, programmability (with smart contracts), tokenization.
Tokenization is a mechanism which makes it possible to own fractions of (usually) physical assets, like real estate, fractions which reduce the upfront investment and potential risks (through diversification). While tokenization can exist outside cryptocurrencies, in the form of centralized services, cryptocurrencies can bring tokenization into the modern era by minimizing the upfront costs of time, energy and money, and by allowing multiple entities to remain separate yet collaborate in a trusless manner to provide asset ownership. This reduction in friction will allow for the development of a few world-scale tokenization platforms that will become global standards.
The level of decentralization is represented by the degree of difficulty that an organized group encounters in controlling the consensus, that is, the confirmation of transactions. Decentralization is not represented by the number of nodes from a cryptocurrency's network.
In order to quantify the degree of decentralization (D) in a practical way, we need an asymptote that depends on the number of entities that can collude in order to control the consensus. For example, for 1 entity we can have D = 0%, for 2 we have D = 5%, for 10 we have D = 50%, for 50 we have D = 90%, for 100 we have D = 99%, with the asymptotic limit of 100%.
An asymptote is used because the doubling of a low number of nodes (say from 5 to 10) has a much higher effect on decentralization than the doubling of a high number of nodes (say from 1000 to 2000), because it's much easier to seize control of 5 entities than of 1000.
If a single entity can control the consensus, the currency is not a decentralized cryptocurrency, but a centralized digital currency.
Bitcoin is the cryptocurrency which has started the entire DeFi industry. However, its Proof of Work consensus algorithm consumes huge amounts of energy, a transaction may need hours to be confirmed, only a handful of transactions can be performed per second, and the payment fees are too large for small transactions.
Alternative cryptocurrencies have emerged without Bitcoin's technical problems. These use other types of consensus algorithms, like Proof of Stake.
MarketCap = Aggregator of prices. Has API.
Coin Gecko = Aggregator of prices. Has free historical API.
Nomics = Aggregator of prices. Has API.
Ico Drops = Upcoming ICOs and statistics.
Ico Stats = Statistics for ICOs.
Bitcoin Magazine = News.
Coin Desk = News.
Coin Telegraph = News.
Binance = Exchange.
Binance DEX = Decentralized exchange.
Binance Jersey = Fiatcurrency exchange for Europe.
Kraken = Fiatcurrency exchange for Europe.
Keep most of your money off exchanges, for most of the time!
Warning: Many people believe that the cryptocurrency markets work like the stock markets. They want to believe that they invest in something that will make them rich. This is not the case. In the case of the cryptocurrencies designed to be money, there is no company in which you can invest. You can invest in software platforms which have no owner, that is, are decentralized. The software platforms have creators and developers, not owners. The creators and the developers can't help you with problems, like companies can do (or are legally obligated to do).
The most fundamental principle of investing, "buy low and sell high", passes through people's minds like a ghost through the real world: with no effect.
The vast majority of people buy high and sell low, that is, they start buying when they see the price raising, and start selling when they see the price dropping, the opposite of what they should do; this is true for a market which is largely designed to follow the growth of the economy. The greater the raise, the more fiatcurrency they invest. Then, they complain that they are not making or are even losing money, and start searching for that magical recipe (= charts) that's going to quickly make them a lot of money, just like any other betting addict who believes that he's going to beat the "system" with his "method".
When a cryptocurrency's price raises, nobody (charts included) knows whether that trend will continue or the price will decrease, so you have to follow a strategy which increases the potential profit and decreases the potential loss, balancing them, while still betting (rather than knowing) on a rise of the price in the long term.
You must count on a single guarantee: never, ever, never act as if you know what the price will do in the future, be it near or far.
Sadly, most people will continue to ask questions like "Is this a good time to buy?" Why is it sad? Because it's the wrong question to ask. If the answer were "yes", most people would use it as an excuse to invest a lot of money and then blame the person who has answered, for any drop of the price, even though the answer is correct in the context of a long-term investment.
It's also sad because if people ask someone with investing experience whether it's a good time to buy or not, and they are told that nobody can say what the price will do next, they will insist by asking "I understand that nobody can say what the price will do, but what is your opinion?" So, they ask for advice but ignore the actual advice and, since they only accept a "buy" or "don't buy" answer, they are trying to shift the blame for the aftereffect on someone else.
The purpose of a long term investment is to maintain, and possibly grow, the value of the investment over years or even decades.
Some people say that you should invest a lot of money when the price is low. The problem is that you can never know if a price will raise or drop after you start investing, so you have no idea what "low" is (relative to).
The essence of a responsible investment strategy is:
Invest in several cryptocurrencies because nobody knows which of the current cryptocurrencies will still be around in a few years, or how much will each grow. Diversification lowers the potential losses and lets you profit from the growth of several cryptocurrencies.
How do you decide which cryptocurrency to buy? Look at the cryptocurrency's team, at its business connections with the rest of the world, at what problems it's trying to solve, at how it interacts with other industries, at its potential technical performance, at the geopolitical context. Is the cryptocurrency an internationalized effort? Is the emerging cryptocurrency designed for a market in which an established cryptocurrency would have difficulties to enter? How does it compare to other cryptocurrencies which try to solve the same problems? Can it keep the pace of the competition? Why would it have a market capitalization similar with the top competition? At the latest, once the cryptocurrency's own blockchain starts working (= mainnet start), the source code for running the cryptocurrency must be public.
Many people will not buy when the price decreases because they fear that it will continue to do so. But you have to ask yourself why would the price continue to decrease and not recover in the long term? Really bad news are a reason, fear is not.
Some people compare buying when the price decreases with catching a falling knife. This is correct for speculative markets (like cryptocurrencies) that are in the contraction phase, but otherwise it's just normal market ups and downs. Only some speculative markets survive in the long term, so you have to be selective and make informed choices.
In non-speculative markets, even if you were to buy at the top every time, you could still make a profit, like in this example.
No matter how safe your investment strategy is supposed to be, you have to be prepared for severe recession periods when there will be months or years of prices that are much lower than those at which you have invested. If external circumstances force you to sell cryptocurrency during a recession, before the price recovers, you will have to be able to support the incurred losses. This is why you should never invest more money than what you can afford to lose. How do you know if you can afford to lose the money (in fiatcurrency)? Simply consider it lost from the moment you think about buying cryptocurrency with it; anyway, you will not have access to it until you sell the cryptocurrency bought with it.
A cryptocurrency with a small market capitalization can grow percentually much more than one with a large market capitalization, but it can also disappear much easier. Never take a buy decision based on the price, on the number of units that you can buy, or on the total circulating number of units; they are irrelevant as indicators for potential growth.
Follow the industry news, but realize that the people with lots of money, the market movers, will find out the rumors and news before the vast majority of people, and will buy or sell before the rest, leaving the others to buy at the top or sell at the bottom. Then, they'll do the opposite (sell or buy) before the others realize what's happening, leaving everyone else trapped at a loss-producing price (if they were to sell then).
Don't waste your time and energy trying to predict, intuit or guess future prices. Money is made with statistical analysis and risk management, not gut feelings. Gut feelings, greed and fear of missing out (price raises) ruin you in this business.
One of the worst mistakes you can make in investing is to believe that you, after a number of successful predictions (which are actually guesses), have an understanding of how the markets move. Nothing and nobody, be they charts, experts or gods, will save you from the huge mistake that will come at some point, and it will come because you believe that you "get it" now. What you don't get is that all patterns work until they don't, and when they don't, the losses will be large enough to wipe most of your profits (because you will hang in there believing that your pattern will save you, that it will work if you just give it a bit of time).
The fact that people know all these things won't help them. When the time to act comes, a fog of feelings will set over their minds, and logic will desert them. People always find justifications about why they should invest a lot in a cryptocurrency whose price is raising. They'll tell themselves that this time will work because they feel it, that luck is on their side, that they're special people to whom bad things don't happen, that this has worked in the past, that they can see the trend, that this time there is good news, that they know that this cryptocurrency is not like the others and has a history of rebounding quicker than the rest, that this cryptocurrency is the next Bitcoin-like revolution, that this time they will score big to compensate for all the losses, and, finally, that they've heard (on the Internet) of people who do this and make a lot of money. The thoughts of a betting addict. And so, they just click their money away.
State regulation is not bad news. Some investors perceive state regulation to be bad, but in fact state regulation brings stability and predictability for big investors and for businesses. It's important to note that state regulation and banning are different things; regulation means the acceptance and the ordering of the business environment, banning means not accepting and forbidding business. When a rumor about impending state regulation (not banning) causes a dramatic drop of the price, as it usually does, treat that as a good opportunity to buy, but keep in mind that you don't know when the drop will stop.
Invest in emergent markets, if the business model seems sound, because the growth potential (in percents) is greater than in mature markets, and once an emergent market becomes mature, the investment value will have grown much more than it could have grown in a mature market.
For example a cryptocurrency with a market capitalization of 1 billion (at investment time) requires 99 more billions in order to grow your investment 100 times, however, a cryptocurrency with a market capitalization of 10 billions requires 990 more billions in order to grow your investment 100 times, and obviously, it's far easier for a cryptocurrency to grow with 99 billions than 990 billions. Of course, a small cryptocurrency is also riskier for investments since it could disappear easier than a large cryptocurrency, so you should invest only a small amount of fiatcurrency in one.
However, it's important to understand that the price doesn't depend on the amount of fiatcurrency which gets into the cryptocurrency, it depends on the direction in which sellers are willing to provide liquidity, and on the direction in which buyers are willing to consume the available liquidity. This is true for any market.
Liquidity is the ability to trade a large volume of cryptocurrency with very little change in its price.
A market capitalization of X USD doesn't mean that an amount of X USD has changed hands from trader to trader, in exchange for cryptocurrency, or that if everybody were to sell then they would be able to do so at the current price. It just means that the interest of the traders to provide and consume the available liquidity has driven the price to that level.
Some people say that cryptocurrencies are in a bubble, meaning that they are valued too high and the bubble will pop. Say this is true and the prices of all the cryptocurrencies drop to 10% of what they are now. That's a buying opportunity, but you should be selective. In the absence of a fundamental cause that can bring cryptocurrencies to a 0 valuation, the prices should recover, for some cryptocurrencies, even though it could take years.
The profits and losses, expressed in fiatcurrency, of a cryptocurrency are realized only when the cryptocurrency is sold in exchange for fiatcurrency. Until then, its value is like Schrödinger's cat, in multiple states at the same time. While the cryptocurrency is kept, its price could change dramatically during the next few days, weeks, months or years. This means that you should not despair when your investment's value is lower than originally, nor should you gloat when it's higher than originally.
While a decrease of the price of a cryptocurrency A (that you own) decreases your investment's value, if you believe that the price of a cryptocurrency B will raise before the price of the cryptocurrency A raises, you can move your investment there without a loss. Even if you do sell, if you later buy back at the sell price then it's as if you haven't sold.
In metaphorical terms, if an elevator gets you down a few floors, you can take back up any other elevator, not necessarily the same. Still, you don't know in which direction any elevator goes, so randomly jumping from one to another might in fact bring you all the way down to the ground floor. In fact, you will most likely jump to a cryptocurrency which had a recent price raise, so you think it will continue to raise without limits, but that's a bad moment to jump to it.
If you start feeling like the market is a living organism that reads your mind and always makes large movements against you just before or after you act, it's because it's true. The market doesn't have anything personal against you, it's just that you are part of the vast majority of people who are predictable and are too slow to recognize a good opportunity and act on it on time. And if you recognize a good opportunity but are unprepared to act on it, the result is the same.
Many cryptocurrencies, before they start trading on the biggest exchanges (by volume), go through a pump-and-dump scheme. Such a scheme starts with speculators driving the price up by buying as much cryptocurrency as possible. Other people see the significant price raise and also start buying, increasing the price further. Once the cryptocurrency starts trading on a big exchange, the speculators sell as much as possible (starting from the biggest price), before other people realize what happens and start selling as well.
Selling a cryptocurrency limits the potential profit because the price could keep on raising, and if you were to later buy at a higher price, you would lose the difference between the sell and the buy, compared to what would have happened had you not sold.
If you sell, you don't have to sell everything. You could sell only half, and keep the other half invested because the price of the cryptocurrency might raise.
Never do margin / leveraged trading; this is reserved for trading, not for investments. The volatility is already high for cryptocurrencies.
Do you need stop-losses? If you invest on the long term, if you are sure that you can endure years of recession without selling cryptocurrency, if the cryptocurrency will still be around in years, so long as the price is going to continue to raise (because the industry grows), stop-losses are not mandatory.
Always use limit orders because these will be executed at the specified price or one which is more profitable for you. This is very important in a market with a limited liquidity, a market in which your orders may need a long time to be executed.
In a speculative industry where investors expect the price (per unit) to raise in time, a market will go through the following phases:
An investor who doesn't sell (most part of the investment) before the contraction phase, will likely make no profit (and will possibly lose money). Since it's not possible to know when the maximum price will be, the investor should sell a part when the price raises significantly (since the last sell). For this, when the price raises a number of times since the last sell that the investor made, he should sell a significant part of the cryptocurrency he still has (at that point). If the market is not speculative, this action will severely limit the market's profitability.
This article isn't a recommendation to start investing or trading!
Investing money is risky: you might lose all the invested money!
Never invest more money than what you can afford to lose!
Do not borrow money, do not mortgage or sell your house, do not liquidate any life investment you have (like the pension fund), in order to buy cryptocurrency! Do not risk your future for cryptocurrencies!
This strategy is specifically designed for investors who don't make a living from investing and trading, for cryptocurrency markets, markets which are expected to grow over time.
This strategy considers that the cryptocurrency prices are expressed in fiatcurrency, prices which in the long term should be raising.
This strategy is just an example that you can build on. All the values specified here have to be adjusted to the real context.
Create a pool of several cryptocurrencies that you could invest in. These should be available on the exchanges that you use.
Let MS be your fiatcurrency monthly savings, that is, the fiatcurrency that you save each month, but not more than half of your monthly income (regardless of how large your income is), which you want to invest in cryptocurrencies.
Let IS be the investment slice of fiatcurrency. Calculate IS = MS / 30. MS is divided to 30, the number of days in a month, because you want to have fiatcurrency to invest every day.
If you have large savings that you want to invest in cryptocurrencies, you should split them in several parts and each month add one part to the monthly savings. How many parts you split them into depends on you, but the larger the savings are, the more months it should take to invest all the parts. Don't divide in too many parts, each part should be at least equal with MS.
You should buy small amounts of cryptocurrency often because you never know whether the price will move up or down in the future, so you don't want to lose opportunities, but you also don't want to risk too much fiatcurrency in a single, large purchase.
Once a day, at any time it's convenient for you, buy cryptocurrency using IS fiatcurrency. This method is called cost averaging.
If you can only buy once a month, buy using the entire monthly savings (IS = MS), in the day the monthly savings become available. In the simulation section you can see that buying daily and buying monthly have similar performances (over a long term and many cryptocurrencies).
Regardless of how the prices of cryptocurrencies vary, always buy using the same amount of fiatcurrency. This means that, for example, if the price doubles then you'll be able to buy only half as much cryptocurrency, while if the price halves then you will be able to buy twice as much cryptocurrency.
Avoid buying during days with extreme volatility (compared to most days).
Buying the dip
While nobody can know whether the price will go up or down, no matter the timeframe, there are markets where it is believed that the price of assets will raise in the (very) long term because those industries will grow in time, and since the supply of the assets remains fixed, the price will also rise. In such markets, "buying the dip" is a good investment technique.
Buying during price dips decreases the possibility of using your entire investment budget to buy at what might be the highest price, but nothing protects your investment if the price trends toward 0.
Evaluate daily if you can buy a cryptocurrency from the pool, which has a significant dip relative to its previous high (but only after the last dip buy).
Let P be the current price of a cryptocurrency.
Let H be the highest price of the cryptocurrency, from the past, but only after the time when you've made the last dip buy for the cryptocurrency. To compute H, ignore intraday parabolic price raises because these are short lived. If the cryptocurrency has a significantly variable circulating supply, H should be the highest market capitalization (not price).
When P is below H with a percentage (from H), buy the cryptocurrency; the percentage could be 10%. This technique is called buying the dip.
This technique can be performed manually, aware of real life events, at big support levels (not at fixed percentage drops).
It's best to combine daily or monthly buying with dip buying.
If you want to be sure that you don't miss the buying opportunities created by price dips, set up notifications, via mail or SMS, for the desired prices. Do not set buy orders in advance because other investors can see all the existing orders.
Selling the raise
In a speculative market, an investor who doesn't sell (a significant part of the investment) before the contraction phase, will likely make no profit (and will possibly lose money).
Since it's not possible to know when the maximum price will be, the investor should sell a part of a cryptocurrency when its price raises significantly (since the last sell).
The sell price will be determined by multiplying the previous lowest price with a multiplier. The multiplier should not be a fixed value, but a double asymptotic value, once for low prices (/ market capitalizations) and once for high prices (/ market capitalizations). The main reason for this is that as the market capitalization increases, it becomes more and more difficult for it to raise with the same percentage because the incoming investments don't grow (either at the same rate or at all), so selling should be done more often. At the same time, if the market capitalization is low, you don't want to link a specific multiplier to a specific reference price (/ market capitalization).
Let SRM be the sell raise multiplier.
Let LMC_SRM be the low market capitalization for the SRM. LMC_SRM could be 10 millions.
Let SRML be the sell raise multiplier for a low market capitalization. SRML could be 2 at a market capitalization of LMC_SRM.
Let HMC_SRM be the high market capitalization for the SRM. HMC_SRM could be 100 billions.
Let SRMH be the sell raise multiplier for a high market capitalization. SRMH could be 1.1 at a market capitalization of HMC_SRM.
Let SRMA be the sell raise multiplier adjuster. SRMA could be 1.
Let SC% be the sell cryptocurrency percentage to sell every time. SC% could be 10%.
Evaluate daily if you can sell a cryptocurrency from the pool, which has a significant raise relative to its previous low (but only after the last raise sell).
Let P be the current price of a cryptocurrency.
Let L be the lowest price of the cryptocurrency, from the past, but only after the time when you've made the last raise sell for the cryptocurrency. If the cryptocurrency has a significantly variable circulating supply, L should be the lowest market capitalization (not price).
Calculate SRM as explained in the section "Calculating SRM" below.
When P is above L * SRM, sell SC% from the the cryptocurrency. This technique is called selling the raise.
This technique can be performed manually, aware of real life events, at big resistance levels (not at calculated raises).
This selling technique is sensitive to the value of HMC_SRM in the sense that this value should be around the maximum market capitalization of the cryptocurrency for which it's being used. Obviously, you can't know this value since it's going to change in the future, so choosing a value is a bet.
This means that a small value (1 billion) is good for most cryptocurrencies, while a large value (100 billions) is good for cryptocurrencies with a large market capitalization.
This means that a small value is good when investing in a lot of cryptocurrencies, while a large value is good when investing in only a few carefully selected cryptocurrencies that (you expect to) have a large market capitalization in the future.
Of course, you can use different values for different cryptocurrencies, depending on what you think each will be worth in the future.
To calculate SRM, first limit the market capitalization between LMC_SRM (the minimum) and HMC_SRM (the maximum). Then scale the result between 0 and 1.
As the market capitalization of a cryptocurrency increases, it becomes more and more difficult for it to raise with the same percentage (in the same timeframe), so its growth rate decelerates.
To account for this deceleration, use a non-linear equation to compute SRM from the value scaled above. Use SRMA as the deceleration factor.
Note that complicating the SRM equation without a rational reason for doing it that specific way, is curve fitting.
Dip buying calculation sample
Here is a simple example of why it's efficient to buy dips, while still betting that the price will recover, at least in part.
Let's say that cryptocurrency CC has a price of 10 USD. You use 500 USD to buy 50 CC.
The price drops to 1 USD, and you use 50 USD to buy again 50 CC. Now you have 100 CC for a total investment of 550 USD.
At this price, the value of your CC is 1 USD * 100 CC = 100 USD, so the current value of your investment is down to 100 USD / 550 USD = 18% from the total investment.
If the price goes to 0, you have lost 550 USD.
If the price increases to 5.5 USD, the value of your CC is 5.5 USD * 100 CC = 550 USD, so you've recovered your entire investment, even though the price is a lot lower than the original 10 USD.
If the price increases to 10 USD, the value of your CC is 10 USD * 100 CC = 1000 USD, so you have a profit of 450 USD, even though the price is the original 10 USD.
Here's an industry-wide statistical analysis which allows an evaluation of the performance of various investment techniques. More investment techniques (than those presented here) were simulated.
For those not interested in the details, the conclusion of the (investing and trading) simulations is that you should spend your time researching money and risk management, cryptocurrencies, industry trends and market behavior. You should balance your investment strategy with daily or monthly buying (see BD and BM), dip buying (see Dip), and raise selling. Skip charting and predictions. Don't get hung up on choosing between BD and BM: either of them is better than the other in different scenarios.
The simulator loads the historical prices for all the cryptocurrencies for the current top 400 by market capitalization. There is an observational bias (specifically a survivorship bias): cryptocurrencies that were at some point in the current top 400 but have vanished later, are not included, so they don't affect the result.
Multiple scenarios were created, by applying various filters. The diversity of the scenarios is meant to reduce curve fitting due to a specific market behavior during a specific time frame.
Some scenarios show only some cryptocurrencies that were hyped when they appeared. This was done to show the difference between random investing, and investing in the hyped cryptocurrencies.
The historical data is validated like this:
All dates are formatted "Year-Month-Day".
All averages that directly use prices are harmonic. A harmonic average gives the accurate average price when purchasing cryptocurrency with the same amount of fiatcurrency, every time. An arithmetic average gives the accurate average price when them same amount of cryptocurrency is purchased every time, something which is not sustainable. Harmonic averages are better at showing parabolic price raises, because they raise very little during short time frames.
"A" is a harmonic average price, at the specified moment, for a number of previous days which is set by the "A period" setting. "A" is calculated only if a market has enough days (previous to the moments of H and C) to cover "A period", unless the "Unfilled A period" setting is ticked. If "A period" is 0 then all the available days are used to compute the average, not just a fixed number of days.
If the "MC instead prices" setting is ticked, all calculations are performed with the market capitalization instead of prices. This is because the circulating supply (which is part of the market capitalization) can vary wildly for some cryptocurrencies, even in a short time frame.
Header line legend:
The monthly savings are added to the budget in the day of the month specified in the "Day in month when MS" setting, starting with the occurrence before the day of the BRP, so it's presumed that fiatcurrency is available at any time to invest.
Each investment technique performance can show either the absolute or the relative profit. If the "Absolute profit" setting is ticked then each value shows the realized profit (in units of invested budget), else it shows the realized profit per unit of invested budget (= the realized profit divided to the invested budget); the second value is the invested budget; if you multiply the two values, you obtain the realized profit. Each unit of the invested budget represents 1 monthly savings. The budget slice used for each buy made by BaH and Dip is 1 monthly savings. This let's you see that if the absolute performance of Dip is, for example, half of the performance of BM, by doubling the budget slice used for Dip, you can achieve the same absolute profit as BM.
Each investment technique performance contains more information within parenthesis:
Due to various circumstances, not all the budget allocated for investing may be invested, although the remainder is tiny. The performance calculations use only the invested budget, not the allocated one, so the performance indicates what could have happened to the invested (not allocated) fiatcurrency.
The distinction between the allocated and invested budgets could remain a footnote if it weren't one of the most important aspects of investing (and trading). There are investment techniques (like BaH and Dip) that can produce huge returns (relative to the invested budget), but only work in very specific conditions, conditions which (due to risk management and money availability) allow you to invest only small amounts of money at a time. This means that such a technique might produce an absolute profit similar to or lower than that of a simple technique (like BD and BM) that produces a smaller relative profit, but allows to invest a much higher budget (in time).
The distinction between the relative and absolute profits is critical for Dip, when you want to invest in very few cryptocurrencies. This is because it's possible that their prices don't drop after your first buy in each cryptocurrency, which means that you would be unable to increase the invested budget in each cryptocurrency. In such a case it's recommended to combine BM with Dip (so use BM and then dip buy on top of that). This allows the accumulation of as much cryptocurrency as possible, in the early days of a cryptocurrency, without taking the risks associated with investing all the money in a single purchase.
An effective way to increase the relative profit is to buy as much cryptocurrency as possible when its market capitalization is small. This requires you to do the things below. If you do these things, the potential absolute profit (and loss) decreases:
All investment techniques do raise selling if the "Enable selling" setting is ticked. Only a part (10%) of the available cryptocurrency is sold every time.
If the "Stop buying if coins wouldn't double with budget" setting is ticked (and the value is 12), the relative profit is significantly increased, but the absolute profit is decreased; "significantly" means anything between 50% and 500% and even more.
The smaller "Buy dip %" is, the larger the absolute profit is.
Simulations show that the SRM equation works similar whether it's a power or an exponential function, but the SRMA must have a different range of values for each case. This was expected considering the similarity of the equation plots. While there are some differences, choosing between the two options may be curve fitting, that is, there is no way to say whether they will behave the same in the future.
Each investment technique, each parameter, has strengths and weaknesses. None will perform best in all scenarios. In summary:
The trend of the markets can be seen from the performance of BaH: well under 0 represents a downtrend, well over 0 represents an uptrend.
If you are looking for the least riskiest, regardless of the time frame, you have to look for the most average in all scenarios, the BD and BM. As a side note, BD and BM have a better performance than the EMAs crossover; for trading it's a different story because traders want to get out of a market as quick as possible (which the EMAs crossover makes possible).
Between the dates 2017-01-15...2018-01-15, for hyped markets, the relative performance is here (numbers represent "* MS"): BaH = 72, BD = 68, BM = 67, Dip = 62.
Between the dates 2017-01-15...2020-04-25, for hyped markets, the relative performance is here (numbers represent "* MS"): BaH = 33, BD = 27, BM = 27, Dip = 24.
Between the dates 2018-01-15...2020-04-25, for hyped markets, the relative performance is here (numbers represent "* MS"): BaH = -0.63, BD = -0.46, BM = -0.47, Dip = -0.44.
Between the dates 2020-01-15...2020-04-25, for hyped markets, the relative performance is here (numbers represent "* MS"): BaH = 0.21, BD = 0.06, BM = 0.08, Dip = 0.09.
Generally speaking, the more markets are included in the simulation, the lower the performance gets. For example, the performance for the selected hyped cryptocurrencies is greater than the performance of the cryptocurrencies from the top 100, which is greater than the performance of the cryptocurrencies from the top 400. This means that, generally, it does pay off to be selective, but keep in mind that many unicorns raise up from the lower positions.
For cost averaging, aside from BD and BM, other buying triggers (that are not displayed) produce a similar, yet mostly lower, performance, and are more sensitive to the chosen parameters. The ones that do barely improve the performance are not worth the complexity for manual investing, and obviously have no guarantee for the future performance. For example, to improve the performance just slightly on a very long term, look at the chart every day and if you see a downtrend for the previous 10 days, avoid buying; if you still have fiatcurrency (from the monthly savings) in the day before the next monthly savings become available, buy.
If you're wondering if for BD and BM it would be better to buy with more than the normal slice (IS) when the price is under an EMA (slow or fast), and buy with less when the price is above an EMA, simulations show that it's not better, it simply averages out. Even worse, during long uptrends you lose a lot of profit because the price is always above the EMA, be it slow or fast, so you invest less. During long downtrends you quickly run out of money to invest (since each day you invest more than 1 / 30 from the monthly savings), which means that you buy at higher prices than if you were to buy toward the end of the investment month.
The data is retrieved from CoinGecko and has some specifics: it provides an average price per day, rather than OHLC, so you may see significant differences from other data sources, especially regarding the highest price.
What's being argued here is not whether someone can or can't make a profit using technical analysis, but whether technical analysis predicts anything. If a trading algorithm makes a profit smaller than what could be made by simply holding the original investment in the cryptocurrency, then it's not a predictive algorithm.
Traders always try to make a profit before others can, so trading is a giant poker game. This is why the future can't be predicted by the past.
Technical analysis can only describe what has happened in the past. When it's trying to predict the future, technical analysis is like astrology.
If technical analysis tells you that in the future the market will go up... unless it goes down, it's useless. To be useful, it must tell you only one of the following signals: wait, buy, or sell.
The price, the volume, the order book, the indicators, the overlays, they all show what was and what is, but never, ever, can they show what will be.
Technical analysis overfits the patterns to the data, so it works for the past because the analyst changes the described pattern to fit the analyzed data for the time frame.
Believing that technical analysis predicts the future of a market is like driving on a road and believing that the road predicts where you are going since it always surrounds your car. In both cases, you are the one who is overfitting the patterns to the data. Just like you are the one following the road, and not the other way around, also a technical indicator is following the market, and not the other way around. Just like you can't know how the road will turn next (just because you saw how it turned so far), you also can't know how the market will turn next (just because you saw how it turned so far).
Some people say "But look at how the price moves around the average, at how it bounces when it touches the Bollinger band, it obvious that TA works!" The average shows you what has happened, not what will happen; it contains only past information. In fact, the average follows the price, not the other way around. Same for the Bollinger band. That's why the price is sometimes way off from the average, or outside the Bollinger band: because the TA indicators will follow the price at a later time, not the other way around; they can't predict the future, they only describe what has been (on average).
Some people say that TA works because everybody follows the same signals. If the majority of traders were to follow the same signals, for example to buy, then the price would move up because if someone buys then someone must sell. If not enough traders sell, the price would move against the majority (= up), trying to find the requested liquidity.
"Against the majority" means exactly that, not against the first movers. If the majority of traders buy, the price moves up and you might think that's a good thing (= not against the majority). However, the price would move most for the first buyers, and not at all for the last buyers. In the meantime, the successful traders would start selling, which means that the price starts moving down (because there are no more buyers). This means that the first movers make most money, while the last movers lose most money.
Not convinced? Then ask yourself, who makes money from trading? The majority of traders who follow the same signals, or the few experienced traders who are the first in what they do and take the position opposite to the majority? Also ask yourself, who is rich, the majority or the few? If the majority of people are not rich then why would you do the things that the majority does, why would you not change, why would you avoid doing what is needed to become at least as knowledgeable and experienced as the rich people? Why not? The answer is simple: because you are part the majority of people. Change!
Why does TA appears to work sometimes? Because the investor buys low and sells high, and because the investor uses tools which increase the probability to make profit. These tools are: money and risk management, industry-wide statistical comparisons, gathering and interpreting the rumors and news (even using machine learning), understanding the mass behavior of investors, and even trading algorithm simulations which show what doesn't work. It also appears to work because of an observational bias where people think they know how to trade but in fact the price happens to move in the expected direction (for example, up for long positions).
There are lots of recognizable patterns on charts. The problem is that all these patterns are transformed continuously, that is, they are scaled, sheared and rotated in unpredictable ways. Recognizing them afterwards is utterly useless, and in fact it's dangerous because it makes you think that recognizing them is useful in making a profit. It's like seeing shapes in coffee grounds; sure, you can see shapes in coffee grounds, but they have absolutely no effect on the future.
For example, in technical analysis there is a pattern called "pole and pennant" which is supposed to predict that a significant change in price will follow. This pattern looks like a triangle with the base on the left side and a vertex on the right side. This triangle is the result of mass behavior, that is, it's the effect of a cause. A significant change in price does follow, but not because of a geometric shape on a chart.
The reason why this triangle appears on the chart is that, firstly, the price moves in cycles, meaning that significant changes (up or down) are followed by small changes (called "consolidation"), then followed by significant changes, and so on. Secondly, in a period of consolidation cryptocurrency is bought at continuously increasing prices (= with an upward slope) and sold at continuously decreasing prices (= with a downward slope), with the buys and sells centered around the middle of the triangle. Once the price flatlines and the triangle gets its right-side vertex, meaning that profit can no longer be made with small price changes, a significant price change follows (possibly only after a while). The direction of this change is determined by external causes, not by geometric shapes, and this direction is the only thing that matters when trying to make a profit.
Trading can increase the potential profits (compared to investing), but at the same time increases the potential risks.
Trading is like a giant game of poker, that is, the participants try to make a profit in a zero-sum game. There is a slow increase of the total value of the markets which have a limited number of shares, because the economy increases in time, just not enough to matter for trading, only for very long term investing.
A trader must be very determined to succeed. You might think that you are too, but you are competing against the world's best traders, you are competing against organizations which get the news before they become public, and which simulate and execute their trading with farms of computers. How good are your chances? Some informal research says that, in the traditional markets, 1 in 30 (male) professional traders can make a profit that will keep them in the business for many years. Some formal research says a similar thing. That's 1 in 30 people who try trading professionally, not of all people, not of home traders! So maybe stick to investing? If you ever hear someone (on the Internet) saying that "TA works", remember to add in your mind "for 1 professional out of 30". Still, trading can easily turn you into a millionaire... if you start out as a billionaire.
In the same time frame, it's most likely that you would make more fiatcurrency by simply holding your original investment in the cryptocurrency. Plus, you would not have to go through the effort and stress that trading requires, and you would not risk losing everything.
Trading requires the trader to "buy low and sell high". Don't interpret this as "buy the bottom, sell the top"; you don't need to know where either the bottom or the top are.
Beginners ask themselves what this means in practice, they ask how they can possibly know when the "market turns", that is, when the price stops decreasing and starts increasing. The answer is simple: you don't know, nobody knows. This is the wrong question to ask, a dangerous question which will keep you stuck in the belief that you have to know for sure.
The correct question is: how do you make a profit? Profit is not made with predictions since there is absolutely no way to predict the future price, it's made with statistical analysis and risk management. To make a profit you don't need to know the exact movements of the price, you need the probability to be in your favor. The winning trades must bring more profit than the losing trades bring losses, so that they can cover the stop-losses, the exchange's fees, the price slippage (because the available liquidity might not cover your orders, in their entirety, at precise prices), and the taxes.
You can use any algorithm which signals you to buy and sell, but, in order to make a significant, sustainable profit, the algorithm must be simulated with past data, and then used for the future in the hope that the future will be similar enough, even though not identical.
If you buy low and sell high, the amount of fiatcurrency you have is multiplied (compared to the original) with the sell price divided by the buy price.
Your ability to trade (and therefore increase your budget) is limited by the liquidity which is available during the execution of the orders, so don't image that you can trade millions with the same ease as thousands. The liquidity can be inferred (with good precision) from the volume.
If you want to make an order to buy / sell a significant percentage from the (short-term) traded volume, your order will get entirely filled only if you use a limit order which allows the price to move against you, beyond what you intended to use as a price. This allows more liquidity to become available for your order. This is called price slippage and eats a part of your potential profit. This means that beyond a certain amount of currency, the trading budget must be split among several orders and executed at different times, and even for different cryptocurrencies; even so, there still are limits.
A trade's closing price can be a combination of:
Making a profit from trading depends on the price going both down and up. It is however irrelevant when this happens, it's irrelevant if the price is trending up or down, it only matters if you find opportunities when you can buy low and sell high, no matter what the price is.
Here is an example. Let's say that you have an amount of fiatcurrency F1. You wait for the price to drop to half from the maximum price from the past 2 months. Then you buy. Then you wait for the price to double, and sell. At this point you have amount of fiatcurrency F2 = 2 * F1. After 3 such trades you have F4 = 8 * F1.
How do you chose your trading algorithm? You simulate each potential algorithm, with various parameters, on the past prices for the chosen cryptocurrency, whether manually or with software. The more detailed the simulation is, the smaller the risk can be. You only need to know the open, high, low and close prices of each candle. Also, the volume is useful to get an idea about how much you can trade during a candle.
It's best to simulate with software because once you implement your algorithm, you can instantly simulate it over any period of time, with any set of parameters, for any cryptocurrency. You can also continuously simulate the algorithm using new data, to see if the parameters have to be changed because the market has changed its structure. You can even implement an optimizer which finds the most profitable simulation; do keep in mind that you have to strive for repeatability, not profitability.
You must simulate your trading algorithm! There is absolutely no way around this. Slight variations can mean the difference between ruin and richness, and an algorithm which works for one cryptocurrency might not work for another. Any algorithm that works in simulations is a potentially profitable way to trade, but a simulation can only give you the optimal algorithm for the past. A simulation's result is no indication of what the used algorithm will do in the future.
If you find an algorithm which shows an enormous potential profit, you should not gloat. You have just overfitted the solution / curve to the data, so the algorithm would not yield a similar profit on other time frames. You could, in theory, find an equation which describes every ebb and flow of the price, for a given time frame in the past, equation which shows an astronomic potential profit, but will the price movements be exactly repeated in the future? Absolutely not, so this equation will either bring zero profit in the future, or ruin you. The best algorithm is not the one which shows the highest potential profit, but the one with the most repeatable pattern (which you can't know in advance).
Once you simulate the algorithm on a specific time frame and get a good profit, simulate it on several other time frames which are close to the initial time frame; they have to be close because it's presumed that the market has the same characteristics for nearby time frames, but could have other characteristics for time frames which are farther in time.
A simple algorithm will better fit across multiple very different types of price movement, even though the profit will be modest. There will always be price drops followed by price raises, but the exact same ebbs and flows of the price will never be repeated. So, strive for repeatability, not profitability.
The shorter the trading time frame is, meaning the time between the opening and closing of an order, the faster and more reliable the Internet connection has to be. Retail traders should not try trading on time frames shorter than 15 minutes because they would be unable to compete with trading farms, and the resulting price slippage could lead to ruin.
Price movements are trend-based, not random. You might think that this is a good thing, that you need trends to make a profit, but random movements actually create more trading opportunities, and therefore increase the potential profits compared to the case of trend-based movements.
Some people say that since the price movements are not random, it's possible to make a profit from them. Poker is also not random, it's based on the ability to read other people, yet when playing against the best players in the world the majority of people will lose everything. The same happens in trading.
While artificial intelligence can be used to find profitable solutions which elude humans, it normally works when there is a target to find, that is, when it's possible to iteratively improve on potential solutions until an optimum solution is found. However, trading is a moving target, a target which tries to evade whoever or whatever attempts to catch it, a target which plays poker with its participants. Artificial intelligence works best when it has access to and can interpret news before they are released to the public.
Stop-losses are extremely expensive and can quickly decrease your budget to a fraction of the original one. For example, 3 stop-losses of 20% will bring your budget down to 50% from the original one; it's presumed that margin / leveraged trading isn't used.
Do you need stop-losses? If you were to do margin / leveraged trading, the stop-losses would be automatic. If you trade on short time frames, you need them; without them, you would periodically end up unable to trade for a long time, and unable to sell (for a profit) because the sell price would be well below the buy price.
To decrease the probability of losing your entire budget in stop-losses, you have to split your budget in several parts and only risk a single part in a trade, at any given time. For example, split your trading budget in 3 parts. If you have a 20% stop-loss (because the volatility is high) and you use no margin / leveraged, after 12 consecutive stop-losses (equally distributed among the budget parts) your budget becomes 40% of the original. The more careful you choose when to trade, the smaller is the probability for a stop-loss to occur.
To compensate for possible changes in the market behavior over the long term, you can use several different algorithms which yield a profit in simulations.
Trading in traditional markets is different than trading in cryptocurrencies because the volatility is much smaller. Because of this, traders have to use leverage, and because of this they have to use stop-losses, and because of this they can't invest using a buy-and-hold strategy, and because of this they have to use trading algorithms which make a profit which is smaller than a buy-and-hold strategy (when ignoring the margin liquidation requirements).
Here is an example of simulated trading during a time frame which includes uptrends, downtrends and ranging, using EMAs crossover, for ETH-USD. The yellow squares are buys, the triangles are sells, and the red circles are stop-losses. The crossovers are filtered by some parameters because the pure crossovers would bring virtually no profit. The simulation includes buy and sell fees, a decent amount of price slippage for positions sized to about 10% of the actually traded volume, and leverage with a 40% margin liquidation level. The simulation doesn't include income taxes, which would decrease the profit further.
The resulted budget is increased 1.22 times with no leverage, 1.30 with leverage 2, 1.26 with leverage 3 (less than for leverage 2), 0.34 time with leverage 4 (which is less than initially). While shorting would bring a bit of profit during the down trends, they would add stop-losses.
You can see that the trading signals are well positioned at bottoms and tops, yet the result is inferior to buy-and-hold. During the same time frame the price rose 1.42 times (42% profit). Even worse, daily cost averaging would have resulted in a profit of 140%. So the (filtered) EMAs crossover is literally worse than the (daily) average. However, since EMAs crossover allows shorting during downtrends, it's full effect may be significantly different (either positively or negatively).
When using EMAs crossover, leverage is good only during trending prices because it amplifies the potential profits (and losses), compared to investing. During ranging prices, leverage barely increases the final potential profit because the stop-losses are also amplified, but dramatically increases the potential risk of ruin. Due to the very high volatility of cryptocurrencies, leverage is much riskier than it is in the traditional markets.
If an algorithm makes less money than what buy-and-hold makes, then it's not a predictive algorithm; if leverage is used, ignore the margin liquidation requirements during buy-and-hold. Such an algorithm simply goes where the market goes, but reduces the risk (and profit) compared to buy-and-hold. It can still make a profit, too small to make anyone rich, but not because it predicts anything, but because it forces the trading to follow the prices for a part of the movement. Such algorithms are useful for entities which are already rich because a small percentage from a lot of money is still a lot of money.
Compounding (of profits) can make anyone rich, but it doesn't work. In order for it to work it would be necessary for the price to move in the direction that you expect.
Let's say that you simulate an algorithm which does well for the simulated time frame, and get a set of parameters. Compounding would work if you could get the same profit for all future time frames. But here is the catch: this doesn't work. If you were to extend the simulation to a much larger time frame, using the same parameters, you would see that the total profit is nowhere near the compounded profit.
The reality is that the algorithm parameters would yield the same profit only if the price would move in the same way. So, basically, all you need for compounding to work is a price which moves in the expected direction, which is equivalent to knowing the future.
Compounding would also work if you could successfully profit from jumping from cryptocurrency to cryptocurrency, just before the price of each is about to raise significantly, which is equivalent to knowing the future.
Implementation details are far more important than what algorithm you use for entering / buying and exiting / selling, especially the details related to how you close the trade.
When you simulate a trading algorithm on past data, you have to be very careful about how you use the data from the moment of each simulated trading signal (which tells you to buy or sell).
The simulation algorithm has to iterate through all the candles, from the oldest to the newest, and for each candle (let's call it the reference candle) it has to go back a number of candles in order to gather the information required to compute the trading signals (which tell you to buy or sell during the reference candle).
A simulation will use the OHLCV (open, high, low, close, volume) of the candles. However because in real time trading the newest / current candle is being developed, its proper values (other than O) are unknown, so they can't be used until the candle is complete, which means that you can only buy and sell at the candle's open or close price (because you know when each occurs). It would be safe to use the values of the reference candle for signals, so long as you execute all the simulated buys and sells at the candle's closing price.
If a simulation shows a very high profit, it's most likely that you have used the values of the reference candle that you can't know during the reference candle.
A good implementation of an algorithm that uses a basic EMAs crossover, with no leverage, should yield a maximum profit similar with what buy-and-hold would yield for the same time frame. This should hold true no matter how short or long the time frame is; this is the reason why compounding doesn't work, that is, because it doesn't work for buy-and-hold.
Be pessimistic about your algorithm and presume that the buying price is going to be less favorable to you for most of the time.
It's best to display your trading signals on a chart, so that you can see how they all cluster, and how the losing trades cluster. If there is significant clustering, the repeatability of your algorithm is low, so you will likely not make money with it, and you might even lose money.
Leveraged trading allows you to amplify the potential profit and potential loss by a number, and is normally used in markets where the small volatility doesn't provide enough profit potential.
More interestingly, leveraged trading allows you to make a profit when the price of a cryptocurrency decreases, by short short selling the cryptocurrency.
Basically, when the price of the cryptocurrency is P1, you borrow (from the broker) cryptocurrency CC1 with which you buy fiatcurrency FC1 = CC1 * P1, hoping that the cryptocurrency's price will decrease.
The prices are expressed as P units of fiatcurrency for 1 unit of cryptocurrency ( fiatcurrency / cryptocurrency), written as BTCUSD (so the opposite of the division).
In order to get this loan, you need to reserve a collateral deposit (called margin) at the broker, in the shorted cryptocurrency CCOL = CC1 / L, where L is the leverage that you are using. L is an integer number, at least 2.
When the price of the cryptocurrency decreases to P2, where P2 < P1, you buy cryptocurrency CC2 = FC1 / P2 = CC1 * P1 / P2 with the fiatcurrency that you have obtained from the earlier sell (FC1).
However, you buy only enough to cover the loan from the broker, so only CC1 = FC2 / P2. This means that you only have to sell fiatcurrency FC2 = CC1 * P2.
The rest of the fiatcurrency is your profit FCP = FC1 - FC2 = CC1 * P1 - CC1 * P2 = CC1 * (P1 - P2) = CCOL * L * (P1 - P2).
Keep in mind that your margin must be able to cover, at all times, your loss, so CCOL * (1 - MLL) >= LOS. LOS = CC1 - FC1 / Px = CC1 - CC1 * P1 / Px = CC1 * (1 - P1 / Px), when Px >= P1.
This means that CCOL * (1 - MLL) >= CC1 * (1 - P1 / Px), so CCOL * (1 - MLL) >= CCOL * L * (1 - P1 / Px), so (1 - MLL) >= L * (1 - P1 / Px), so (1 - MLL) >= L * (Px - P1) / Px, so Px * (1 - MLL) / L >= Px - P1.
The broker will automatically close a short position if the cryptocurrency's price Px >= P1 / (1 - (1 - MLL) / L), when Px >= P1.
The broker will automatically close a long position if the cryptocurrency's price Px <= P1 / (1 + (1 - MLL) / L), when Px <= P1.
MLL is called margin liquidation level and it usually is around 0.4...0.5, but can be even 0.
Brokers automatically close a short position before its loss reaches the margin, in order to maximize the possibility to sell the fiatcurrency that you've bought, and buy the cryptocurrency that you've borrowed, ability which may be hindered by a limited liquidity when the price increases quickly.
If you want more information on this subject, search the Internet for "backtest trading software", "algorithmic trading software" or "algorithmic trading platform".
If you were to build your own simulation software, you would implement and know every detail of the simulation process, and you would be able to keep your algorithm private.