For the association with luck or fortune there is historic proof:
On the year markets in the middle ages it was custom to honour the winner of games and to give a piglet to the loser. Causing joy and laughter with the bystanders, but it was good fortune for the loser.
In German speaking countries it was custom until the 19th century to give apprentices (youngsters who were sent out to become a craftsman) a piglet as reward for a full years learning and labour.
It is custom in German speaking countries to give each other a small marzipan pig or piggy bank (in the shape of a pig) for New Year as a token of luck.
There are various legends of Saint Anthony the Great (17th January) with pigs. His nick name is "Anthony with the pig".
In ancient Egypt on New Year’s day an amulet in the shape of a sow (a symbol of fertility, prosperity and good luck) was presented to a woman.
In the northern counties of The Netherlands (Friesland, Groningen) it is still custom that someone from the closest family circle gives a new born baby a piggy bank, as a token for prosperity and good luck. Stuffed with money this is the base for the baby’s “fortune”. The institutional Saving Banks in the Western Society followed that custom (also for their own benefit): children were offered a piggy bank (any shape) for opening a savings account. This was popular between 1950 and 1980. Since the introduction of internet banking this tradition is (sadly) completely lost!