President Barack Obama said on Sunday that the U.S. economy remained under strain and his top economic adviser tempered hopes for a speedy recovery that have driven the stock market to successive gains.

We're not out of the woods. This is still a difficult time for the economy. Credit is still contracted, Obama told a news conference in Port of Spain, Trinidad and Tobago, where he was attending the Fifth Summit of the Americas.

Data continue to show the country's severe recession is inflicting severe pain, with over 5 million jobs lost since it began in late 2007. But there have been scattered indications that the pace of economic decline is slowing.

Global stocks closed Friday higher for a sixth straight week and oil prices rose above $50 a barrel on the upbeat mood of consumers and improved quarterly earnings reported by some of the country's biggest banks.

We've seen some more mixed statistics after a period when there was no positive statistics to be found, White House Director of the National Economic Council Lawrence Summers told NBC's Meet the Press.

But it is a long road and it is going to take time. It is going to take creating jobs again ... it is going to take supporting the financial system, he said.

STRESS TESTS

A key challenge for the U.S. economy is to restore confidence that its banks are now sufficiently capitalized after huge losses from the collapse of the housing market.

Obama's economic team is conducting stress tests of the top 19 U.S. firms and will issue guidelines on the process on April 24, with results due on May 4.

Obama said the tests would show that some firms need more help than others.

Different banks are in different situations. They're going to need different levels of assistance from taxpayers, Obama said, and he vowed that taxpayer money would not be wasted.

We try to use as light a touch as we can. But I am not going to simply put taxpayer money into a black hole, where you are not going to see results, he said.

TALKING UP RECOVERY

A succession of public officials have voiced confidence that the economy was turning the corner in recent days. Summers said there was nothing wrong in talking about the recovery ahead, but emphasized the economy still faces challenges.

No one is in any position to declare any kind of victory here. But the fact that no one can declare victory doesn't mean we shouldn't take note of developments as they unfold.

There are still substantial risks ... there are downside contingencies that we have got to prepare for, Summers said.

Government action to protect the financial sector has also included massive injections of taxpayer money to shore up the capital position of its biggest banks, drawing harsh criticism from the public for bailing out rich bankers.

Some firms, including powerhouse Goldman Sachs, have since said they want to give the money back. Summers welcomed this in principle, but said that it must not be done if it meant putting bank balance sheets back under pressure or constricting the flow of new credit to the economy.

Regulatory authorities are very open to being paid back. But it has to be done in a way that is consistent with the stability of the financial institutions, and it has to be consistent with maintaining the flow of credit, he said.

(Additional reporting by Paul Simao and Ayesha Rascoe in Washington, Editing by Jackie Frank)