Broad domestic and United States stock market returns, rather than India-specific macroeconomic or health-expenditure indicators, showed the only statistically significant associations with the weekly return direction of India’s Nifty Pharma index in an original research study published in Frontiers in Artificial Intelligence. Rupeshkumar Deshmukh and Sudhanshu Mahajan of the Department of Community Medicine at Bharati Vidyapeeth (Deemed to be University) Medical College in Pune, India, analyzed 672 weekly observations from February 2011 through December 2023. The observational modeling study compared eight statistical and machine-learning classifiers, including a validation-selected artificial neural network (ANN), logistic regression, and three modern boosted-tree algorithms, to classify revealed investor sentiment within the same week. Across multiple validation schemes, no single algorithm consistently outperformed the others, and overlapping bootstrap confidence intervals indicated broadly comparable performance across model classes.
The authors framed the study around India’s healthcare and pharmaceutical sector and the policy goal of attracting sustained domestic and foreign capital aligned with United Nations Sustainable Development Goal 3 on health and well-being. Although India is a major global supplier of generic medicines and vaccines, with sector growth supported by an aging population, a growing middle class, rising lifestyle diseases, public-private partnerships, digital health adoption, and production-linked incentive schemes under the Aatmanirbhar Bharat Abhiyaan, its health expenditure has historically lagged behind other emerging economies. Unlike prior cross-country studies that embedded health-sector value-added within diversified national indices, this investigation isolated the Nifty Pharma index, launched in July 2005 and comprising the largest, most liquid NSE-listed pharmaceutical companies, as its outcome variable. The team also distinguished revealed sentiment, defined as the binary direction of Nifty Pharma’s weekly return in the behavioral finance noise-trader tradition, from survey-based sentiment measuring stated attitudes.
The dataset spanned 672 weekly observations (378 positive, 294 negative), bounded by Nifty Pharma’s earliest available price history in February 2011 and World Bank health-expenditure data through December 2023. Applying a correlation threshold of |ρ| above 0.6, the authors excluded US Bullish and Bearish percentages (collinear with Spread), GDP growth (collinear with foreign direct investment, or FDI, net inflows), and the real interest rate as the shortest series. Seven predictors remained: four weekly series (American Association of Individual Investors Neutral percentage, AAII Bullish-minus-Bearish Spread, S&P 500 return, and BSE Sensex return) and three annual World Bank indicators assigned uniformly within each calendar year without interpolation: India’s CPI inflation (mean 6.19%), FDI net inflows (mean 1.66% of GDP), and current health expenditure per capita (mean $62.15). Because S&P 500 and Sensex returns shared the same weekly window as Nifty Pharma, the analysis evaluated contemporaneous within-week classification rather than forward forecasting.
All modeling used Python 3.12 with statsmodels, scikit-learn, xgboost, lightgbm, and catboost. Alongside logistic regression and a multilayer perceptron ANN, the team evaluated a radial basis function (RBF) support vector machine (SVM), a classification and regression tree (CART) minimizing Gini impurity, conventional gradient boosting, and three boosted-tree implementations: XGBoost (second-order loss regularization), LightGBM (histogram binning, leaf-wise growth), and CatBoost (depth-balanced symmetric trees with ordered boosting to curb prediction shift on moderate samples). Because a preliminary 500-epoch ANN without a stopping rule overfitted training noise, all models were tuned via 10-fold cross-validation on training data only using area under the receiver operating characteristic curve (AUC), leaving test data untouched. The selected ANN used seven inputs, two rectified linear unit (ReLU) hidden layers of 16 and 8 nodes, a sigmoid output node, the Adam optimizer (learning rate 0.01), and early stopping (20% validation split, 15-epoch patience), halting after 26 epochs.
In logistic regression on the 537-week random training partition, only two predictors reached statistical significance. BSE Sensex weekly returns showed a strong positive association with Nifty Pharma return direction (coefficient 20.8551, SE 4.5187, z = 4.615, p < 0.0001), as did US S&P 500 weekly returns (coefficient 13.7119, SE 4.8212, z = 2.844, p = 0.0045). Neither US survey-based sentiment, AAII Neutral (p = 0.405) and Spread (p = 0.736), nor India’s annual variables, inflation (p = 0.924), FDI net inflows (p = 0.565), and current health expenditure per capita (p = 0.359), were significant. To test whether repeating annual values distorted these results, the authors fitted a weekly-only logistic model with just the four weekly predictors. Dropping the three annual indicators improved training Akaike Information Criterion from 706.2 to 701.3 while leaving held-out test AUC nearly unchanged at 0.596 versus 0.604, with Sensex (p < 0.0001) and US returns (p = 0.0054) remaining significant.
On the primary stratified random 80:20 partition of 537 training weeks and 135 held-out test weeks, classification metrics clustered closely across all eight algorithms. CatBoost achieved the highest raw test accuracy at 66.7% and F1-score at 0.737, followed by the ANN at 65.2% accuracy (correctly classifying 85.5% of positive weeks and 39.0% of negative weeks) and 0.734 F1-score, and gradient boosting at 64.4% accuracy. Logistic regression, SVM, XGBoost, and LightGBM each scored 63.7% accuracy, with logistic regression identifying 81.6% of positive weeks and 40.7% of negative weeks, whereas CART finished lowest at 58.5%. On discrimination, the ANN posted the highest random-split test AUC at 0.637 and average precision at 0.669, ahead of CatBoost (AUC 0.616), SVM (0.610), logistic regression and gradient boosting (0.604 each), LightGBM (0.603), XGBoost (0.598), and CART (0.570). Under 10-fold cross-validation on the training set, the ANN also led with mean AUC 0.649 (SD 0.033), followed by logistic regression (0.637) and CatBoost (0.634).
Because random partitioning in financial time series can leak later regimes into training sets and inflate estimates, the team repeated the comparison under two time-respecting designs. On a chronological 80:20 hold-out (training: 537 weeks, February 2011 to May 2021; testing: 135 weeks, June 2021 to December 2023), accuracy fell uniformly, from 51.9% (gradient boosting) to 56.3% (CART), with CatBoost and LightGBM at 54.8% and the ANN at 53.3%. Chronological test AUC dropped most sharply for CatBoost (0.616 to 0.512) and gradient boosting (0.498), while the ANN reached 0.615 and SVM 0.604. Under 5-fold expanding-window walk-forward validation, where each 112-week validation block followed its training window, the AUC ranking reversed: logistic regression and CatBoost jointly led at 0.621 each, the ANN fell to last at 0.534 (fold swings 0.396 to 0.633), and all eight models neared non-discriminative performance (AUC 0.44 to 0.49) in fold 4 (around September 2019 to November 2021). Stratified 2,000-resample bootstrap 95% confidence intervals spanned 0.18 to 0.20 AUC units and overlapped heavily across all model pairs under both random (ANN AUC 0.542–0.727; CatBoost accuracy 59.3%–73.3% versus ANN 58.5%–72.6%) and chronological splits, confirming the data cannot statistically distinguish a best classifier.
To verify whether different model classes relied on the same signals, the authors evaluated ANN permutation importance and computed SHapley Additive exPlanations (SHAP) across all eight classifiers using linear, exact tree, and permutation explainers. Every model family converged on BSE Sensex and US S&P 500 returns as the two dominant predictors, cross-validating the logistic-regression results across linear, kernel, tree, ensemble, and neural architectures. Because the random test set showed moderate class imbalance (76 positive versus 59 negative weeks, or 56.3% prevalence), the team added precision-recall and decision curve analysis (DCA) benchmarked against Treat-All and Treat-None strategies. Although the ANN achieved the highest average precision (0.669) ahead of SVM (0.644) and logistic regression (0.640), DCA showed SVM, CART, gradient boosting, XGBoost, LightGBM, and CatBoost dipping below Treat-None across decision-relevant thresholds of 0.60 to 0.90, yielding worse net benefit than never acting.
These findings diverge from a 2022 cross-country ANN study by Rao and colleagues covering India, China, and the United Arab Emirates, where S&P 500 returns were a negative predictor and health expenditure as a share of GDP was a positive predictor within diversified national indices. Deshmukh and Mahajan suggest that isolating an export-oriented, globally integrated sector like Indian pharmaceuticals reverses US spillover to positive, indicating cross-border channels depend on sector composition. Given unstable rankings and negative net benefit from complex models at plausible thresholds, the authors advise using a simple logistic model with the two dominant return predictors unless complex architectures prove consistently superior across random, chronological, and walk-forward validation.
The authors emphasize several structural limitations. Because Sensex and S&P 500 returns are measured over the same weekly window as Nifty Pharma returns, none of the eight models can anticipate a week’s return direction before that week closes; forward-looking forecasting would require predictors lagged by at least one week. The annual macroeconomic indicators are national rather than pharmaceutical-specific and offer limited independent variation when repeated weekly, while survey-based sentiment relied on US retail investors via AAII because India-specific or institutional measures were unavailable. Extending the sample, adding pharmaceutical-specific fundamentals such as export growth and research-and-development investment, incorporating Indian survey sentiment, and testing long short-term memory networks under the same multi-scheme validation protocol remain next steps.
Subject of Research: Machine-learning classification and market determinants of weekly revealed investor sentiment in India’s Nifty Pharma equity index
Article Title: Machine learning classification and determinants of revealed investor sentiment in India’s health-sector equity market
Article References: Deshmukh, R., & Mahajan, S. (2026). Machine learning classification and determinants of revealed investor sentiment in India’s health-sector equity market. Frontiers in Artificial Intelligence, 9, Article 1962914. https://doi.org/10.3389/frai.2026.1962914
Image Credits: AI Generated
DOI: 10.3389/frai.2026.1962914
Keywords: Nifty Pharma, revealed investor sentiment, BSE Sensex, S&P 500, artificial neural networks, CatBoost, logistic regression, XGBoost, LightGBM, walk-forward validation, SHAP explainability, decision curve analysis, India healthcare equities, health expenditure, AAII sentiment survey, cross-border spillover, behavioral finance
News Source: Denise Maddox. (December 2, 2026). Sensex and US Returns Dominate Weekly Indian Pharma Sentiment Classification. Scienmag.



