Investors & landlords

refer to IRS Pub 550 for the treatment of all scenarios you can imagine.