Leave cash in a port via buy rules? e.g. BUY RULE: Eval('Market conditions are bad', 0.5, 1)

Hi all,

Is there a simple / elegant way to leave part of a portfolio in cash and use only a portion of the cash available to buy new stocks / ETFs? (as opposed to using all of the cash available at each rebalance)

Example:

  • $100k portfolio, currently 10 positions of $10k each.
  • the sell rules execute first and dictate the sale of 1 position → there is $10k in cash
  • Ranking & buy rules then dictate to use the $10k cash to buy the top ranked stock that meets the buy rule.

→ But is there any way to only buy a new stock position for $5k and leave $5k in cash intentionally e.g. BUY RULE: Eval(‘Market conditions are bad’, 0.5, 1)
→ this way the port would have progressively more and more cash till it hits 50% in cash

I am asking because of a similar way to sell a portion of a port i.e. to sell 1/3 of a position when the weight of the position is greater than 30% of the portfolio → Eval(Weight>30, 1/3, FALSE)

Thx

Jerome
NB: all I can think of for the moment is to manually subtract cash to “cheat” the portfolio (i.e. in the above example, remove $5k before rebalancing). But it also required to press rebalance then cancel before removing the cash just to know if something will be sold (if not, then do not remove any cash)

In buy rule:
eval($comp<25,CashPct >=90,true) & eval($comp<50, CashPct >=30,true)

$comp is a market timing formula.

For a 10 position model:
eval($comp<25,CashPct >=90,true) reduces holdings to 1 position (when market conditions are really bad)
eval($comp<50, CashPct >=30,true) reduces holdings to 7 positions (when market conditions are becoming bad)

eval($comp<50, CashPct =100,true) reduces holdings to 0, 100% cash.


Brilliant! Thank you so much Georg.

I assume I can also replace $comp by a custom series?
e.g. eval(getseries(“MySeries”)<xx,CashPct >=90,true)

You can replace $comp with any market timing formula you like.

Nice!

Here is one that you can use for increasing cash during high volatility

CashPct>5*(close(0,$VIX)-20)