In this article you will learn:
- What margin trading is and how it works, with examples of and formulas for calculation
- Feature and risks
- How to minimize risks and maximize profits with 3Commas tools
Margin trading in a nutshell
Why do we need margin trading and trading with leverage?
When used correctly margin and leverage allow the trader to increase their profit margin with no additional investment costs.
What is it?
Trading on margin is a way to borrow funds from the exchange in order to purchase more coins than you would normally be able to afford. The trader’s funds are used as collateral and the exchange then lends the trader a multiple of that deposit.
Margin and leverage go hand-in-hand. The trader uses margin to create leverage. The margin is the amount borrowed whilst leverage is the increased buying power. To use Bitmex as an example, they express margin in percentages (%) and leverage in multiples (X)
The exchange charges the trader interest which is calculated over a period of time, which could be a number of hours or a whole day. For example, 0.1% interest on the amount borrowed, charged daily.
This may sound like a lot but in reality, it isn’t so much and this is nothing to be too concerned about
Each exchange that provides a margin trading feature will have their own rates and the trader should familiarise themselves with these before they start to trade so that they understand exactly how much they will be paying and how often.
Advantages and disadvantages:
- Margin….that is a profit margin. Traders who make successful trades can increase their profits without the need to increase their working capital
- The risk of proportional losses. A trader who doesn’t carefully calculate their risk to reward ratio can, in an unsuccessful trade, make a larger loss with margin trading than without. High volatility in the cryptocurrency market can bring greater rewards to the successful trader whilst those who are repeatedly unsuccessful can find themselves losing their collateral.
In practical terms how does margin trading work?
In a growing market: Long
You decide to get into a Long position or “Go Long”, where you buy a coin and sell it at a greater price than you paid.
You deposit $300 onto the exchange where you have your margin account set up. $300 happens to be the price of 1 ETH and you believe the price will rise.
You look at the leverage options and decide that 10x is the optimal leverage to use. Let’s suppose that the exchange charges a fee of 0.1% or 0.001 for the margin (loaned amount.)
Without leverage, you will be able to buy 1 ETH with your $300. Using your selected 10x leverage this increases to 10 ETH and your $300 serves as the collateral, the amount you are risking.
You now enter into the trade and from here there are 3 possibilities. Either the price rises falls or stays the same.
Let’s look at what can happen to your collateral and margin (Loaned amount) in these 3 scenarios:
1. If the price rises:
Let’s suppose that over the course of the next 2 days the price of ETH rises to $360 and you decide to sell. Your profit is calculated as such:
360 * 10–300–2700 — (2700 * 0.001 * 2) = 3600–300–2700–5.4 = $594.60
- $360 is the price that you sell at
- $300 is your deposit/collateral
- $2700 = $300 * 9 which is your credit at the exchange
- $2700 * 0.001 * 2 which is the interest charged for the loan (Margin)
In the above example but without margin, your profit would have been $60
How to calculate your income
Take the current price, multiply by the amount of leverage then subtract the amount charged for the use of the loan.
2. If the price falls — it can reach a critical point — the point of liquidation in which case you will lose your entire deposit
In this example, the liquidation price is just over $270 per ETH
How is this figure calculated? If the price were to fall to $270 and you sold all 10 ETH then the resulting amount of $2700 would be slightly less than the debt to the exchange. This is because you were charged interest on the amount you borrowed. You would then not be able to repay the debt in full. Also the longer the loan is outstanding the more interest you will be charged.
The liquidation price in this example is therefore slightly higher than $270.
How to calculate the liquidation price:
- CP = Current Price
- ES = The exchanges share in the asset you bought
- LI = Loan Interest
- CLP = Current Loan Period; Over how many days did you borrow the funds
- IoL = interest on the loan. In our example, we used 0.1% or 0.001
- Take the current price (СP)
- Multiply by the exchanges share in the purchased asset (ES)
- Add interest on the loan (LI) multiplied by the current loan term (CLP)
How to calculate the exchanges share of the purchased asset:
- with 10x leverage (10–1) / 10 = 0.9 = 90%
- with 25x leverage (25–1) / 25 = 0.96 = 96%
And so on.
A quick test for you!
Suppose you bought 1 BTC for $4000 with a leverage of 10x, on what percent of the asset have you borrowed funds?
We hope you weren’t too lazy to work out the answer!
So, the correct answer is……
You borrowed 9/10 or 90% of the price of the asset. On one BTC you will have 4000 * 0.9 = $3600 credit.
Now we will calculate what the critical price will be in 2 days.
You can also do this exercise yourself!
After 2 days the critical price will be 0.2% higher because of the interest charged. It will be 3600 * 1.002 = $3607.20 for 1 BTC.
What if you were counting on the price increases but it in fact decreased?
- Hope for the best and wait for the price to increase
- Sell the asset before you lose your collateral
- Add funds to your account and move the liquidation price IF you are confident in your forecast and consider the drawdown to be temporary
At any time — but particularly in moments of crisis — you can ask for help in the 3Commas chat from the community there.
With option 3 of the above being obvious we will consider the other 2.
We will look at the outcome if you should sell your asset in order to minimize your loss should the price fall.
The potential loss is considered against the potential profit, as described above: multiply the new price by the leverage and add the fee for using the loan.
To return to the earlier example of the 10 ETH we bought for $300 each. If you sell them 2 days later for $280 each then you will receive $2800. For 9 of them, you took out a loan which you will return, along with the interest.
2800–2520–5.4 = $276 which is your remaining deposit.
How to insure yourself against liquidation:
a) Stop Loss
When creating this order you indicate, if the price decreases, at what price you wish to close the trade to avoid even greater losses. Automated trading allows you to make this point dynamic as well as to hedge against short-term price volatility.
- How Stop Loss Works
- How to make Stop Loss follow the price
- Stop Loss timeout: how to hedge, if it is not a reversal, but short-term volatility
A number of exchanges allow you to set up customized notifications for margin calls; they will warn you if the liquidation price is getting close and remind you to either close a position or add more funds to your exchange account.
3. If the price does not change, that is, it stays flat or in a sideways trend
A stagnant price can last for days and, in some rare cases, for weeks depending upon the volatility of an asset.
In this case, your deposit is threatened only by the interest accruing on the outstanding loan amount. They are unlikely to reach large amounts even if you do not sell the asset for some for some considerable time.
Using our previous example of ETH let’s calculate the different interest amounts for varying periods of time. We will assume that the interest charged is on a simple basis rather than a compound one.
With a loan amount of $2700 the interest will be equal to:
- 2700 * 0.1% * 10 = $27 (10 day loan period)
- 2700 * 0.1% * 30 = $81 (30 day loan period)
- 2700 * 0.1% * 60 = $162 (60 day loan period)
- 2700 * 0.1% * 90 = $243 (90 day loan period)
- 2700 * 0.1% * 111 = $299.70 (111 day loan period)
Pay attention to the last case. Suppose that for all of this time the market price of the coin had not changed. The amount of interest due is very nearly equal to that of your collateral (deposit). In theory, as soon as the amount outstanding is equal to your collateral then your position will be liquidated. In practice though after this amount of time you would have already been liquidated or the price of the coin would have gone up.
Otherwise, the percentages, if slowly but surely, accumulate, gradually decrease the amount of net profit, increase the loss and increase the price of the liquidation point.
The percentage can slowly but surely accumulate, gradually decreasing the amount of net profit, increasing your loss and your liquidation point.
It is worth remembering that these unpleasant unintended consequences only really matter with large loan delays, for example, outstanding over several months.
How margin trading works in a falling market: Short
If the price of a coin falls, particularly if you foresee this happening before the event, with margin trading you also have the opportunity to make a profit. This is done by opening a “Short” position. However, the principal of this scenario works slightly different to that as described above for Long positions.
In the preceding time before the actual drop in the price of the asset, you borrow a certain amount of the coins from the exchange and sell them to raise money. You then wait for the price to drop and buy back the asset with this money. The purchase price of the asset will be lower than you originally received when you sold the asset. You return the same number of coins that you borrowed from the exchange but because of the lower price, you will have a profit in cash money. You then return the loan plus the interest on it. You will then be a happy trader with an excess of money which is your profit.
The amount of assets you can borrow from the exchange depends upon how much deposit you are able to provide.
Example: ETH costs $350 and you have $1050 for a deposit. You can borrow 3 ETH without leverage. You then sell them for $350 * 3 = $1050.
However, there are further possible scenarios.
1. You correctly predicted that the price of ETH falls and this it does. You wait until it reaches $280. You then happily buy all 3 coins back for $840. You return them to the exchange, making a profit of $210 minus the interest on the loan.
2. You are unfortunately mistaken and the price of ETH rises and reaches a critical level for your trade. In our example, this is a little less than $700. It works out as a liquidation because when the price rises even higher you will not be able to buy back the 3 ETH and return them to the exchange, along with the interest on the loan.
The risk of liquidation can be minimized in the same way as a Long trade, by using a Stop Loss and price alerts.
Conclusions and consequences:
1. Leverage is a multiple of your collateral, for example 10x
2. Trading with leverage is when you get a loan from the exchange to buy more coins than your collateral would normally allow.
3. In order to trade with leverage, you need a deposit (Collateral) of your own funds
4. The exchange will minimize its risk through a process called liquidation and the preceding “Margin call”
If the price goes against you the exchange will not interfere with your trade for as long as possible. Only once the exchange sees that your trade is going against you by a certain amount will they act to protect the funds they have leaned you. They will forcibly close your trade. This process is called liquidation.
5. Stop Losses and alerts can help you to avoid liquidation.
6. You cannot withdraw cryptocurrency from the exchange that you have bought on borrowed funds.
Margin trading on 3commas for the Bitmex exchange on 3commas will be released soon.
Our chat, where you can always ask for advice or share your experience.
10% discount on promo code “USERNEW”
We wish you all the best!