I had net capital gains (stock sales) on my federal return. I moved from Michigan to Illinois in July of 2017. Do I allocate my capital gains based on the date I moved. For example all January - July stock sales to Michigan and all August - December sales to Illinois.