As the fur trade expanded further north, New York became a trading hub, which brought in a diverse set of ethnic groups including Africans, Jews, and Portuguese. The island of Manhattan had an extraordinary natural harbor formed by New York Bay (actually the drowned lower river valley of the Hudson River, enclosed by glacial moraines), the East River (actually a tidal strait), and the Hudson River, all of which merge at the southern tip, from which all later development spread. During the American Revolution, the strategic waterways made New York vitally important as a wartime base for the British navy. Many battles such as the Battle of Long Island and the Battle of New York were fought in the region to secure it. New York was captured by the British early in the war, becoming a haven for Loyalist refugees from other parts of the country, and remained in the hands of the British until the war ended in 1783. New York served as the capital of the United States from 1785 until 1790, after which the capital moved to Philadelphia. New York has been the country's largest city since 1790. In 1792, the Buttonwood Agreement, made by a group of merchants, created what is now the New York Stock Exchange in Lower Manhattan. Today, many people in the metropolitan area work in this important stock exchange.