ETF Weight Scaling?

Georg -

I tried to replicate this but got crap. See below. What am I doing wrong?

  • Yuval

Screenshot_2019-11-22 Simulated Strategy Trading System - Portfolio123.png


Yuval,
I made visibility public. No need to hide it - I have much better models than this in my lineup.
Also, I reduced number of trades by holding RSP for at least 3 weeks because of the odds you mentioned.

https://www.portfolio123.com/port_summary.jsp?portid=1590919

Thanks, Georg! I see my error now: I had “Allow Immediate Buyback” set to “No” instead of to “Yes.” Silly me!

Happens to me as well. Then one wonders why one gets nonsense.

BTW, look at my 5 pos small-med cap sim (MktCap > 130 and <1,800 and Price > 2). It uses some modified buy rules from your Small Cap Winner screen rules, which you recently posted. Uses, apart from the main ranking system, three other P123 ranking systems, two of which require the buy rank to be higher when my “$comp” market timer signals down-markets for stocks. Perhaps, this is another way to use market timing successfully.

Eval($comp<50,Rating (“Core: Sentiment”) > 75 ,Rating (“Core: Sentiment”) > 35)
Eval($comp<50,Rating (“Core: Quality”) > 65 ,Rating (“Core: Quality”) > 50)

This model shows an annualized return of almost 70%, max D/D= -32% (with Andreas’ market timer), and reasonable turnover of 490%. From Jan-2004 to Nov-2019 the initial investment of $10,000 goes to $43.6-million, with variable slippage.
I will launch it soon as a DM so we can watch it.


Hi Geov,

Thanks for providing an example.

What does " | " mean in your rules (it’s not listed in the P123 syntax)?

Thank you

Scott

Hi Scott,

I am sure someone will correct me if I am wrong. But it seem to mean the same thing as it does in python. It means “or” (actually the “bitwise or”) and it will give you the union. Just like “&” is the bitwise “and” that gives the intersection.

-Jim

“|” stands for “or”. It is useful when a rule is very long - one can then shorten it with “|” and “&” symbols.

For reference the Small Cap Winners screen is here; https://www.portfolio123.com/app/screen/summary/232655

Good that you posted it again.
BTW all the ranking systems used in my Small Cap Winners sim are public or have been posted in the forum. I changed nothing in them.
Attached are trading stats.
Note that Total Trading Cost / Ending Market Value = 8.5% which comes from variable slippage.


Georg, I appreciate your posting these ETF models. I have not used market price trends for timing but the results you show, with the elimination of online commissions allowing greater turnover, makes me take notice.

In duplicating your RSP versus IEF model using crossover timing, I rewrote your buy rule in a way that should be equivalent but the results are not nearly the same. Can you, or someone else, point out why these rules are not equivalent?

Your buy rule:
ticker(“rsp”)&(sma(50,0,$SP500)>=sma(200,0,$SP500)|sma(10,0,$SP500)>=sma(40,0,$SP500)) | ticker(“ief”)

My rule that is meant to be equivalent:
Eval((sma(50,0,$SP500)>=sma(200,0,$SP500))|(sma(10,0,$SP500)>=sma(40,0,$SP500)),ticker(“rsp”),ticker(“ief”))

I equate your buy rule to a generalized statement like:
ticker(x) AND (truth OR truth) OR ticker(y)

and I equate mine to a generalized statement like:
Eval((truth) OR (truth), ticker(x),ticker(y))

To me, both forms should be equivalent but the resulting transaction dates are very different. Please, what am I overlooking?

The rules are not equivalent.

Rule 1 says that if either of the moving avg crossovers (MACs) exist then the model can buy RSP or IEF, depending on the rank in the Ranking System, or if neither of the MACs exist then the model buys IEF.

Rule 2 says that if either of the moving avg crossovers (MACs) exist then the model must buys RSP , or if neither of the MACs exist then the model buys IEF. Rank is not considered.

If you want to use the Eval statement, then the buy rule eqivalent to Rule 1 would be:
Eval((sma(50,0,$SP500)>=sma(200,0,$SP500))|(sma(10,0,$SP500)>=sma(40,0,$SP500)),ticker(“rsp,ief”),ticker(“ief”))

Thanks for the explanation, Georg. I learned something!

Georg,

For the ETF model RSP-IEF → Great model considering the returns for something with so few trades and only 2 ETFs. I am thinking of using it for my “base / limited risk” portfolio in combination with an ETF model of mine. I prefer to use several simple models combined in a book rather than a super-convoluted one.

Do you remember when you first designed it and therefore for how long has it been running “live / forward testing”. My thoughts: you cannot be finger pointed for possible hindsight on sma(50,0,$SP500) versus sma(200,0,$SP500) - it is too well known / standard for that- but I do not think that the sma(10) vs sma(40) is that commonly used.

NB: as a possible improvement, it might be worth testing adding a layer of seasonality (e.g. summer = underweight RSP and overweight IEF). You might have already tried that.

For the 5 small caps model, if you make it a DM, could I suggest making it a 10-stock DM? You might go from 70% AR down to 60% but -for one- I would be interested in a 10-stock model but not 5.
Also at 60% AR, who needs more?

Jerome

Jerome, you just need a long and a short MAC such as 10-40, 5-40 even works better.
Best to keep it simple, an annualized return of 15% over 21 years is excellent, and also only positive returns for each of the 21 calendar years.

One can get a 15.55% annualized return by just relying on the ranking system and the sell rules.

Buy rule is just:
ticker(“rsp,ief”)

Sell rules:
ticker(“rsp”) & (sma(50,0,$SP500)<sma(200,0,$SP500) | sma(5,0,$SP500)<sma(40,0,$SP500)) & NODAYS>17
ticker(“ief”) & (sma(50,0,$SP500)>sma(200,0,$SP500) | sma(5,0,$SP500)>sma(40,0,$SP500))

This simple model out-performs all of the 7 Large-Cap P123 stock models for which performance is shown from Dec-18-2006 to Nov-22-2019.
https://www.portfolio123.com/app/investment/add-new?browse=1&step1=SS&sst=1

For the RSP-IEF model from Dec-18-2006 to Nov-22-2019 Total return= 477%, annualized return= 14.52% and max D/D= -19.0%, and only 81 realized trades over this period, which translates on average to only one buy or sell trade per month.
So who says market timing does not work?

I spent the last 30 min looking at the intricacies of the simpler system - the one with the 2-ticker buy-rule

  1. It uses EPS uptrend / downtrend as well as ERP to determine how to rank (NB: this implies that in a market of “irrational exuberance” where the ERP is small with people insensitive to risk, it will trail the market as it goes into the safer asset = IEF).
    I would actually use EPSCNY and not EPSCY to have a constant smooth forward EPS estimate

  2. Every week, the system will give (or not) a chance to the ranking system to reevaluate the EPS trend and ERP status and subsequently possibly change the ETF. This opportunity to reevaluate is given (or not) based on the price momentum of the SP500

There is some logic to the above approach (one is “economic”, one is price momentum driven). They both look forward (EPS is forecast) if we assume that momentum is likely to continue (as demonstrated in the litterature) so that a trending market will continue trending … till it stops.

However the hidden key is that it uses RSP as a big contributor to the perf. To really judge the validity of the timer, I replaced RSP by SPY. Unless I made a mistake it becomes less interesting (~12% AR) but still not bad at all. It still beats SPY but this is because it avoids the 2 major recessions which possibly might be doable just with the price moving averages. One might also test with IEI or SHY instead of IEF, just to avoid the benefits of the (very) long drop in interest rates since the early 80’s and see what we get. Who knows what interest rates will do in the next 20 years.

This was a bit of an unstructured post. In summary, I am not quite sure what to make of this as a timer. Maybe the best is what you already did elsewhere Georg i.e. put it together with a bunch of other timers and do a majority vote

Jerome

Jerome,
Use this buy rule: ticker(“rsp,ief,spy”)

The system will now buy RSP OR SPY depending on the rank.
I have added a VIX sell rule - Annualized return now 17.0%, but more importantly it outperforms SPY from 2009 on as well.




(RSP|SPY - IEF) timed with S&P500 Momentum & VIX

I have launched this as a DM - free.
https://www.portfolio123.com/app/r2g/summary?id=1590578