President Obama signed the "Protecting Tenants at Foreclosure Act of 2009," which stated that leases would survive a foreclosure, protecting tenants in homes that were sold during a foreclosure process.
However, the answer to your question really depends on what type of lease agreement you currently have. If you are a month-to-month tenant, then you are entitled to 90 day notice before terminating your lease. On the other hand, if you have a lease agreement in place, you are entitled to live in the property until your lease terminates. This is why many companies (such as the investment company in your situation) may offer some "cash for keys" money, which would help you move out and find somewhere new to live.
The answer also depends on what kind of party bought the property. Some banks or investment companies may not find a buyer immediately and may allow you to continue living on the property. On the other hand, if the new buyer wants to start living at the home immediately, they must give you 90-days notice (according to federal legislation).
Federal legislation also indicates that the state law, if it is more favorable to the tenant, would NOT be preempted by federal law.
Counsel gave a very thorough response. I would only add that you may want to have an attorney review the agreement you signed to see what legal affects there are, if any.
By posting on this site or answering/responding to questions does not create an attorney-client relationship and is intended to be an opinion only. My opinion is not intended to be a guarantee or promise of any outcome or result in your matter.
I also agree with Ms. Cinar. As a renter, you have unique rights that outside the normal foreclosed-upon owner. You have 90-days to vacate, not the 30-days imposed on the former owner. Depending on whom the property was sold to, you may also be able to negotiate with the new owner.
(The above is not intended as legal advice, nor does it establish a lawyer-client relationship. Thanks!)