Broadband and omnidirectional antireflection coating is generally an effective way to improve solar cell efficiency, because the destructive interference between the reflected and incident light can maximize the light transmission into the absorption layer. In this paper, we report the incident quantum efficiency ηin, not incident energy or power, as the evaluation function by the ant colony algorithm optimization method, which is a swarm-based optimization method. Also, SPCTRL2 is proposed to be incorporated for accurate optimization because the solar irradiance on a receiver plane is dependent on position, season, and time. Cities of Quito, Beijing and Moscow are selected for two- and three-layer antireflective coating optimization over λ = [300, 1100] nm and θ = [0°, 90°]. The ηin increases by 0.26%, 1.37% and 4.24% for the above 3 cities, respectively, compared with that calculated by other rigorous optimization algorithms methods, which is further verified by the effect of position and time dependent solar spectrum on the antireflective coating design.