META={"id":"yield-chaser","name":"Yield Hog","author":"house","style":"Income",
"desc":"Every 21 trading days, puts everything in the 3 income ETFs with the highest trailing 3-month yield."}
def strategy(ctx):
    if ctx.i%21 and ctx.weights: return None
    a=sorted(ctx.income_available() or ctx.available(),key=lambda s:-ctx.trailing_yield(s))[:3]
    if not a: return None
    return {s:1/len(a) for s in a}
