Back to Community
More returns or more risk-management?

Hi,

I know the risk management or risk-control is very important. In my algos I normally will have a function, trailingstop() for example, which check if a stock draws down 10% for example, I will clear this stock. But I found, the returns, no matter in short turn (about 2 to 3 years) or long turn (more than 5 years), the returns will be much lower than that when I don't use the trailingstop().

I wonder how about by yours? Do you set the risk-management in your algos?

Cheers

Thomas

6 responses

Thomas,

Risk management for an investment portfolio is a much more robust process than just selling the under performing stocks.
While reviewing investments that have had done poorly is a good idea, it needs to have some structure around the review.
This is especially difficult in algo trading, which happens quickly and when doing a back test is very hard to monitor.
Running a multi year backtest takes a few minutes, but if you were really running the strategy you would have all those days/months/years to stew over the positions your algo is suggesting/trading, when it is under performing the urge to act and sell stocks that have had recent poor performance can be very strong. With a simple strategy of selling all losers, there can be issues:
1. If the market as a whole has a significant decrease in a short time, you might end up liquidating several stocks right as the price has hit a low.
2. You may be trading on short term noise, is the stock that was sold volatile (higher standard deviation) than the rest of the portfolio, if so then the mark of 10% may be arbitrary and inappropriate for that particular stock.

It would be better to look at why those stocks were selected in the first place and what caused the issue. Maybe go back and look at which stocks were sold and see if there is an obvious reason why? Then you can tweak your algo to exclude them in the first place. Did it drop because the company had a major issue? Did it drop just because it is generally more volatile? Was it part of a larger market move or isolated to that particular security? Are there other factors other than just returns that would better signal a time to sell, maybe fundamental factors or credit quality of the firm?

As far as general risk management, max drawdown is important but should be calculated on a portfolio level, not individually. If you have a long/short strategy, selling a stock that loses money may not be taking into account the unusually good performance of the other side of the portfolio. If your portfoio has large drawdowns, then you need to look at your selection criteria and the market conditions in which your algo does poorly. Maybe you built an algo that out performs in a low-volatility market, but if volatility increases it does poorly or you have a great defensive algo that does well in market downturns, but poorly in a bull market. It is incredibly difficult to make an algo that performs well in all conditions, the mythic money printing algo.

The nuance of market conditions and the specifics of the stocks that are being traded can easily be lost in the blizzard of pipeline selection and high speed backtesting, but it is critical in real life.

There are a lot of metrics, other than just returns, that will help you identify and manage risk.
A great first book on risk management is:
The Essentials of Risk Management, Second Edition 2nd Edition
by Michel Crouhy (Author), Dan Galai (Author), Robert Mark (Author)

Best

"Running a multi year backtest takes a few minutes, but if you were really running the strategy you would have all those days/months/years to stew over the positions your algo is suggesting/trading, when it is under performing the urge to act and sell stocks that have had recent poor performance can be very strong. "

"The nuance of market conditions and the specifics of the stocks that are being traded can easily be lost in the blizzard of pipeline selection and high speed backtesting, but it is critical in real life."

Thanks to Cory for writing all of that. I cannot emphasize enough the importance of the two above points he mentioned. Looking at an equity curve of 10 year backtesting might look very plausible but there may be periods of months or even a year where the algo is underwater and most fund managers/algo writers will crack under that pressure.

There is no one risk management technique that fits all strategies. For some, a trailing stop could help and in others it is deadly. One thing that you should be doing along your stock selection routine is to keep an eye out on the "broad market." That could mean look at a basket of stocks with close correlation to the stock in question, the health of the sector which the stock belongs to, or ultimately the current regime of the entire market. Additionally, think about what your strategy is doing logically. Does a trailing stop fit your thesis? How often should it be evaluated? Can you use sentiment or other instruments as safeguards?

Hi,

Many thanks to the precious suggestion from you two.

As you said "There is no one risk management technique that fits all strategies." In my hundreds of backtesting I seldom find a big drawdown. But just by one backtesting I find the returns draws rapidly from +55% to -44% just in one day. I zoom in the "Transaction Details" and find, one bio-stock, which I short, rises from about 3.5 USD to more than 30 USD in one day and just by the market opening. Surely I can set a filter to fill out the stocks under 5, but this can be happen by a stock higher than 5 or even 10. I can also filter out the bio-sector, but this can also happend in other sector such as oil-energy sector.

This is the difficulty for me.

Cheers

That is an incredibly large jump in stock price in one day. What happens to that stock in the next few trading days? Does it go back down or stay high, there is a chance that the pricing for that particular day and stock are incorrect?

You are right, that there isn't a filter to ensure that you can't have a big move in your portfolio. I would say that filtering by price doesn't seem like a good way to go, as stock price has very little bearing on the stock's fundamentals or returns.

If you have a few stocks that you want your algo to explicitly exclude, you can build a list of symbols not to trade and have the trading portion of your algo check against the list before trading.

Cory

If you have a few stocks that you want your algo to explicitly exclude, you can build a list of symbols not to trade and have the trading portion of your algo check against the list before trading.

Surely I can set such a list. But who knows if another stock could causes the rapid drawdown in the future? I think, it's not possible and nobody can predict which stock will make desasster. This is maybe the challenge by risk management.

Thomas

I wrote this response but never got posted so here it goes again.

If the security in question is having a gap up or down after hours there is really no reactive technique such as trailing stoploss to prevent that. Filtering stocks by a set price is a naive an ineffective way to accomplish what you want (even though you should always filter out certain stocks based on their dollarvolume and price but those are broad safeguards). What you could do, is to look at the correlation between the security you are about to pick and a basket of stocks behaving similar to it based on fundemntals and technicals and spot odd behavior using that. Same idea could be applied to the sector the stock belongs to and ultimately the broad market. You want to be able to separate abnormal returns, negative or positive, from general trends. Additionally, you could construct a probability function factoring in different risk metrics to characterize the risk of the security you are about to invest in. This last point is ultimately very doable using options which is very tough to do on Q and requires your own data feed and outside server. You need to somehow determine the volatility of the security in question and based on that decide how to proceed. Depending which method or combination you use you will actively or passively have to adjust the exposure of your portfolio to that stock.