The Company recognized total unrealized derivative losses of $234.3 million for the three months ended June 30, 2018 compared to $14.7 million in the same period in 2017. The losses were primarily due to a $233.5 million unrealized derivative loss on crude oil contracts compared to a $68.2 million unrealized derivative gain in 2017. The unrealized crude oil derivative loss in the second quarter of 2018 was primarily attributable to the increase in the Cdn$ WTI and US$ WTI forward benchmark prices at June 30, 2018 compared to March 31, 2018, partially offset by the maturity of out-of-the-money contract months. The unrealized crude oil derivative gain in the second quarter of 2017 was primarily attributable to the decrease in the Cdn$ WTI forward benchmark price at June 30, 2017 as compared to March 31, 2017.
During the six months ended June 30, 2018, the Company recognized total unrealized derivative losses of $269.3 million compared to total unrealized derivative gains of $74.4 million in the same period in 2017. The total unrealized derivative losses in the first half of 2018 are primarily due to a $366.2 million unrealized derivative loss on crude oil contracts compared to a $174.7 million unrealized derivative gain in the first half of 2017. The unrealized crude oil derivative loss for the six months ended June 30, 2018 was primarily attributable to the increase in the Cdn$ WTI and US$ WTI forward benchmark prices at June 30, 2018 compared to December 31, 2017, partially offset by the maturity of out-of-the-money contract months. The unrealized crude oil derivative gain for the six months ended June 30, 2017 was primarily attributable to the decrease in the Cdn$ WTI forward benchmark price at June 30, 2017 compared to December 31, 2016.
The total unrealized derivative losses in the six months ended June 30, 2018 were partially offset by a $105.9 million unrealized derivative gain on cross currency swaps ("CCS") compared to a $117.0 million unrealized derivative loss in the same period in 2017. The unrealized CCS derivative gain for the six months ended June 30, 2018 was primarily the result of the weaker forward Canadian dollar at June 30, 2018 compared to December 31, 2017. The unrealized CCS derivative loss for the six months ended June 30, 2017 was primarily the result of the stronger forward Canadian dollar at June 30, 2017 compared to December 31, 2016.
Exhibit 9