This study evaluates a hybrid model that integrates Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNN) to predict stock prices. The model leverages two datasets: historical Google stock data and sentiment data from Reddit comments. Sentiment analysis was performed using VADER from NLTK, which classified comments as negative, neutral, or positive, while a CNN model was trained to predict sentiment scores. Separately, an LSTM model was built using ten years of Google stock data from Yahoo Finance, with features scaled using MinMax normalization to improve learning and a dropout layer added to prevent overfitting. Model performance was evaluated using Root Mean Squared Error (RMSE) and Mean Squared Error (MSE). The LSTM model performed well on test data but showed lower accuracy on unseen data during forecasting. The hybrid model successfully combined the outputs of both the CNN and LSTM, demonstrating superior performance with lower RMSE and higher classification accuracy compared to the standalone models. This highlights the potential of integrating sentiment analysis with traditional stock prediction. The study acknowledges challenges in classifying neutral sentiments, suggesting that more comprehensive sentiment data is needed for future research.
Physics-Informed Neural Networks (PINNs) offer a flexible framework for solving nonlinear partial differential equations (PDEs), yet conventional implementations often fail to preserve key physical invariants during long-term integration. This paper introduces a \emph{structure-preserving PINN} framework for the nonlinear Korteweg--de Vries (KdV) equation, a prototypical model for nonlinear and dispersive wave propagation. The proposed method embeds the conservation of mass and Hamiltonian energy directly into the loss function, ensuring physically consistent and energy-stable evolution throughout training and prediction. Unlike standard \texttt{tanh}-based PINNs~\cite{raissi2019pinn,wang2022modifiedpinn}, our approach employs sinusoidal activation functions that enhance spectral expressiveness and accurately capture the oscillatory and dispersive nature of KdV solitons. Through representative case studies -- including single-soliton propagation (shape-preserving translation), two-soliton interaction (elastic collision with phase shift), and cosine-pulse initialization (nonlinear dispersive breakup) -- the model successfully reproduces hallmark behaviors of KdV dynamics while maintaining conserved invariants. Ablation studies demonstrate that combining invariant-constrained optimization with sinusoidal feature mappings accelerates convergence, improves long-term stability, and mitigates drift without multi-stage pretraining. These results highlight that computationally efficient, invariant-aware regularization coupled with sinusoidal representations yields robust, energy-consistent PINNs for Hamiltonian partial differential equations such as the KdV equation.