Investors & landlords

The date of the transactions dictates how you split the resulting capital gains and losses.  Gains and losses while you were a resident of California go on the California income tax return.  If the securities sold while a Texas resident create compensation income because the securities were employee stock granted to you while a California resident then California will claim that compensation as taxable income, but not the capital gain or loss.