Economists, no less than anyone else, need a code of conduct. The economics profession already has such a code, which the vast majority of economists respect and observe. Economists learned about this code of conduct not by seeing it in black and white (it's not written down), but by observing the behaviour of older economists when it came to reporting the sources of their funding and their relationship to the funder on the front page of their studies, e.g. "Consultant for XYZ, Inc".
I think having a written code of conduct is important and that the American Economic Association has a responsibility to write it. But the fact that no code has been put to paper thus far does not excuse any economist who has reported research results in a manner that would suggest that he or she is a disinterested party when that, in fact, was not the case. That's an ethical lapse, pure and simple.
In addition to disclosing potential conflicts of interest on research and policy studies, economists must, as a matter of professional ethics, disclose on their bios, vitae, and websites for whom they consult or otherwise work. And if they are providing testimony to government bodies, they need to begin their testimony with fully disclosing their potential conflicts of interest.
But the deeper ethical problem that economists face is remaining honest with themselves. No one can buy our self respect unless we sell it. And we didn't join our profession to become paid spokesmen for corporations, politicians, governments, or anyone else. We joined our profession to discover economic truths, not to invent truths and then sell them.
Follow Laurence J. Kotlikoff on Twitter: www.twitter.com/kotlikoff