North American markets end punishing week in red as oil and loonie sink