Can someone help me with the logic that big companies' treasury department uses fx swap to manage their cash? An example would be much appreciated!
I can give you one example from EM banking sector where FX swap played a critical role in day to day operations.
This EM country's Central Bank used follow fixed rate currency regime and used to keep the USD FX rate within certain bands. In the first half of the 2010's, major political events and drastic changes in commodities prices, specifically in oil prices, affected people's and bankers' perception that the country's CB will not be able to withstand this economic disaster. Subsequently, businesses started experiencing defaults in both local and USD currency denominated loans. Whatever banks could collect (e.g. from performing loans) used to get converted to USD cash; depositors started to convert local currency savings to USD deposits -- people were expecting currency devaluation. This lasted for about 6-8 months.
Given the situation, banks still had to maintain daily operations (plus some new loan underwriting) in local currency. To facilitate this, they used FX Swaps extensively -- they lent out USD and got back whatever amount they needed in local currency using one day FX Swaps (obviously, they kept rolling these one day FX Swap contract every day). As almost all market participants got rid off the local currency, only the Central Bank and some banks who had local currency liquidity acted as counterparty to those who needed the local currency. Not surprisingly, the rate on one day FX Swap rate jumped from regular 4-5% to 25-30% average during the next 6-8 months. The maximum was about 80% or 90% or something.
Eventually, said CB capitulated and devalued the currency multiple times. Apparently, now they switched from fixed rate currency regime to inflation targeting.
A Treasury department could use the FX Swap to put cash balances to work to earn a return on idle cash.
The FX Swap is utilized to implement the FX Carry trade. Investors will Buy a currency at the Spot rate and Sell the same currency forward. The difference in their cost to buy the currency and the proceeds they will receive from the forward transaction will be the FX carry amount they will earn. In addition, they will incur costs/benefits from depositing the currency they bought. The reason I say costs is that there are currencies now that have negative interest rates and therefore it will cost the owner of said currencies. The net proceeds of the FX carry and the deposit rates is what the investor will earn.