Canada is technically in recession. REUTERS/Petr Josek Canada is officially in recession.

The economy shrank in the second quarter of 2015, making it the second quarterly contraction in a row.

Gross domestic product in Canada fell at a 0.5% annualized rate in the quarter.

In the first quarter the economy shrank by 0.8%.

Statistics Canada, the national statistics agency, revised the contraction in the first quarter to 0.8% from 0.6%.

Business investment fell by 7.9% during the quarter, after a 10.9% drop in the previous quarter, according to Bloomberg.

GDP was up 0.5% in June, but not enough to counteract the declines in April and May.

Last month, the country's statistics agency released GDP data that showed the Canadian economy shrank by 0.2% in May. It was worse than expectations of 0.0% growth, and it was the fifth consecutive month the economy contracted.

Weighing on the economy that month were the manufacturing and mining, oil, and gas extraction sectors.

Canada is the US's largest trading partner.

Oil and the loonie

The drop in oil prices that began more than a year ago has been hard on the net oil-exporting nation.

Crude oil prices fell below $40 a barrel last week to a post-financial crisis low of $38 a barrel.

Crude oil prices fell below $40 a barrel last week. REUTERS/Rick Wilking

Oil-services companies like Schlumberger are cutting jobs, and Alberta, Canada's main oil-producing province, saw its unemployment rate jump from 5.5% to 5.9% in June.

The effect of falling commodities prices on the Canadian economy is not going to let up anytime soon, according to BNP Paribas analyst Derek Lindsey.

The Bank of Canada cut interest rates in July and could do so again this month, Lindsey predicts.

In a note on Tuesday, Lindsey wrote: "We expect further easing ahead, as investment and exports remain in contractionary territory and the economy remains vulnerable to a correction in housing and a pull-back in spending due to high (and growing) levels of household debt."

The Canadian dollar — aka the loonie — is at its lowest since 2004, trading at around $1.33 per US dollar on Monday.

Here's what's happened with the currency over the past year:

Yahoo! Finance

Not all bad

There were some hints of growth near the end of the quarter that may have carried into the third quarter.

Those were in the service sector, the public sector, wholesale trade, and real-estate agents. Households continued to spend more during the quarter, too, with household consumption jumping from 0.5% in the first quarter to 2.3% in the second.

Back in May, Canadians appeared to continue to spend money on their homes. An increase in retail trade was driven by spending on building material, garden equipment, and supplies, according to Statistics Canada.

Meanwhile, housing markets in Toronto and Vancouver are still super hot. Canadian home prices did not drop nearly as much as home prices in the US during the housing-market crash, and they've soared since.

Real GDP contracted in the first two quarters of 2015. Statistics Canada

In Toronto, home prices are reportedly 42% higher than they were in 2008. Homes in Vancouver are the second most expensive in the world.

Economist Robert Shiller suggested back in 2012 that Canada could experience a slow-motion version of the US housing bust.

According to an August 2015 note from BNP’s Lindsey, "investment and exports remain in contractionary territory and the economy remains vulnerable to a correction in housing and a pull-back in spending due to high levels of household debt."

Don't forget there's an election coming

The economy is on everyone's minds as an October 19, 2015, election draws near.

Incumbent Stephen Harper has been prime minister for nine years, but polls are showing a tight three-way race between his Conservative Party; the New Democratic Party, under Tom Mulcair; and the Liberal Party, under Justin Trudeau.

All three parties are focusing their campaigns on the economy.

Harper was speaking live on Tuesday morning:



And here's Justin Trudeau's reaction to the news: