The question answering link in the traditional teaching method is analyzed to optimize the shortcomings and deficiencies of the existing question-and-answer (Q&A) machines and solve the problems of financial students’ difficulty in answering questions. Firstly, the difficulties and needs of students in answering questions are understood. Secondly, the traditional algorithm principle by the Q&A system is introduced and analyzed, and the problems and defects existing in the traditional Q&A system are summarized. On this basis, deep learning algorithms are introduced, the long short-term memory (LSTM) neural network and convolutional neural network (CNN) are combined, and a Q&A system by long short-term memory-convolutional neural network (LSTM-CNN) is proposed, the gated recurrent unit (GRU) attention mechanism is introduced, and the algorithm is optimized. Finally, the design experiments to determine the nearest parameters of the neural network algorithm and verify the effectiveness of the algorithm are carried out. The results show that for the LSTM-CNN, the effect is the best when dropout = 0.5. After introducing the attention mechanism optimization, the effect is the best when dropout = 0.6. The test results of the comparison between the recommended algorithm and the traditional Q&A model algorithm show that the LSTM-CNN algorithm maintains the ability of the LSTM algorithm to arrange information in chronological order. After being combined with the CNN algorithm, the language features of the sentence can be extracted more deeply, the semantic feature information can be captured more accurately from the sentence, and better performance can be maintained when processing more complex sentences. The introduction of a BANet can simultaneously obtain the past and future information so that the algorithm can more appropriately combine it with the context to retrieve the semantic features, and the effectiveness of the model has been greatly improved. The research results have played an optimizing role in improving the Q&A effect of finance and economics teaching and provided a reference for research in related fields.