|CRAY INC filed this Form 10-Q on 10/30/2018|
of $36.9 million, a decrease in our accounts payable balance of $28.0 million due to the timing of payments to vendors, largely in connection with inventory purchases in the fourth quarter of 2017, and a decrease in customer contract liabilities of $29.3 million.
Net cash used in operating activities in the first nine months of 2017 was primarily driven by an increase of $107.6 million in inventory as a result of system builds for future deliveries and the net loss, adjusted for non-cash items, of $44.9 million. These amounts were partially offset by collections from customers that resulted in a decrease of $137.6 million in accounts and other receivables.
Investing Activities. Net cash provided by investing activities was $5.2 million for the nine months ended September 30, 2018, compared to $31.5 million net cash used in investing activities for the same period in 2017. Net cash provided by investing activities for the nine months ended September 30, 2018 was primarily due to sales and maturities of debt securities of $7.0 million and $1.6 million in additional cash received from the strategic transaction with Seagate. These amounts were partially offset by purchases of property and equipment of $3.8 million. Net cash used in investing activities for the nine months ended September 30, 2017 was primarily due to purchases of debt securities of $94.9 million and purchases of property and equipment of $15.6 million, mostly related to leasehold improvements for our new facilities in Bloomington, Minnesota. These amounts were partially offset by sales and maturities of debt securities of $66.6 million.
Financing Activities. Net cash used in financing activities for the nine months ended September 30, 2018 was $1.1 million compared to $0.8 million for the same period in 2017. Net cash flows from financing activities for both periods resulted primarily from statutory tax withholding amounts made in exchange for the forfeiture of common stock by holders of vesting restricted stock awards, offset by cash received from the issuance of common stock from the exercise of options. Net cash used in financing activities for the nine months ended September 30, 2017 was also impacted by the issuance of stock through our employee stock purchase plan.
In addition, we lease certain equipment and facilities used in our operations under operating leases in the normal course of business and have contractual commitments under certain development arrangements. The following table summarizes our contractual obligations as of September 30, 2018 (in thousands):
On April 20, 2018 we amended our Credit Facility with Wells Fargo. Pursuant to the amendment, the Credit Facility was reduced from $50.0 million to $15.0 million. The Credit Facility is designed to be used for general corporate purposes, including working capital requirements and to support the issuance of letters of credit. The Credit Facility is secured by a first priority lien on up to $15.0 million of the Company’s investments account held with Wells Fargo Bank. The amended Credit Facility expires on March 1, 2020.
We made no draws and had no outstanding cash borrowings on the line of credit as of September 30, 2018.
As of September 30, 2018, we had $13.8 million in USD equivalent value in outstanding letters of credit and $17.3 million in restricted cash, primarily associated with certain letters of credit to secure customer prepayments and other customer related obligations.
In our normal course of operations, we have development arrangements under which we engage third-party engineering resources to work on our research and development projects. For the nine months ended September 30, 2018, we incurred $15.5 million for such arrangements.
At any particular time, our cash position is affected by the timing of cash receipts for product sales, maintenance contracts, government co-funding for research and development activities and our payments for inventory, resulting in significant fluctuations in our cash balance from quarter-to-quarter and within a quarter. Our principal sources of liquidity are our cash and cash equivalents, short-term investments and cash from operations. We expect our cash resources to be adequate for at least the next twelve months.
Critical Accounting Policies and Estimates
This discussion, as well as disclosures included elsewhere in this quarterly report on Form 10-Q, are based upon our Condensed Consolidated Financial Statements, which have been prepared in accordance with GAAP. The preparation of these financial statements requires us to make estimates and judgments that affect the reported amounts of assets, liabilities, revenue and expenses, and related disclosure of contingencies. In preparing our financial statements in accordance with GAAP, there are