In the financial market, many studies have been conducted to forecast stock prices, but there are limitations in accurately predicting them due to the high volatility of price and high noise. In addition, in prediction, traditional time series analysis techniques have been widely used, but there are methodological limitations. In this study, the noise of the stock price data is removed by applying a denoising filter, and the prediction performance is then improved using the deep learning long short-term memory (LSTM) model. In addition, as the length of time series data increases, we apply an attention mechanism to predict the KOSPI200 index to minimize the loss of information in the deep learning LSTM model. Four deep learning prediction models were conducted using daily and 30-minute data of the KOSPI200 index according to whether denoising filter and attention mechanisms were applied, and the learning performance was compared and analyzed. As a result, the deep learning LSTM model with both denoising filter and the attention mechanism showed smaller error between the actual and predicted values.