Abstract:In order to solve the problem of the large deviation between the classical option pricing model and the actual price data, based on the BS option pricing model, the Fast Fourier Transform (FFT) combined with the Transformer's multi-head attention mechanism of deep learning algorithm was used to conductthe empirical research on the 300ETF options and Shanghai gold options data. The model was quadratically trained by the improved Transformer algorithm on the residual values between the option pricing model based on the FFT algorithm and the option price data of the actual financial market. The results show that compared with other algorithms (BS model, FFT-BS model) and other hybrid algorithm models (FFT-BS+ARIMA model, FFT-BS+LSTM model), the proposed model has a good performance in the statistical indexes such as R2, MSE, NRMSE and MAE, and the hybrid algorithm model achieves a better performance for different volatilitiesand different varieties of options. The study innovatively applies the improved Transformer algorithm to option pricing, which compensates for the shortcomings of the classical option pricing model and provides a more accurate option pricing model.