The market tends to send stocks to extremes. Sometimes popular names overshoot on the upside, and sometimes things get out of hand when everyone heads for the exits.

Here are the reasons why I think contrarian investors should consider Cenovus Energy Inc. (TSX:CVE)(NYSE:CVE) and TransAlta Corporation (TSX:TA)(NYSE:TAC).

Cenovus Energy

The oil rout is taking its toll on the entire energy patch and Canada’s oil sands producers are certainly not exempt.

Cenovus Energy is one of the few oil producers that continues to pay a large dividend, despite the fact that its cash flow isn’t covering capital costs, let alone the generous distribution.

The stock has dropped nearly 25% since the start of the year and the slide has accelerated in recent weeks.

Most analysts say investors should give the entire sector a wide berth, and they are right. But contrarian investors are a different breed and look for great long-term plays when the market appears to be in its darkest days.

Cenovus is interesting because it is a very efficient producer, and management is doing a good job of reducing costs while increasing output.

The company operates the Christina Lake and Foster Creek projects in a joint venture with ConocoPhillips. The two facilities delivered total Q1 2015 production of about 290,000 barrels per day, but they have a combined target capacity of more than double that amount. As production increases, operating costs continue to fall and the projects have the potential to kick out substantial free cash flow for decades.

Cenovus finished Q1 with $1.8 billion in cash and cash equivalents, and recently sold its royalty lands to the Ontario Teachers’ Pension Plan for $3.3 billion.

Management is committed to maintaining the dividend and the company has enough money to cover cash flow shortfalls well into 2016. Cenovus also has a large refining division, which can serve as a hedge against lower oil prices, although refining margins tend to be volatile.

The dividend currently yields about 5.9%.

If oil prices recover, the stock has a lot of upside potential and contrarians can collect a nice payout while they wait for a rebound.

TransAlta Corporation

This one requires a strong stomach, but the numbers suggest TransAlta offers a ton of value.

The stock has been under pressure over the past few years as its coal-fired electricity plants ran into high maintenance costs at a time when electricity prices in Alberta hit the skids.

The recent election of the NDP government in Alberta, coupled with a price-fixing charge, has sent most of the remaining investors for the exits.

For contrarian investors, the value story is compelling. The company now trades at less than book value and TransAlta is doing a good job of reducing its debt load. Despite the difficult market conditions, cash flow is expected to cover capital costs and the dividend.

Fears abound that the NDP could force a faster-than planned shutdown of TransAlta’s coal facilities. That probably won’t happen given the fact that the province relies so heavily on the plants for its electricity. Most of the facilities are already on a schedule for conversion to natural gas.

TransAlta pays a dividend that currently yields 8.5%

The sell-off appears to be way overdone and TransAlta could easily become a takeover target in the coming months.

Our TOP turnaround stock for 2015--you don't want to miss this!

When companies fall from grace like this other Canadian icon did, it's typically impossible to regain relevance. Here at Motley Fool Canada, we think this company is about to prove all the critics are wrong. We have even named it our TOP turnaround stock for 2015.

If you're a curious soul (like me), you can download the name, ticker symbol, and price guidance absolutely FREE.

Simply click here now to receive your Special FREE Report, "A Top Turnaround Stock Idea for 2015."

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Andrew Walker owns shares of TransAlta Corporation.