When did Chinese New years originate?

Chinese New Year has been celebrated for centuries, with roots dating back to the Shang Dynasty, which ruled from the 17th to the 11th centuries BC. The exact origins of Chinese New Year are difficult to pinpoint, but it is believed to have originated from agrarian society and the need to celebrate the end of the winter season and the beginning of spring planting. Additionally, there are also many myths and legends associated with the festival, such as the legend of Nian, a monster that would come out to attack villages during the New Year, thus leading to the tradition of lighting firecrackers and hanging red decorations to scare away evil spirits.