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