Evolution of investment strategies across generations