State tax filing

It doesn’t matter in which state the capital loss occurred. The loss follows you wherever you go. Whether you should take the loss in NY or CA depends on your tax bracket for each state.