Use AlgoLab to hedge against stock loses in the case of a stock market down turn

Use AlgoLab to hedge against stock loses in the case of a stock market down turn

Let say the value of my current stock portfolio is $100,000, and I'm worried about the next bear market. An average bear market loss is 27% and lasts for about 1 year (14 months to be exact, but lets just estimate 1 year for simplicity). In my case, I would want to protect against a $27,000 stock portfolio loss.

So how can I use AlgoLab to hedge, or to possibly offset some of those potential losses, and how much would that "insurance" cost?

1. Open the Performance Viewer and open the "SuperSystem" multisystem, and specify only the three stock index symbols "Sp500 E mini", "NASDAQ index", and "DOW index". Also, since Gold is sometimes correlated with stocks, and sometimes negatively correlated, lets include Gold in the mix as well.

Note, that with $50,000 of capital, the SuperSystem multisystem trading these 4 symbols only on both the long and short sides would have earned a theoretical $416,000 in just over 10 years.

2. Now specify "SHORT" bias only, and open the "Filters" panel. Copy and paste the following text block into the field under "Specific Dates Filter":

ES,03/01/2007,7/16/2007 ES,3/17/2008,5/23/2008 ES,03/10/2009,4/21/2010 ES,09/01/2010,05/04/2011 ES,12/19/2011,3/29/2012 ES,06/05/2012,9/28/2012 ES,11/15/2012,3/30/2013 ES,06/06/2013,09/08/2014 ES,10/22/2014,5/22/2015 ES,2/16/2016,4/25/2017 NQ,03/01/2007,7/16/2007 NQ,3/17/2008,5/23/2008 NQ,03/10/2009,4/21/2010 NQ,09/01/2010,05/04/2011 NQ,12/19/2011,3/29/2012 NQ,06/05/2012,9/28/2012 NQ,11/15/2012,3/30/2013 NQ,06/06/2013,09/08/2014 NQ,10/22/2014,5/22/2015 NQ,2/16/2016,4/25/2017 YM,03/01/2007,7/16/2007 YM,3/17/2008,5/23/2008 YM,03/10/2009,4/21/2010 YM,09/01/2010,05/04/2011 YM,12/19/2011,3/29/2012 YM,06/05/2012,9/28/2012 YM,11/15/2012,3/30/2013 YM,06/06/2013,09/08/2014 YM,10/22/2014,5/22/2015 YM,2/16/2016,4/25/2017

GC,03/01/2007,7/16/2007 GC,3/17/2008,5/23/2008 GC,03/10/2009,4/21/2010 GC,09/01/2010,05/04/2011 GC,12/19/2011,3/29/2012 GC,06/05/2012,9/28/2012 GC,11/15/2012,3/30/2013 GC,06/06/2013,09/08/2014 GC,10/22/2014,5/22/2015 GC,2/16/2016,4/25/2017

These are the dates for all BULL MARKETS from 2007 to 2017 for the 3 stock index futures contracts plus the Gold futures contract.

Select the radio button "disallow trades between" and the results shown in the Performance Viewer will be results OUTSIDE of the BULL MARKET periods. In other words, they will be results from BEAR MARKET ONLY PERIODS.

What we are trying to accomplish here, is find capital and risk settings that would provide us with an average annual profit during bear market periods of about $27,000 to cover our estimated stock market losses. So, we can just take the profit and divide by 10 periods (there were 10 bull market periods in our pasted text file) to calculate what our average annual bear market profit might be for short positions only.

Using a capital amount of $50,000 and a risk setting of .5 results in total profits over the 10 year back test period of $200,698 which would be an average annual bear market profit of about $20,000, which, for our purposes, is close enough to our $27,000 goal.

So how much does this hedge lose during bull markets? Well, we can just switch the radio button to "allow trades between" and we can see that these short-only trades would have lost $10,000, which is an average of only $1000 per year. Therefore, our "insurance" cost is $1000. This $1000 "insurance premium" would ensure that if there was a bear market, we should earn profits approximately equal to our stock losses of around $27,000.

So to put this another way, with this hedge using AlgoLab, if the next year turns out to be a bull market, this hedge would probably lose around $1000 because AlgoLab would be placing short trades in an up-moving market. However, presumably your stock portfolio would be earning a profit. If the next year does turn out to be a bear market, then you will probably lose around $27,000 in the stock market, but those losses would be offset by your $20,000 profit from AlgoLab trading short-only during that time frame.

The more traditional 'hedge' against a bear market would be selling short futures contracts worth the exact same value as your stock portfolio - which would mean that your hedge would never gain you anything because in a bear market your futures gains would always be exactly equal to your stock losses, and in a bull market, your futures losses would be exactly the same as your stock gains. At least this AlgoLab hedge has a net profitable end result.

To close, I just need to say that I did these calculations very quickly, and there is quite a bit of estimating, and rounding going on here. But.. this isn't an exact science anyhow.

Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
  • Greg's Blog
  • LinkedIn
  • Facebook
  • Instagram

© 2020 by AlgoLab Capital Management Ltd.  |  Privacy policy  |  Contact us  |  Terms and Conditions

AlgoLab Capital Management, Ltd. is registered with the CFTC as Commodity Trading Advisor and is listed as an NFA member (NFA # 523700). This web site has been published in the United States and is not intended for use by, or to provide any information to, residents of Canada.