anyway you look at it. You probably have to plan this out in advance of your tax filing. Depending of course on the size of the cap loss