Optimal trading of a basket of futures contracts