Banking in Switzerland dates to the early 18th century through Switzerland's merchant trade and over the centuries has grown into a complex and regulated international industry. Banking is seen as very emblematic of Switzerlandand the country has been one of the largest, if not largest, offshore financial centers and tax havens in the world since the mid-20th century, with a long history of banking secrecy, security and client confidentiality reaching back to the early 1700s. Starting as a way to protect wealthy European banking interests, Swiss banking secrecy was codified in 1934 with the passage of a landmark federal law, the Federal Act on Banks and Savings Banks. These laws were used to protect assets of persons being persecuted by Nazi authorities but have also been used by people and institutions seeking to illegally evade taxes, hide assets, or to commit other financial crime.
Controversial protection of foreign accounts and assets during World War II sparked a series of proposed financial regulations seeking to limit bank secrecy, but with little resulting action. Despite various international efforts to roll back banking secrecy laws in the country which were largely minimized or reverted by Swiss social and political forces, in 2017 Switzerland agreed to "automatic exchange of information" (AEOI) with foreign governments and their revenue services regarding information of depositors not resident in Switzerland. This constituted de facto the end of Swiss banking secrecy for depositors who were not Swiss residents. Furthermore, after Switzerland ratified the Foreign Account Tax Compliance Act agreement with the United States, because of concerns regarding their tax liability (the U.S. taxes its citizens regardless of whether they are resident in the U.S. or not) some Swiss banks have gone so far as to close accounts held by US citizens, and to ban the opening of new accounts by US citizens and by dual US-Swiss citizens, including those deemed lawful permanent Swiss residents. Thus banking secrecy remains in force only for those residing in and solely taxable in Switzerland.