A lingering Canadian heavy crude glut may be nearing its end.

While the discount to West Texas Intermediate futures for the coming month has mostly lingered around $25 a barrel so far this year, the discount for delivery in months further into the future is shrinking, with July futures now trading at less than $20 a barrel below WTI, data compiled by Bloomberg show.

The forward curve is signaling that the spread is going to come in, said Tim Pickering, chief investment officer at Auspice Capital Advisors Ltd.

Oil pipeline operators are optimizing space so that more crude can be shipped out of the country and some of the larger oil sands producers are signing contracts with rail companies that will help break the backlog, Pickering said.