Oil rises nearly 4% on U.S.-China trade hopes, but sets weekly decline