Foreign trade closes first half with a surplus of $7 billion