Trading - Essential Risk Management Tips

Trading is exciting, especially in the wild and highly volatile cryptocurrency markets. In all of the excitement that is the crypto markets, it can be too easy to throw caution to the wind and try to chase exorbitant returns you may have seen others gain without proper risk management. However, this is not a wise investment strategy and is essentially gambling.
Risk management is, or should be, a key aspect of your overall trading strategy. Anyone can be lucky and have 5 winning trades in a row; you can equally be unlucky and lose 5 trades in a row. However, utilising proper risk management techniques can mean the difference between those losing 5 trades being an inconvenience, or seriously depleting your available capital.
The focus of my article will be on automated trading systems written in Python using the Jesse framework; however, you could utilise these techniques in manual trading as well.
Capital Allocation
One of the most common phrases you hear when talking about investing is “only invest what you are willing to lose” — this is also true for trading. Following this advice will mean that you will be less likely to make emotional decisions related to your trades and will allow you to have a better mindset when making financial decisions.
Before trading, you need to decide on the total capital that you want to allocate to your strategy. Both trading and cryptocurrency markets independently are highly risky ventures and put together, increases the risk further. You should be mentally prepared to lose all of the funds you put into it, even if that outcome seems unlikely. This means that you should ideally keep the total capital for your strategy a low percentage of your entire portfolio of investments, the exact amount will be dependent on your personal risk tolerance.
Stop-Losses
The use of stop losses can be effective at mitigating the risks present in volatile markets by cutting you out of a trade that isn’t going your way. There are many different methods that you can use to set your stop-loss, some of which I will show below.
Static Stop-Loss
A simple example of a stop-loss is to sell when the asset decreases 5% from your entry point, assuming you are long. Therefore, if your entry price is $10000, your stop-loss would be set at $9500. Using the Jesse framework, this can be shown as:
entry = self.pricestop = entry * 0.95
Here, I have set the entry equal to the current price of the asset, and the stop-loss to 5%. This means cutting my losses short to protect my overall portfolio. Obviously, I have used 5% stop-loss as an example and you would need to find out what works best for your strategy. A wider stop-loss would mean a higher potential loss but would reduce the chances of being stopped out and vice versa for a narrower stop.
Dynamic Stop-Loss
Dynamic stop-losses improve on static ones as they take into account the current market conditions when placing the stop, an example of these is the Average True Range (ATR) Indicator.
The ATR is essentially a measure of the average volatility of an asset over a given period. It is useful for determining stop-loss points as it reduces the chances of your trade being stopped out as a result of market volatility.
The ATR for the current period is defined as the greatest value of:
Current High — Current Low
|Current High — Previous Close|
|Current Low — Previous Close|
The averages of these values over a specific period are then used to form the ATR indicator. Luckily for us, there are plenty of open-source technical analysis libraries available on Python that calculate the ATR for us.
I have chosen a 14-period ATR in this example, but again you must find out what works well for your strategy. You can then use this value to calculate the stop-loss on each trade:
entry = self.pricestop = entry – 2.5 * self.atr
Here I have set the stop loss to be equal to: 2.5 x The ATR value. You may want to increase this for longer timeframes (e.g. 1 day) or decrease it for shorter timeframes (e.g. 1 hour). Also, this is assuming you are in a long position. If you are short, you need to change the sign from - to + in the stop variable.
Trailing Stop-Loss
A trailing stop-loss will move if the asset moves in your favour, but will stay in place if the asset price moves against you. This allows you to “lock in” your profits as you go along and will protect you if the market turns against you. Below is an example of a trailing stop-loss calculated using the ATR indicator shown above:
Position Sizing
Position sizing is another important aspect of risk management. Risking too much per trade could lead to a complete loss of capital within a few bad trades. Most traders recommend risking around 1% of your capital and usually no more than 5%. However, you can utilise dynamic position sizing methods which take into account various risk/reward metrics to improve control over your risk exposure, similar to the stop loss examples.
One method favoured by some professional traders is the Kelly Criterion, this is an equation that requires the historical probability of a profitable trade and the win/loss ratio as inputs and gives you an optimal position size based on these inputs. The equation used in the Kelly Criterion as well as more details can be found here. This position size technique can be implemented in Python, using the Jesse framework:
All of these examples can be used to manage your risk according to your own preferences and by utilising proper risk management techniques you can increase the profitability of your strategy.
Best of luck in the markets!
DISCLAIMER: The information in this article is provided for educational purposes only. I am not a financial advisor and this article does not contain financial advice. Conduct your own research and make your own financial decisions, or consult a professional financial advisor.