Greenspan headed the U.S. central bank from 1987 until 2006 , serving under four presidents .