Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How do I reduce drawdown and volatility

The simplest way I can think about reducing drawdown is to keep track of the peak and then sell (all?) positions if the drawdown exceeds my threshold drawdown percentage.
On the web I see strategies like reverse pyramiding (unwinding your positions as there are %drops in the portfolio), buying uncorrelated stocks and hedging.
Are there better mechanisms that folks here use to reduce the drawdown?

Similarly, how do I reduce the volatility? Using the 3x leverage in the Q open contest seems to be increasing the volatility quite a lot.
One idea I see on the web is to reduce high beta stocks when markets are volatile. Is there any mechanism in Q to obtain volatility of the market?
The other idea for reducing volatility is to invest in bonds, which I don't want to in the algo.
Any other mechanisms?

6 responses

Perhaps a couple of ways to reduce both drawdowns and volatility:
• Reduce your size, and obviously, if you're leveraged, reduce your leverage.
• Increase diversity and the overall number of securities you're trading.
• Watch the VIX (or VXX rather).
• Use profit stops based on range, pivot points, measured moves.
• Use group wide thresholds for risk on / risk off (if 65% of group is faltering, exit or trim entire group).
• Decrease trade length: trade don't invest. Investors can weather (more comfortably) considerable drawdowns.

This is the ultimate question, please let me know when you have it nailed down :) Volatility is associated with risk, so in order to reduce volatility, you have to focus on eliminating any risk exposures that you are not intentionally betting on (your source of alpha).

There is no cookbook, but a common method is to take long/short offsetting positions in 'correlated' assets. Pairs trading is the classic example of this. In this algo I paired AutoZone (AZO) with O'Reilly Automotive (ORLY), both companies have similar business models, and are exposed to the similar market risks, so they should share a similar trend.

In this case the only risk I have any view on is within the automotive retail business, but the auto biz is still exposed to broader market risks like anything else. In order to isolate the risk that I feel I have insight into I buy one and sell the other in equal $ amounts. That way I don't care what the market does, just how ORLY is performing relative to AZO.

Keep in mind that this kind of investing methodology is not meant to 'beat the market,' it's a slow and steady wins the race thing, the goal is to not go down with the ship. This pair underperforms this backtest in practice (maybe worse now if readers trade it) because the bid/ask spread can get pretty wide on these stocks, but the principle remains.

Long story still long, look to eliminate/isolate risks you have no knowledge about. A portfolio of pairs can work well if you are creative with your selection and put your own spin on the idea. Beware of low returns and abrupt losses due to earnings and other unforeseeable events though.

David

Hi Ajay,

One approach is to smooth data a bit prior to analysis. Keep in mind that for a minute bar, Quantopian is reporting the closing price as the last trade of the minute, regardless of volume, so you are just getting a random sampling of the stream of trades. So, you can use something like this:

import pandas as pd

prices = history(5*390,'1m','price')  
prices = pd.ewma(prices, span = 390)  

There are more sophisticated approaches (e.g. incorporating the full OHLCV bar data), but a simple smoothing/filtering of minutely closing prices on a time scale consistent with your trading frequency will help reduce volatility that is simply due to noise.

Grant

Depending on your strategy, scaling out of positions can help.

For example - If you trade 2 contracts, exit one after a set number of bars, and let the other run to it's profit target, stop, or later timed exit. I find this can work well with reversal type trades or breakouts where you expect an initial "kick".

Thanks for the pointers, folks. I used to think as an investor and not bother about drawdowns or volatility much, but with the Q Open equal weight scoring I have started to pay more attention to these.
David and Pete, I guess what I want to do is to reduce the drawdown and volatility within the constrains of my strategy rather than strategies that are built on fundamentals like trading uncorrelated stocks or long/shorts. In future algos, I will have your suggestions built into the strategy.

Market Tech, why do you suggest VXX instead of VIX? This article seems to suggest that VXX may not follow VIX and may not truly represent volatility
http://www.thestreet.com/story/11466965/1/exchange-traded-notes-vix-vs-vxx.html
Also on further research on volatility, I found that there are sector specific volatility indexes which was what I wanted. For example, OVX for crude oil volatility index and VXXLE for energy sector.

Grant, thanks for the pointer. I will try it to see if it affects my algo in any way. I was more concerned about the volatility in my Q Open algo especially since I am leveraging. In trading with my own money, I wouldnt be as concerned about volatility but I guess a good quant needs to be :)

I've run the VXX through its uses as a volatility metric for gauging basic risk on/off track switches. You might want to do the same before you accept the the net's answer. OVX, VXXLE, cool, thanks for those. The market is nothing if not the perfect fragmentation platform. We actually built a product, never sold it though, where one could create one's own ETFs, from whatever fraction of the market one could dream up. It could use custom weighting, equal weighting, or metric weighting (like volume, or volatility). It was created to be used by SMB hedge funds so that they could just buy/sell their own ETF variations without having to manage the baskets manually. And of course they could define the ETFs and back test them to their heart's content. But I digress...