US President Barack Obama on Wednesday signed a new law reforming rules on insider trading for members of Congress, saying it would help deal with a deficit of trust afflicting Washington.

Obama signed the bipartisan STOCK Act into law, and for once was surrounded by members of both the Republican and Democratic parties, at a ceremony in the White House complex.

"The STOCK Act makes it clear that if members of Congress use non-public information to gain an unfair advantage in the market then they are breaking the law," Obama said.

"We were sent here to serve the American people and look out for their interests and not to look out for our own interests," Obama said.

The new law forbids not only elected officials but also employees of Congress and the executive branch of government from buying some stock products if they have an insider's knowledge about the performance of a given security.

Members of Congress and the president's administration often get private briefings from top corporate executives.

Elected officials must also report any purchases they make on the stock exchange of more than $1,000 within 90 days.

The STOCK Act is an acronym for the phrase Stop Trading on Congressional Knowledge.