Dow Jones up 0.4% as US markets post weekly gains