Adaptive Feature Engineering and Deep Reinforcement Learning Framework for Stock Direction Prediction and Dynamic Portfolio Rebalancing
Kasichainula VydehiAssistant Professor, Department of Computer Science and Engineering, Aditya University, Kakinada, Andhra Pradesh, India. kasichainula.vydehi@adityauniversity.in0000-0003-4975-456X
Dr.A. VanathiAssociate Professor, Department of Computer Science and Engineering, Aditya University, Kakinada, Andhra Pradesh, India. vanathi.andiran@adityauniversity.in0000-0001-9127-0353
Keywords: Deep Reinforcement Learning, Stock Direction Prediction, Adaptive Feature Engineering, Dynamic Portfolio Rebalancing, Risk-Aware Decision Support, Time-Series Validation, Algorithmic Trading.
Abstract
Prediction of stock movement direction and its translation to risk-managed portfolios are still challenging due to the non-stationarity of financial time series, time-varying relevance, and look-ahead bias from traditional validation approaches. This work introduces a holistic methodology that links predictive machine learning, portfolio optimization, and interpretable investment management. This seven-step approach ensures look-ahead safe pre-processing of multi-stock OHLCV time series, numerical representation of market states, indicator selection based on mutual information and time-series cross-validation, and uses a Deep Q-Network (DQN) for next-day stock direction prediction as a two-action decision-making problem. DQN is evaluated against five baseline models. Their predictions are then combined with momentum, volatility, position constraints, drift-rebalancing, and transaction cost. A rule-based system translates portfolio risks into investment decisions such as BUY, HOLD, REDUCE, and AVOID for conservative, moderate, and aggressive investor types. All feature selection, normalization, and model training are done within the training data set. The experiments using synthetic OHLCV data for eight stocks have resulted in the following metrics for DQN: 50.4% accuracy, 50.3% balanced accuracy, 50.4% precision, 71.3% recall, 59.0% F1-score, and 0.506 ROC-AUC. During the 1.13 years of synthetic backtesting, the portfolio grew from $100,000 to $129,346, generating a total return of 29.35%, an annualized return of 25.55%, an annualized volatility of 10.52%, a Sharpe ratio of 2.43, and a maximum drawdown of −6.51%. Twelve rebalancing events have been carried out, and the risk module generated BUY signals for all three profile configurations. The above-presented results show the consistency and applicability of the suggested pipeline design. Because the raw directional classification of the DQN agent remains close to random guessing (50.4% accuracy), the primary driver of portfolio profitability is the combined momentum-volatility filter and dynamic rebalancing rules rather than pure predictive alpha. An explicit random-signal baseline experiment is included to isolate and verify the marginal utility of the reinforcement learning agent. Thus, evaluation of real multi-market data sets is needed.