My system design rules for Portfolio123.com
Ignore if you are not interested in Backtesting!
Hi, this a very “quanty” and keyword-like post. Ignore it if you are not interested in backtesting. I wrote it for myself and thought this might be a good post for backtester :-)
Here we go:
Backtesting needs design rules:
Not more than 3-5 buy and sell rules (altogether). Make sure your buy and sell rule are not very restrictive (e.g., EPSExclXorGr%PQ > 0 [earnings growth last quarter without “booking tricks”] is better than EPSExclXorGr%PQ > 15.7).
Ranking systems with a lot of nodes fine, best equally weighted or if higher weighted than have a reason (stock momentum and industry group momentum (=network momentum = increases the buy and sell signal) or earnings development with a higher weighting is fine) for higher weighting.
Find an academic paper on the factors you add to the ranking system, their backtest is usually longer than the 20 Year backtest on P123! Also understand the factors you use (Value factor does not work if the value stocks do not improve their earnings at least at a shorter timeframe).
If you add a node or a buy and sell rule, make sure you have a reason (e.g., earnings drive momentum, network momentum use for spillover momentum etc.). Brute force (testing everything without a sound idea) seldom leads to good out of sample (that opinion is controversial, I know traders who do it very, very successfully, even very big successful hedge funds do it, just not my cup of tea!)
For example, positive earnings rate of change --> stocks with accelerating earnings the last 8 weeks (1 week is tricky, carful!) seldom lead to bad performance.
Also, out of sample performance for the ranking system is important. My best systems come from systems that had a good out of (> 3 Years!) sample, which I then improved with very little changes. Build a lot of systems that you put to OOS Time, watch them, almost all (> 95%!) my systems have o.k. out of sample (which means that I have o.k. design rules, if a ton fail, go back to your design rules!). And everything without 3 Years of out sample is flexing, ask for OOS!
All my systems use variable slippage (can be as high as 5% on a micro-cap!). Again controversial, I know traders that beat the variable slippage by a wide margin. But I am using variable slippage as a safety net. If I beat it in my real time trading, fine, if I match it fine too!
Get ideas from successful discretionary traders, what do they do and how can it be systemized (I was not able to match their performance, but some stuff might improve your systems, hint —> CANSLIM is a great source!).
If systems “track” the market with relative strength (e.g., market up, system up hard, market bit down, cap curve shows early relative strength when market still in drawdown): this is good, you got something! Systems all over the place with no definable and unstable beta to the market: ditch them!
Try shorting systems and find out that they do not work ;-) (never made them to work well, my take: it is a rabbit Graveyard, or I am too stupid).
There is one exception: shorting parabolic moves (too stressful for me and I do not have a broker that gives me the lending):
With variable slippage (good traders beat them and they play secondary offerings!):
0% slippage:
Use factors that trend well: http://dx.doi.org/10.2139/ssrn.3844484 momentum:
Sensitivity analysis: if you change the weighting of your ranking system slightly or your buy and sell rules slightly and your system is all over the place, ditch it, the cap curve should only change slightly too.
Always ask yourself what the system is doing. I got for example systems that have a buy rule of Rank > 99, Sell < 90. When you buy those stocks most of them dip immediately: But some go (even if you look at the chart and say this is overextended) up hard and make up more than the losses. Also, the once that survive the sell < 90 threshold stay in the system, even when they pull back, if they find their footing (shorter term reversal) you have a great stock in the portfolio (it means the fundamentals are so strong that shorter term negative momentum (for that momentum needs to be in the ranking system) is not forcing a sell --> points to strong fundamentals.
Run your systems with hedges, if a 50%, 50% long short portfolio is not showing alpha, you got not much (then you have beta, not alpha, can be fine too, but then you have to time beta!).
Run your system for micro, small, mid and big caps. Yes, big caps will be worse, but the cap curve of the big cap system still should be “explainable” (“tracking the market”) and it should outperform the SPY by a wide margin the last 10 – 20 years.
Run your system with 5, 10, 15, 20, 30, and 50 Stocks. The 5 Stock model can be volatile as hell, but still should outperform and should be the strongest (or almost the strongest) system on a total return basis! The 10 Stock portfolio should already look pretty stable! If you run the system with > 20 Stocks and it loads cash instead of stocks (e.g., is not fully invested all the time) that can be a good lead for a good system (= small edge that cannot be played with high assets under management = good!). Those systems that often load cash can be used in a system book; they smooth out the cap curve (e.g., the books shows lower drawdowns 1+1 = (sometimes) 3). Also combine seldom edges in a book (e.g., combine systems that load cash in different market regimes). Use system books with systems that catch different edges, the results are staggering!
Also, I think market timing is important, no system in the world does well all the time.
So, market timing (with tools outside of P123) is important.
Bulkowski has a great market timing: https://thepatternsite.com/CPIUpdate.html
My Micro Quads ( = Network Momentum based on factors that trend well) still need out of sample but first results are very promising!
Exclude financials or you need special ranking systems for financials!
What I do is: I hedge my portfolio with leverage (hedge is always a short 30-40% on the IWM) as soon as network momentum of strong trending factors (high beta, long term reversal, residual variance and small minus big) turn sour. Quad 1-2 or Quad improvement from 4-3, Bulkowski green, and T2108 (Breadth indicator in TC2000) showing strength from lower levels (10-20) + COT Positioning @Crowded_Mkt_Rpt + Liquidity fine @RobertPBalan1 --> System book already at a high while SPY still in a drawdown: leverage (1.3) time! Quads worsening (from 1-2 to 3 or from 3 to 4) --> hedge time!
Or let your book run long / short and do not bother!
Last but not least: (if you do not manage huge AUM and can hedge!) do not listen to macro data, the market frontruns GDP and Inflation! You can be faster. Use factor timing instead. And if everybody questions the trend or tells you $IWM is a proxy for small caps (it is not, IWM is loaded with junk and factors that trend terribly) https://www.sciencedirect.com/science/article/pii/S0304405X18301326): even better!
All right here you have it ;-)
All the best and best regards.
Andreas
The information on from Andreas Himmelreich / QuantStrike and this video / blog is for information and discussion purposes only. It does not constitute a recommendation to purchase or sell any financial instruments or other products. Investment decisions should not be made with this video / blog, and one should consider the investment objectives or financial situation of any person or institution.
Investors should obtain advice based on their own individual circumstances from their own tax, financial, legal and other advisers about the risks and merits of any transaction before making an investment decision, and only make such decisions based on the investor’s own objectives, experience, and resources.
The information from Andreas Himmelreich / QuantStrike and this video / blog is based on generally available and paid information and, although obtained from sources believed to be reliable, its accuracy and completeness cannot be assured, and such information may be incomplete or condensed. All performance results are hypothetical and the result of back testing only. Out-of-sample performance may be different. No claim is made about future performance.
Investments in financial instruments or other products carry significant risk, including the possible total loss of the principal amount invested. Andreas Himmelreich / QuantStrike and this video / blog do not purport to identify all the risks or material considerations which may be associated with entering any transaction. Andreas Himmelreich / QuantStrike and this video / blog accepts no liability for any loss (whether direct, indirect or consequential) that may arise from any use of the information contained in or derived from Andreas Himmelreich / QuantStrike and this video / blog.










Hello Andreas, would you like to share a referral link to the Portfolio123 platform? I might want to check it out...