Introduction
Stock price forecasting is a challenging task in financial markets, where volatility and randomness introduce high uncertainty. This study compares models such as LSTM, Time Series Transformer (TST), Temporal Convolutional Network (TCN), and Lag-Llama foundational model in predicting Nvidia (NVDA) stock prices. Additionally, the Stock Investment Analysis Agent in our first tab is designed to provide deeper insight for users.
Methods
The dataset consists of historical daily stock prices for NVIDIA (NVDA), focusing on the closing price. Models are trained with
a prediction horizon of seven days. The dataset is preprocessed using MinMax normalization.
I did EDA first to compare the pattern of Nvidia Stock data and AMD Stock data, and then uses RMSE for deterministic forecasts, CRPS for probabilistic forecasts as metrics.
Explanation of Stock Analysis Agent
I built an AI agent using Dify to analyze U.S. stock market trends, using real-time data from Yahoo Finance and OpenAI's 4o large language models.
With my personalized design of prompt and workflow, this agent could provide insights into stock performance and recommendations.
Results and Conclusion
The results of Model Comparison indicate that among the tested models, the LSTM model performs the worst, with RMSE = 16.2018, while the Time Series Transformer performs the best with RMSE = 5.4467.
Future work can explore hybrid approaches combining LLM-based forecasting with traditional deep learning models.