How to correctly write the expression

How to correctly write the expression Close(0,#DBB)/close(80,#DBB)<Close(0,#UUP)/Close(80,#UUP) in the purchase or hedging rules? I want to test this author’s ideas Toma Hentea's Articles | Seeking Alpha

We do not have those symbols #DBB and #UUP. Can you explain what you are trying to do in English?

DBB ( Invesco DB Base Metals Fund ETF) growth over 80 days is less than UUP ( Invesco DB US Dollar Index Bullish Fund ETF) growth over 80 days

This should be equivalent

Ret%Chg(80,0,GetSeries(“DBB”) ) < Ret%Chg(80,0,GetSeries(“UUP”) )

Seems to have quite a bit of whiplash. I tested it in a ETF screener that buys only “SPY”. Here’s the daily backtest

1 Like

Thank you. How can I set a condition in the hedging rules if 3 out of 4 conditions are true. As it was done by the above-mentioned author - Market Risk Indicator Rule: Market is RISK-OFF if 3 or 4 pairs in column I are “OFF”.

You can just add logical conditions together since FALSE=0 and TRUE=1 like this

((4>2) + (3<6) + (10<5) + (7>3)) >= 3

The entire formula evaluates to (TRUE + TRUE + FALSE + TRUE) or (1 + 1 + 0 + 1) = 3

Just replace each condition with one based on your tickers

Screen without hedge

Hedge Screen

1 Like

50 days

Thanks for the information!