ETF Weight Scaling?

I was wondering if anyone was successful in figuring out how the scale weight of a fixed ETF port?

Say I have a simple port of SPY/SH and I wanted to set weights of 100/0 in up markets. Then as markets got questionable the port would drop to 75/25 and with further downturn it might go 50/50 neutral and so on.

I’m thinking if I can at least set a fixed weight then I should be able to eval the buy rules to set conditional weighting.

This seems so simple yet I don’t know why I can’t wrap my brain around how to get it done. Maybe it’s a lack of coffee problem :wink:

Personally, I would not do it with just those 2 ETFs but that is just me. I can speak to what I might do generally, however.

I am seriously looking at using MPT to calculate the Tangency Portfolio for any combination of ETFs in general. This is the portfolio that gives the best Sharpe Ratio based on historical data for those ETFs and/or data on ports.

One would have to use Excel Solver or Python for this.

FWIW.

-Jim

Thanks Jim but I would like to know how to execute the concept, the example is just that.

Barn, this is a good idea and actually not a problem.

Number of Positions=2

Position Weight Formula:
Eval($upmkt1, 99.99ticker(“SPY”)+0.01ticker(“SH”),
Eval($upmkt2, 75ticker(“SPY”)+25ticker(“SH”),
Eval($neutmkt, 50ticker(“SPY”)+50ticker(“SH”),
Eval($badmkt1, 25ticker(“SPY”)+75ticker(“SH”),
Eval($badmkt2, 0.01ticker(“SPY”)+99.99ticker(“SH”)))))

where $xxxx are formulas for the various market conditions.

My apologies. I understand now are only interested things you can backtest with P123.

Edit for below. Thank you Georg. I learned something too. I guess I will just use a spreadsheet or calculator to find the proper ETF weights for my idea;-)

-Jim

I will have to play with this but thank you very much and I had no idea I could assign a weight as a ticker multiple in the weight formula area. Magical as always Georg!

Yes, you can do all sorts of stuff with the Weight Formula. Instead of SPY and SH, you can have numerous ETFs, leveraged and normal, which are suitable for the various market conditions. However, you need to have reliable formulas for the various market conditions, which is the tricky part.

In my opinion, market timing formulas are in principle similar to ranking system for stocks. Evaluating the economic environment with numerous measures is not much different to evaluating the likelihood of a stock performing well with various factors. That is why I don’t share the opinion of many that market timing does not work.

Georg - I assume you have tested this and verified it’s function? The reason I ask is because about a year ago I went to extensive effort to have a ranking system generate the desired weights for some ETFs. Then I found out that the position weighting function was taking the ranking system numbers and re-ranking them, making the exercise totally useless. As an example, for a 2 ETF system, I could generate and verify the ranks 5% / 95%. However, the position sizing function would rerank with a new weighting of 33% / 66% or something along those lines. Maybe that isn’t the case for the inline version for position sizing, and this is the reason why I’m asking. It is something that would be good to know.

Steve

Hi Steve,

It seems to work. Just set the buy rules to only include the tickers you want … Ticker(“XYZ,AAA”) Set your sell rules to rank < 0.001 and then you just set your rebalance triggers like 2% port drift @4wk rebal or something to that sort. It’s pretty neat and gives me something I can use.

Thanks Barn - the question I am asking is if it has been verified that the weights come out exactly as expected according to the input formula. It is easy to be fooled by something that kinda looks good, if you know what I mean :slight_smile:

SteveA

Steve, I have used this many times. I am not using a ranking system to generate weights for ETFs. The formula works perfectly well when the weights are specified in the weight formula. The weights don’t come out exactly as specified, especially when rebalancing infrequently, but weekly rebalancing keeps the weights fairly close to what is specified.

The Eval-function can also be in the buy rules if the ETFs for the various market conditions are not the same. For example, for the ETF sim with an annualized return of 48% I posted in this view-thread https://www.portfolio123.com/mvnforum/viewthread_thread,11966_offset,20
the weight formula is:
3ticker(“SSO”) +8ticker(“SVXY”) +3ticker(“UPRO”)+20ticker(“QLD”) +15ticker(“DDM”)+3ticker(“UBT”)+3*ticker(“UST”)

The conditions are in the buy rule which uses 3 proprietary market indicators ($antivix, $upmarket, $portsum) :
EVAL($antivix,Eval(Close(0,GetSeries(“SVXY”))=NA,Ticker(“SSO,UPRO”),Ticker(“SVXY,UPRO,”)),TICKER(“DDM,QLD”)&($upmarket & $portsum>=5) | TICKER(“UST,UBT”))

The first part of the formula substitutes SSO for SVXY before SVXY became available in the P123 database.

You also need conditional sell rules as well, otherwise the sim does not know when to sell any of those ETFs


OK thanks Georg.

Here is the problem report for future reference.

https://www.portfolio123.com/mvnforum/viewthread_thread,11386#!#65319

It looks as if the ranks passed to the sizing algorithm are “adjusted” from what the RS generated. It can be somewhat subtle and you need to scrutinize every individual weight to make sure it is correct. You are an engineer Georg so i am pretty sure you have done that!

Steve, in the weight formula use “rank”. This will assign higher weights to the higher ranked stocks or ETFs. This improves return a lot and makes sense. Should one not assign more weight to the higher ranked positions?

One of the selling features for this approach was that one could use a ranking system to generate the assigned weightings. But I would expect that the algorithm would use the ranks exactly as generated except of course they should be scaled to add up to 100% if necessary.

Now if the ranking system assigns ETF_A a rank of 5 and ETF_B a rank of 95, would you not expect the weights to be 5% and 95%? Instead, the weights are reprocessed. Yes ETF_B would still be weighted higher than ETF_A, but not 95% and 5%. It might be 66% and 33% or something else.

This is the problem that I have.

Steve, I have never used rank weighting with ETFs. I don’t know the algorithm P123 uses to convert rank to weights. Perhaps P123 can let us know?

Just tested it, rank and weight are perfectly correlated. So there is no problem. See below.


Maybe I’ll revisit this issue. It is always possible that I was having finger troubles. If I can reproduce the problem I’ll republish it.

*** EDIT *** I am just reviewing your most previous post. The problem lies in the fact that if you go to the ranking system module and look at the assigned ranks with the same universe as you are using in your sim, then you get ranks that don’t match the sim. The sim ranks match the weights and that is what you are showing. That is not the issue. The issue is that the sim ranks (and ETF weights) do not match the ranks generated by the Ranking System module. Now it is still possible that I was having finger problems so I will go back and repeat the exercise.

OK - I just went back and tested the original problem and it works correctly now. So the problem was probably addressed sometime in the last year. but was not mentioned on the post for the reported error.

Sorry for the confusion. The world is as it should be.

SteveA

Georg:[quote]
In my opinion, market timing formulas are in principle similar to ranking system for stocks. Evaluating the economic environment with numerous measures is not much different to evaluating the likelihood of a stock performing well with various factors. That is why I don’t share the opinion of many that market timing does not work.
[/quote]
I heartily concur!

The one major difference is the odds. The odds that a stock will increase in price is a little under 50%. The odds that the market as a whole will go up over the next month is over 60% (63%, to be precise). So if you get your stock-ranking factors all wrong, you still have an almost even chance of doing just as well as the market as a whole. But if you get your market-timing factors all wrong, your chance of underperforming buy-and-hold is over 60%. As C. Thomas Howard writes, “since there is a 63% chance next month’s return will be positive, you must correctly forecast at least 63% of the months in order to increase your return relative to buying and holding. Research shows such accuracy in forecasting is very difficult to achieve.” (From his book Behavioral Portfolio Management)

I certainly won’t say that market timing is a fool’s errand or impossible. It’s just that it’s hard to do well, and, in my opinion, riskier than stock-picking.

I also don’t want to say that you’re doing anything wrong, Georg! I’m impressed with your work, and I know that a) you’re doing more than market-timing with your ETF selections and b) the goals of market-timing may be to decrease variability rather than to increase returns. I for one certainly have a lot to learn about market timing. But I did want to point out the difference in odds.

This is all my opinion, and not the opinion of P123. We are committed to helping both stock pickers and market timers here.

Yuval, the odds you quote are correct.

But for people who are not too greedy they can follow a simple S&P500 momentum strategy with equity (RSP) and fixed income (IEF). Nothing spectacular or unknown here. Everybody is familiar with the 50-200 golden cross, and I have added a shorter term 10-40 momentum as well.

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

Sell1: ticker(“rsp”) & (sma(50,0,$SP500)<sma(200,0,$SP500) | sma(10,0,$SP500)<sma(40,0,$SP500))
Sell2: ticker(“ief”) & (sma(50,0,$SP500)>sma(200,0,$SP500) | sma(10,0,$SP500)>sma(40,0,$SP500))

P123 ranking system: ETF Rotation - Conservative
Variable slippage
reconstitution and rebalancing weekly
Weight formula = 1

From Jan-99 to Nov-2019 this model shows an annualized return of 14.70% with a max D/D= -19.0% and Sharpe= 1.41.
Standard Deviation 8.73% vs 14.40% for SPY.

It would never have had a loss over any of the 20 calendar years. If one ran a fund based on this simple model you would have made a lot of money, because I don’t know of any fund manager doing better than this. Also there were only a total of 155 realized trades in this 20-year period.

That is why I don’t share the opinion of many that market timing does not work. You can add this model to your Portfolio123 Models lineup, if you wish - it will not disappoint, a lot less riskier than stock-picking.

year … return %
1999 … 6.27
2000 … 14.39
2001 … 11.26
2002 … 14.62
2003 … 39.39
2004 … 12.16
2005 … 17.94
2006 … 15.82
2007 … 10.61
2008 … 24.90
2009 … 16.65
2010 … 13.52
2011 … 3.46
2012 … 11.79
2013 … 33.48
2014 … 8.26
2015 … 11.34
2016 … 8.84
2017 … 15.36
2018 … 11.62
2019 … 11.04