Optimal investment strategies in a CIR framework