distribution of our world-wide earnings in lower-tax jurisdictions, the impact of federal research tax credits and the recognition of excess tax benefits related to share-based payments. Additionally, in the three months ended March 31, 2021, our effective tax rate was favorably impacted by a discrete item associated with the release of an unrecognized tax benefit. These benefits were partially offset by U.S. tax on foreign income, known as global intangible low-taxed income. The primary jurisdiction from which our foreign earnings are derived is the Cayman Islands, which is a non-taxing jurisdiction. Income earned in other foreign jurisdictions was not material. We have not been granted any incentivized tax rates and do not operate under any tax holidays in any jurisdiction.
Liquidity and Capital Resources
As of March 31, 2021, we had $491.3 million in cash, cash equivalents and short-term marketable securities, an increase of approximately $42.1 million from $449.2 million as of December 31, 2020. As of March 31, 2021, we had working capital, defined as current assets less current liabilities, of $579.8 million, an increase of approximately $41.1 million from $538.7 million as of December 31, 2020.
We have a Credit Agreement with a bank (the "Credit Agreement") that provides us with a $75.0 million revolving line of credit to use for general corporate purposes with a $20.0 million sub-limit for the issuance of standby and trade letters of credit. Our ability to borrow under the revolving line of credit is conditioned upon our compliance with specified covenants, including reporting and financial covenants, primarily a minimum liquidity measure and a debt to earnings ratio, with which we are currently in compliance. The Credit Agreement terminates on April 30, 2022; all advances under the revolving line of credit will become due on such date, or earlier in the event of a default. No advances were outstanding under the agreement as of March 31, 2021.
Cash From Operating Activities
Operating activities generated cash of $58.1 million in the three months ended March 31, 2021. Net income for this period was $39.8 million; we also incurred non-cash stock-based compensation expense, depreciation, deferred income taxes, and amortization of $8.5 million, $7.5 million, $1.4 million and $1.0 million, respectively. Sources of cash also included a $12.4 million decrease in inventory reflecting strong demand for the period and a $3.3 million increase in accounts payable (excluding payables related to property and equipment) due to the timing of payments. These sources of cash were partially offset by $6.3 million decrease in taxes payable and accrued liabilities, a $6.3 million increase in accounts receivable due to increased customer shipments, and a $3.3 million increase in prepaid expense and other assets, primarily due to prepaid insurances and income taxes.
Operating activities generated cash of $26.4 million in the three months ended March 31, 2020. Net income for this period was $15.9 million; we also incurred non-cash stock-based compensation expense, depreciation, amortization and deferred income taxes of $6.7 million, $5.5 million, $1.1 million and $1.1 million, respectively. Sources of cash also included an $8.8 million increase in accounts payable (excluding payables related to property and equipment) due primarily to the timing of payments and a $3.8 million decrease in accounts receivable due to the timing of cash receipts. These sources of cash were partially offset by a $6.3 million increase in inventories in order to support future demand, a $6.3 million decrease in taxes payable and accrued liabilities, primarily due to the timing of payroll related liabilities and a $4.0 million increase in prepaid expenses and other assets, primarily driven by prepaid taxes, advances to suppliers and interest receivable on marketable securities.
Cash From Investing Activities
Our investing activities provided $30.5 million of cash in the three months ended March 31, 2021, primarily consisting of $41.5 million from sales and maturities of marketable securities, net of purchases, offset by $11.1 million for purchases of property and equipment, primarily production-related machinery and equipment as well as construction of a new office building in Switzerland. Our investing activities in the three months ended March 31, 2020, resulted in an $12.5 million net use of cash, primarily consisting of $11.6 million for purchases of property and equipment, primarily production-related machinery and equipment, and $0.9 million for purchases of marketable securities, net of sales and maturities.
Cash From Financing Activities
Our financing activities in the three months ended March 31, 2021, resulted in an $4.2 million net use of cash, consisting of $7.8 million for the payment of dividends to stockholders, partially offset by $3.7 million from the issuance of common stock, including the exercise of employee stock options and the issuance of shares through our employee stock