I keep around 2 years of living expenses in a mixture of government bonds, treasury bills and high yield savings account. This gives me peace of mind to invest the rest of my money in the stock market and sleep well at night, regardless of how the market performs since I will likely never have to touch my investments in times of emergency.