Investors & landlords

The capital gain from stock sale would be long term.  The bad debit is personal.  If I dont claim both in the same year I only get to claim the max offset of $3k carry over loss.  So I’m thinking to time both for the same year. Thanks