I have more than 10K in the bank and wonder how much I should keep as a rainy fund to invest the rest.

How do you calculate it?