2012, partially offset by higher operating cash flows. Operating cash flows and free cash flows can be volatile and are sensitive to many factors, including changes in working capital, the timing and magnitude of capital expenditures, and our net income (loss). Working capital at any specific point in time is subject to many variables, including seasonality, inventory management and category expansion, the timing of cash receipts and payments, vendor payment terms, and fluctuations in foreign exchange rates. 

Our principal sources of liquidity are cash flows generated from operations and our cash, cash equivalents, and marketable securities balances, which, at fair value, were $12.4 billion, $11.4 billion, and $9.6 billion as of December 31, 2013 , 2012 , and 2011 . Amounts held in foreign currencies were $5.6 billion, $5.1 billion, and $4.1 billion as of December 31, 2013, 2012, and 2011, and were primarily Euros, British Pounds, Japanese Yen, and Chinese Yuan. 

Cash provided by operating activities was $5.5 billion, $4.2 billion, and $3.9 billion in 2013, 2012 , and 2011 . Our operating cash flows result primarily from cash received from our consumer, seller, and enterprise customers, advertising agreements, and our co-branded credit card agreements, offset by cash payments we make for products and services, employee compensation (less amounts capitalized related to internal- use software that are reflected as cash used in investing activities), payment processing and related transaction costs, operating leases, and interest payments on our long-term obligations. Cash received from our consumer, seller, and enterprise customers, and other activities generally corresponds to our net sales. Because consumers primarily use credit cards to buy from us, our receivables from consumers settle quickly. The increase in operating cash flow in 2013, compared to the comparable prior year period, was primarily due to the increase in net income, excluding depreciation, amortization, and stock-based compensation, partially offset by changes in working capital. The increase in operating cash flow in 2012, compared to the comparable prior year period, was primarily due to the increase in net income, excluding depreciation, amortization, and stock-based compensation, additions to unearned revenue, and changes in working capital, partially offset by increased tax benefits on excess stock-based compensation deductions. 

Cash provided by (used in) investing activities corresponds with capital expenditures, including leasehold improvements, internal-use software and website development costs, cash outlays for acquisitions, investments in other companies and intellectual property rights, and purchases, sales, and maturities of marketable securities. Cash provided by (used in) investing activities was $(4.3) billion, $(3.6) billion, and $(1.9) billion in 2013, 2012, and 2011, with the variability caused primarily by changes in capital expenditures, purchases, maturities, and sales of marketable securities and other investments, and changes in cash paid for acquisitions. Capital expenditures were $3.4 billion, $3.8 billion, and $1.8 billion during 2013, 2012,