The Algorithms of the Cryptocurrency Market
Did you know that according to CoinMarketCap.com, around 6,700 different cryptocurrencies are traded publicly? This is from the mouth of a market research website. These cryptocurrencies continue to proliferate, raising money through initial coin offerings, or ICOs. According to the same website the total value of all of these cryptocurrencies on Dec. 18, 2020, was noted to be worth more than $645.7 billion, along with the total value of all bitcoins, which is the most popular of the digital currencies. The bitcoin was secured at about $421.7 billion.
Cryptocurrency is basically known as a digital currency that is used to buy services and goods. It is like a payment that can be made in return for your purchases of some goods and services. Many companies have their own currencies that are often called tokens, which can be traded specifically for the goods or services that are provided by the company.
Cryptocurrencies function through a technology that is called the blockchain. Blockchain is a widely dispersed technology that is spread across many computers. This blockchain manages and records most transactions. This technology uses its online record with the strongest cryptography to secure all online transactions related to it, and this security is the actual appeal of this technology.
Did you know that according to CoinMarketCap, around 6,700 different cryptocurrencies are traded publicly? This is from the mouth of a market research website. These cryptocurrencies continue to proliferate, raising money through initial coin offerings, or ICOs. According to the same website the total value of all of these cryptocurrencies on Dec. 18, 2020, was noted to be worth more than $645.7 billion, along with the total value of all bitcoins, which is the most popular of the digital currencies. The bitcoin was secured at about $421.7 billion.
This article discovers the phenomena that guide and design the implementation of trading algorithms in the crypto space. We will in particular highlight the execution algos, the algos that are market making, and several market microstructure considerations. We will also figure out where practice collides with the established theory, especially while controlling the idiosyncrasies of the crypto markets.
Execution AlgosThe basic objective behind an execution algo is the transitioning of a portfolio state into a slightly different one while minimizing the costs that are involved in this procedure. Let’s say, if you ever wished that you increase your BTCUSD exposure by say about 1000, you wouldn’t consider instantly closing a market order into a BitMEX book, sustaining a loss. You might rather consider gradually getting into the desired position over a certain period of time with a combination of marketing and limiting orders over several exchanges.
The execution algo mostly includes 3 layers that are known as
- The macro trader
- The smart router
- The micro trader
The macro trader layer breaks down a comparatively large parent order meta-order or into some smaller child orders that are spread across some time. This is actually the efficiently scheduling part of the entire algo. VWAP, TWAP, and POV are some of the common and simplest examples of macro trader algorithms. Generally, there are a variety of market impact models that can be employed while designing and creating a more sophisticated macro trader layer. Some of the Market impact models analyze the manner in which the market reacts to an execution algo. Do these markets deliberate on the fact whether the market would stay put where it is after execution has taken place? Or if it would move further away? Or would it return to some extent and to what extent for that matter? The two most influential market impact models are called the permanent market impact model by Almgren-Chriss (1999, 2000) and the transient market impact model of Obizhaeva-Wang (2013). The Obizhaeva-Wang model seems to be more realistic even if the market impact does not seem to be permanent; various new models have been developed to deal with its deficiencies of the Obizhaeva-Wang model.
The smart router layer is the one that decides how to route executions to various venues and exchanges. For instance, if X asset has 60% ease with which it can be converted into ready cash without affecting its market value and an asset Y has 40% of the same up to a certain level, then any market order decided upon by the micro trader should be routed 60–40 to X. For that you could also argue that market makers and arbitrageurs that are present and more familiar with the market will transport liquidity themselves from one exchange to another so if you place half of your order on X and wait for a while, some of that liquidity would restock from stat arbers and arbers moving over Y liquidity to X so you can do the rest at almost the same price. But even then the arber can ask from you an extra amount for their own good profit along with burdening you with costs like X’s maker free. They could also ask some of the market participants to post far more than the actual size they require across different venues and then race to cancel the excess size once they are affected. Therefore, it’s always better to take your own direction. As it has a latency advantage against services of the third party smart routing. In the earlier case, you can head directly to exchanges while in the latter scenario, you are first required to send a message to the third party service who will route your order to exchanges after your message and fee payment.
The micro trader is the layer that is responsible for deciding for each child order, whether to implement it as a market order or implement it as limit order and, if so then, what price should be stated for it. There isn’t enough literature that exists on microtrader design. This is so because a child order’s size is usually a minute part of the entire market that it actually doesn’t really matter how you complete it. But crypto is different as liquidity is such that slippage is substantial even for most common child orders. The Microtrader design is the one that mostly focuses on the order arrival distributions in contradiction to the queue position, time and depth, and other such features of the market microstructure. Market orders in reality are the ones that guarantee execution whereas the resting limit orders provide no such guarantees. If execution is not definite then you fail to meet the schedule that is set in place by the macro trader.
Let’s Discuss the Algos of Market Making
Market making is about guaranteeing immediate liquidity to other participants in the market and being remunerated for it. You take on a risk in for some positive expected value that would be returned. Leading to a place where the market maker is compensated for these two reasons. One of the reasons is because the market takers mostly want immediacy and have a high time preference. Market makers who enable liquidity for its takers are, in turn, compensated for the lower time preference that they have and of course patience. The second reason is, due to the market maker PnL profile is mostly left-skewed and generally most of the people have right-skewed preference. That is to say, market makers are similar to bookies of the casinos, betting markets, state lotteries, and insurance companies. They frequently win small and infrequently lose big. Market makers in return for taking on this undesirable profile are compensated with predicted value.
Complex and ever-evolving algorithms invisibly and silently govern the core processes and control many of the systems that we use on a daily basis and take for granted.
Algorithmically Controlled Coins
Algorithmic stablecoin projects have flourished in recent years, even though fiat-backed stablecoins such as USD Coin (USDC), True USD (TUSD) and Tether (USDT), mostly capture a lot of the volume. While the notion of dollar-related stablecoins is easy to grasp, algorithmic stablecoins are a little more complex. Fundamentally, they are cryptocurrencies that attain price stability through algorithmically increasing the coin’s circulating supply in order to reflect market behavior.
Let’s look at Timvi (TMV), for example, the ERC20 token whose algorithm and collateralized algo-stablecoin targets a $1 price to alleviate its instability the investor’s confidence. The security token basically relies on ETH credits by the participants that are involved in the ecosystem, and the all exclusive financial instruments like the Tbox (correspondent of an interest-free loan), T Bond and Leverage provided for the users an opportunity to earn interest in both phases of the bull and bear markets. Timvi’s algorithm is mostly designed so that the creation of a new Tbox (blockchain based account that converts the ETH to TMV) does not lead to a decrease in the global collateral below the targeted value.
Let us now suppose if ETH’s price drops and impacts the collateral in Tbox, you might be thinking that during these circumstances, the owner of Tbox must recapitalize by putting down ETH or TMV. If they fail to comply, the T Box would be considered to be toxic and other users would step in to take over while getting most of the earnings.
Another much-hyped algorithmic stablecoin is Reserve which is backed by the most of the high-profile investors including DCG, Peter and Thiel Coinbase. Messari considers Reserve as one of their top projects of 2020. Like Timvi, the stablecoin system uses algorithms for manipulating the supply while maintaining its price at $1, striking a unique balance between stability, profitability and decentralization. Reserve is run by a team of 20 companies that include Google and OpenAI veterans, and while it is advised by the Patomak Global Advisors, it is led by Paul Atkins, a former SEC Commissioner. Algorithms are also used in regulating ecosystems like the Makerdao, for controlling its dai collateralization and issuance along with adjusting the supply of Saga’s SGA token.
Algorithmic Strategies in Trading
In the old days, traders would congregate on such floors as stock exchanges, yelling into the phone receivers while making meaningful hand signals. Now with the rise of the electronic markets trades can be carried out through algorithms rather than the humans, without their impulses and emotions that were previously involved in the entire process. These algorithms allowed traders to initiate trades at the highest prices, due to such factors as the trade size, time of day it was and the status of the market.
Today, High-frequency trading (HFT) is as popular a strategy in the cryptosphere as it once was on the stock market. It is a subsystem of algorithmic trading; this high-speed process has witnessed traders utilize algorithmic programs to take advantage of the modest price differences that are seen in the markets. Sometimes, HFT firms go so far as to place their trading servers in close vicinity to exchanges’ matching engines so they can win with respect to speed and make good profits on their arbitrage.
Basically the algorithmic trading incorporates variety strategies which include time-weighted average price (TWAP), through which crypto traders aim to purchase or sell a fixed amount of an asset slowly over a period of time, to what is known as iceberg, where they trade a number of large orders of an asset withholding and keeping the order’s true size from the rest of the market. It is extremely difficult to even imagine a financial market in this day and age operating without any sort of algorithms.
The Transaction-Tracking related Algorithms:
The firms dealing with the crypto forensics such as Chainalysis mostly utilize exclusive algorithms to look over any fraudulent or suspicious transactions on the exchanges, along with identifying certain individuals that are operating in the cryptosphere for the lawmakers and legislators. Chainalysis KYT or Know Your Transaction is one software that tracks transactions that are made on exchanges through the digital assets including the TUSD litecoin, bitcoin, ethereum, and bitcoin cash.
Chainalysis and other such firms are more frequently being taped up to assist crypto platforms for achieving regulatory compliance, predominantly related to the Anti-Money Laundering (AML) processes. They are also used by government agencies like the Drug Enforcement Agency, Europol, and the Department of Homeland Security. They all are desperate to find out the actual names of their crypto users. The Chainalysis’s algorithms are very effective, due to which one would consider using a coin-mixing service to safeguard their privacy.
The Algorithms related to Privacy Enhancing
Relevantly, privacy activists are hitting back with algorithms of their own; a firm named Samourai is creating a tool known as Solomon, a smart UTXO selection.
Solomon is created with the observation that the game between the bitcoin wallets and the chain analysis tools is highly sided. The foremost goal of Solomon is to provide a “memory” to the UTXOs that are controlled by the wallet.
As for the developers, this memory is a more formal tool used for reasoning about the risks involved in a specific coin selection algorithm. For its users, it imparts very useful feedback regarding the wallet; it also provides some information that can prove to be helpful for the coin selection algorithm.
So we have discovered today that the future is algorithmic based.