A record number of people Taiwan's stock market in 2024, as the benchmark index saw historic gains fueled by enthusiasm for artificial intelligence.