gold ends marginally lower; palladium adds 1.2%