A computational finance investigation has demonstrated that lightweight machine learning models paired with domain-specific fundamental feature engineering can outperform state-of-the-art deep learning architectures when forecasting annual stock returns and investment risk. Developed by researchers Hossein Rezaei, Mohsen Hooshmand, and Kamran Abdi, the study addresses a persistent challenge in financial time series analysis: while fundamental analysis grounded in corporate financial ratios provides essential signals for long-term investing, computational workflows have frequently neglected feature engineering and the temporal dependencies inherent in multi-year corporate filings. By comparing sample-based methods that treat each annual corporate filing independently against trend-based frameworks that summarize multi-year statistical trajectories into unified feature vectors, the investigators evaluated predictive efficacy across four distinct operational settings: sample-based classification, trend-based classification, sample-based regression, and trend-based regression.
To evaluate these methodologies, the researchers compiled a clean ten-year financial dataset tracking manufacturing companies listed on the Tehran Stock Exchange between 2012 and 2021. The statistical population was specifically restricted to manufacturing enterprises to maintain conceptual consistency across annual disclosures. Out of an initial pool of companies, 57 entities lacking regular or complete reports were eliminated, yielding a final analytical cohort of 148 firms and 1,480 firm-year observation records. The investigative pipeline incorporated 45 distinct financial ratio features alongside two primary target metrics representing total holding period return and systematic beta risk. Across the decade-long interval, observed company returns spanned a wide range from negative 68.52 percent to positive 2567.79 percent, exhibiting an aggregate mean of 108.84 percent and a standard deviation of 213.67 percent. Concurrently, calculated beta values spanned from negative 2.21 to positive 58.19, with an aggregate mean of 0.80 and a standard deviation of 1.80.
The study formulated strict mathematical definitions for both outcome variables to ground model training in verified financial mechanics. Annual stock returns were computed using daily geometric mean compounding derived from adjusted closing prices, which accounted for corporate interventions such as cash dividends, bonus shares, priority rights, and capital expansions achieved via cash contributions, current claims, accumulated interest, or asset revaluations. Systematic risk was quantified as beta, measuring the covariance between an individual share’s daily return index and the broader market return relative to overall market variance from 2012 to 2021. For classification experiments, continuous returns were converted into binary categories using annual inflation rates published by the World Bank as an economic threshold, categorizing returns exceeding annual inflation as positive outperformance and those falling below as negative. Beta risk was dichotomized such that values falling within the interval between zero and one represented milder price fluctuations relative to the market, whereas negative values or figures greater than one reflected inverse correlations or amplified price volatility.
A core architectural innovation in the study is the operational contrast between sample-based and trend-based feature representations. In the sample-based setup, each annual filing stands alone as an individual row, generating up to ten distinct observation vectors per enterprise across the study window. Conversely, the trend-based framework condenses an enterprise’s longitudinal record into a single representative profile by calculating four primary statistical summary operators across previous reporting periods: minimum, maximum, mean, and median. When applied across the baseline feature universe and augmented with historical target statistics, this statistical conversion synthesized a multi-year signature encompassing four times the feature count plus eight dedicated historical risk and return metrics. Under this trend-based formulation, the model uses multi-year historical profiles spanning 2012 through 2020 to forecast the terminal return and beta targets observed in 2021, directly testing whether temporal aggregation can capture persistent corporate trajectories without requiring complex recurrent network architectures.
To prevent data leakage during model training and evaluation, the experimental framework implemented a two-nested five-fold cross-validation scheme coupled with a dedicated feature selection protocol termed Statistically Aggregated Nested Feature Ranking. In this workflow, an outer five-fold cross-validation separated independent testing sets from training subsets using an 80-20 stratified split. Within each outer fold, the training split was subdivided into five internal folds to perform hyperparameter tuning and algorithmic feature ranking without accessing unseen test observations. Feature prioritization utilized the SelectKBest algorithm, computing one-way analysis of variance F-tests for classification targets and Pearson correlation F-tests for continuous regression tasks. Ranks were aggregated across inner folds by evaluating the mode, mean, and standard deviation of each metric, generating stable fold-specific candidate feature lists while examining data splitting schemes governed by yearly groupings, company groupings, and ungrouped stratified k-folding.
The model evaluation benchmarked four supervised classical machine learning models—logistic regression, support vector machines, random forest ensembles, and histogram gradient boosting—alongside a custom feedforward neural network designed specifically for financial tabular data, termed FNN-Fin. FNN-Fin was engineered as a shallow two-layer fully connected architecture with 64 and 32 neurons, rectified linear unit activation, 0.2 dropout regularization, binary cross-entropy loss, and an Adam optimizer operating at a learning rate of 0.001. The performance of these models was contrasted against a benchmark hybrid deep learning model, the LSTM-mTrans-MLP architecture, which combines long short-term memory recurrent units with modified transformers and multilayer perceptrons. Across both classification and regression experiments, predictive performance was measured using balanced accuracy, Matthew’s correlation coefficient, the area under the receiver operating characteristic curve, the area under the precision-recall curve, and traditional regression error metrics including R-squared, mean absolute error, and root mean squared error.
Empirical evaluations on sample-based classification revealed that lightweight architectures substantially outperformed the complex deep learning benchmark. For annual return prediction, histogram gradient boosting achieved the highest performance with an area under the precision-recall curve of 90.77 percent, surpassing the LSTM-mTrans-MLP hybrid by 6.43 percentage points. The custom FNN-Fin network also exceeded the deep sequence model, achieving a 3.56 percentage point improvement in precision-recall area. In sample-based beta risk prediction, classical logistic regression delivered the leading outcome, securing a 74.37 percent area under the precision-recall curve and exceeding the deep sequence architecture by 3.82 percentage points. Statistical validation using one-sample t-tests across five random seeds confirmed that all evaluated models achieved statistically significant improvements over class-prevalence random baselines, with p-values falling well below the 0.05 threshold and frequently orders of magnitude below 0.001.
Transitioning from sample-based processing to the trend-based formulation yielded marked performance enhancements, especially when forecasting systemic investment risk. In trend-based classification, random forest ensembles incorporating previous beta statistics attained an area under the precision-recall curve of 94.16 percent, representing an increase of nearly twenty percentage points over sample-based beta classification baselines. When evaluating continuous numerical targets under regression regimes, histogram gradient boosting demonstrated the highest R-squared values for annual returns when provided with historical return trajectory features, whereas random forests achieved peak predictive power for continuous beta estimation when incorporating historical risk signals. Comparative visual diagnostics confirmed that regression models exhibited tighter residual distributions along the line of equality for return predictions than for risk targets, demonstrating that systematic risk estimation remains inherently more volatile than return forecasting.
Analysis of the Statistically Aggregated Nested Feature Ranking procedure exposed a fundamental structural divergence between variables predicting profitability and those predicting market risk. Return prediction models achieved robust, stable performance using indicators such as market-relative return metrics, which consistently ranked highest across both MinMax and standard scaling transformations. In contrast, beta prediction models prioritized corporate balance sheet and structural ratios, with price-to-book value ranking first for beta classification despite placing sixth for return forecasts, and net profit relative to gross profit ranking third for beta while placing twenty-fifth for return prediction. Dimensionality experiments demonstrated that predictive precision saturated rapidly: across both classification frameworks, models achieved over 88 percent area under the precision-recall curve using only three to five top-ranked fundamental variables, confirming that high-dimensional feature spaces provide diminishing returns compared to targeted, domain-specific indicators.
The findings emphasize notable computational and practical trade-offs for financial forecasting applications in environments constrained by data scarcity, computational infrastructure, or regulatory transparency. Classical machine learning pipelines trained rapidly on standard central processing units, avoiding the extensive training durations and parameter tuning complexities required by deep recurrent-transformer hybrids. While the research establishes that statistical feature conversion and trend-based feature engineering deliver superior performance within a structured ten-year manufacturing cohort on the Tehran Stock Exchange, the investigators note that predictive models must remain task-specific, maintaining distinct feature selection pipelines for return outperformance and risk sensitivity. By demonstrating that lightweight algorithms paired with temporal feature summaries surpass heavier sequence architectures, the study offers an empirically validated foundation for systematic fundamental modeling in long-term asset management.
Subject of Research: Machine learning and fundamental feature engineering for stock market return and risk prediction
Article Title: Machine learning based classification and regression approaches for return and risk prediction in the stock market using fundamental feature engineering
Article References: Rezaei, H., Hooshmand, M., & Abdi, K. (2025). Machine learning based classification and regression approaches for return and risk prediction in the stock market using fundamental feature engineering. Discover Analytics, 3(1), Article 17. https://doi.org/10.1007/s44257-025-00042-5
Image Credits: AI Generated
DOI: 10.1007/s44257-025-00042-5
Keywords: Machine Learning, Fundamental Analysis, Stock Market Prediction, Portfolio Management, Tehran Stock Exchange, Feature Engineering, Financial Ratios, Return Prediction, Beta Risk, Histogram Gradient Boosting, Random Forest, Logistic Regression, Deep Learning, Model Evaluation, Time Series Forecasting, Statistical Conversion, Nested Cross-Validation
News Source: Blake Davidson. (November 14, 2026). Lightweight Machine Learning Outperforms Complex Models in Stock Return and Risk Prediction. Scienmag.



