to_buy calculates how much of each stock and bond should be bought and sold to rebalance the portfolio.