Hamilton has been a Member of Parliament for the Liberal People's Party from 1997 to 1998 and again since 2002. He sits in the parliament's Committee on the Labour Market and is vice-chair of the Committee on EU Affairs. He is also a member of the party board of the Liberal People's Party.
From 1993 to 1994 he served as an Undersecretary of State at the Swedish Ministry for Finance.
Hamilton holds a doctorate in economics from London in 1974. From 1992 to 1997 he served as a professor in economics at the Stockholm University. During the mid 90s he worked as chief economist at Handelsbanken. Since 1999 he is a part-time professor in international economics at the Stockholm School of Economics.