State tax filing

Hello!

 

I am actually resident of NJ, but working in NY.

As far as I know, for NJ, I am not able to apply prior year capital losses to the current year, so if I made 10k, I will have to report 10k capital gain on my NJ 1040

 

I am just not sure what to report on NY state non-resident tax form. Technically I earned money while working in NY.
Should I apply the same rule as Federal to my NY taxes ? (10k profit plus -20k loss carryover = -3k annual deduction),

 

or should I apply 10k profit instead ?

 

Thanks Again!!!