Skip to content
  • About
  • Blog
  • Trading Strategies

Short Story Long

Against the Status Quo

Introduction to QuantConnect

December 29, 2017 by Aaron Gilman

Lately I have been allocating most of my free time to an open-source Quant platform called QuantConnect. It is a really great platform that allows you to construct your own trading strategies using Python or C# and backtest before implementing the strategies live. It give you a ton of flexibility to program any features and test for significance while not being limited to a predefined set of indicators or signals.

I will be sharing my backtests that utilize ETFs with the code for my readers over the coming months and figured I would start with one of the more popular tactical ETF strategies. The first one I will share is: “Protective Asset Allocation (PAA): A simple momentum-based alternative for term deposits” based on Keller and Keuning (April 25, 2016)
http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2759734

Strategy goal:

– Average, unleveraged return better than SP500
– Significantly reduced drawdown vs SP500

Subject to constraints:

– Monthly rebalancing

PAA strategy summary

1. consider a set of N assets (ETFs)
2. select a protection factor (see below) and maximum number of assets to hold (TopN)
3. count the number (n) of the risky assets with positive prior month MOM (see MOM definition below)
4. compute the bond fraction (BF): BF = (N-n)/(N-n1). (see n1 definition below)
5. Invest a fraction BF of the portfolio into the safe set (bonds)
6. From a set of equities invest the remaining fraction (1-BF) in the top n_eq equities sorted on MOM
7. Hold for one month and then repeat to rebalance

Definition of terms used by Keller and Keunig

– momentum (MOM): to be MOM = (last month’s close)/(SMA over lookback period) – 1
– lookback period (L): L is measured in months
– protection factor (a): a = [0, 1, or 2] is used to adjust the BF gain: n1 = a*N/4
– number of equities to be purchased (n_eq): n_eq = min(n,topM)

If you have any questions or comments, please don’t hesitate to send me an email.

Post navigation

Previous Post:

Becoming a Cyborg

Next Post:

Implementation of Vigilant Asset Allocation from Dr. Wouter Keller and JW Keuning

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About Me

I serve as the Chief Investment Officer for Independent Financial Partners and President of IFP Asset Management. I am a CFA® charterholder, and also have the CFP® designation.

In my spare time I taught myself how to write code in R, Ruby and Python. I use these skills to explore investing and accelerate the way I consume market data.

Recent Posts

  • A Detailed Decomposition of the Market Composition September 24, 2020
  • A Quantitative Review of Inflation and Monetary Policy in the United States September 16, 2020
  • A Letter from the desk of the CIO: Q2 2020 Review July 24, 2020
  • A Tale of Two Frequencies June 16, 2020
  • Staying Grounded During Epidemics March 10, 2020

Archives

  • September 2020
  • July 2020
  • June 2020
  • March 2020
  • December 2017
  • November 2017
  • September 2017
  • August 2017
  • May 2017

Categories

  • Blog
  • Trading Strategies

Securities offered through IFP Securities, LLC, member FINRA/SIPC. Investment advice offered through IFP Advisors LLC, a registered investment adviser. IFP Securities, LLC and IFP Advisors, LLC are two separate entitles under common ownership, and Independent Financial Partners (IFP) is a dba for both entities.