Magnetic shielding devices are extensively used in the measurement of quantum physics, the static magnetic field shielding layer made of permalloy in the magnetic shielding device will work under different stresses. Due to the magnetic properties of permalloy being sensitive to the applied stress, it is necessary to establish a magnetic property model considering stress to accurately evaluate the residual magnetic field in magnetic shielding devices under different stresses. However, the measurement and modeling of the magnetic properties of permalloy under different stresses have not been considered in relevant research. In this paper, the magnetic properties of permalloy under different tensile and compressive stresses were measured, and the optimized Jiles Atherton (JA) model of permalloy considering stress constructed. The parameters of the JA model are extracted by a genetic algorithm,-the particle swarm optimization algorithm, through measurement. Finally, the effectiveness of the model in predicting magnetic properties is validated. The JA optimization model considering stress can improve the calculation accuracy of magnetic shielding devices, which is of great significance for the design and application of magnetic shielding devices.