Abstract The treatment of an electron is given in semiconductor quantum dot (QD) shaped as a pyramid with square base and different values of aspect ratio (namely, the ratio of pyramid's height to the side of the base equal to 0.25, 0.5 and 3/2) in the effective mass approximation. In the solution of the Schrödinger equation, a specular reflection of an electron from QD's boundaries is assumed, so that the electron's path in the dot's material increases which favors the applicability of effective mass approximation; the boundary condition is taken as equivalence of the electron's Ψ-function in an arbitrary point inside QD and its images in the QD's walls-mirrors. The corresponding quantum mechanical problems are evidently difficult for traditional approach, but could be easily resolved with our mirror-type boundary conditions. Analytical expressions for energy spectra in all cases were obtained. Their comparison with existing experimental data related to the optical properties of pyramidal QDs with different shapes shows that the results of our calculations could serve as a basis for the explanation of experimental correlations.