I would probably go for some middle ground such as if (year > 0) then shares * Square root (years).
Just because someone has held a stock for 20 years does not necessarily mean they are currently interested in the long term. But, it probably points in that direction.