Chinese New Year (CNY) is a major holiday of roughly a week (+ a weekend usually) and traditionally used by the millions of migrant workers in China to come home and visit their families, but also by many to go on a nice vacation abroad. Travel during this period can often be crowded as ...
So without any further input you will want to avoid to travel out of China at the onset of CNY or nor want to travel to China right when CNY ends. From Chinahighlights:
Most people will return to work on Sunday February 3 or Monday February 4 in 2017.
That being said it seems you are lucky as airfare from JFK to PVG looks pretty much normal around USD 700 right now over the whole period with only a slight increase around the end of CNY. Just choose your dates based on the prices you find in flight search.
Then be aware that many places (restaurants, bars and shops) in Shanghai will be closed for the holidays. I am not sure for tourist activities. Also expect mind-numbing fireworks for hours without end on CNY eve.