StockBuddy: نظام دعم قرار قابل للتفسير وخفيف الوزن قائم على الويب للتنبؤ بالأسهم على المدى القصير والتوصية StockBuddy: An Interpretable and Lightweight Web-Based Decision Support System for Short-Term Equity Forecasting and Recommendation

شارك:
المجلة: International Journal of Innovative Science and Research Technology (IJISRT)
DOI: https://doi.org/10.38124/ijisrt/26mar1068
تاريخ النشر: 2026-03-23
المؤلف: Sujit Shibaprasad Maity
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

تقدم ورقة البحث StockBuddy Assistant، وهو نظام دعم قرار قائم على الويب مصمم لتحليل سوق الأسهم وتوقع الأسعار على المدى القصير. يستفيد من بيانات الأسهم في الوقت الفعلي من واجهة برمجة تطبيقات Alpha Vantage ويستخدم نهج التعلم الآلي الخاضع للإشراف، وبالتحديد الانحدار الخطي، للتنبؤ بأسعار الإغلاق للأيام السبعة القادمة مع الأخذ في الاعتبار قيود أيام التداول. يتضمن النظام مكونًا للتصور ووحدة توصية قائمة على القواعد تقدم إرشادات استثمارية أساسية بناءً على الاتجاهات المتوقعة. تشير النتائج التجريبية إلى أنه بينما يلتقط النموذج الخطي بفعالية الاتجاهات قصيرة المدى في ظل ظروف مستقرة، فإن أدائه يتناقص في بيئات السوق المتقلبة. يظهر النظام تحسنًا في متوسط الخطأ المطلق والدقة الاتجاهية مقارنةً بقاعدة الاستمرارية الساذجة، كل ذلك مع الحفاظ على زمن استنتاج أقل من مللي ثانية مناسب للتطبيقات في الوقت الفعلي.

في الختام، يمثل StockBuddy Assistant تكامل نماذج التعلم الآلي القابلة للتفسير في أدوات مالية سهلة الوصول، ملتزمًا بمبادئ أنظمة دعم القرار الحديثة. تهدف الأعمال المستقبلية إلى تحسين النظام من خلال دمج نماذج توقع متقدمة مثل ARIMA وProphet وLSTM، واستكشاف التعلم العميق المستخلص للمعرفة لتحسين الدقة دون التضحية بالقدرة على التفسير، وتطوير آليات توصية واعية بالتقلبات. بالإضافة إلى ذلك، ستمتد الأبحاث إلى تحليلات متعددة الأصول وعلى مستوى المحفظة، مع التركيز على الحاجة إلى تحقيق توازن بين الأداء التنبؤي، والقدرة على التفسير، وكفاءة النشر في أنظمة دعم القرار المالية في الوقت الفعلي.

مقدمة

تسلط المقدمة الضوء على تعقيدات توقع أسعار الأسهم في الأسواق المالية، التي تتأثر بمجموعة متنوعة من العوامل مثل المؤشرات الاقتصادية الكلية، والأحداث الجيوسياسية، وأداء الشركات، ومشاعر المستثمرين. تقدم الخصائص العشوائية وغير الثابتة لهذه التأثيرات تحديات كبيرة في المالية الكمية. على الرغم من التقدم في نمذجة التوقعات، لا تزال العديد من الأنظمة الحالية غير متاحة للمستثمرين الأفراد بسبب متطلباتها الحاسوبية ونقص القدرة على التفسير.

لقد سهلت التطورات الأخيرة في تقنيات الويب وعلوم البيانات إنشاء منصات تحليلات مالية تفاعلية. ومع ذلك، لا يزال هناك فجوة بين أنظمة التداول الخوارزمية المتطورة وأدوات التصور الأساسية التي لا تتضمن الذكاء التنبؤي. تهدف الورقة إلى تقييم فعالية وقيود التوقعات القائمة على الاتجاه الخطي في ظروف السوق الواقعية، وإظهار كيف يمكن دمج نماذج التوقع الخفيفة في أنظمة دعم القرار المالية القائمة على الويب وسهلة الاستخدام.

الطرق

تضمنت منهجية التوقع المستخدمة في هذه الدراسة تقييم نموذج الانحدار الخطي عبر مختلف الأسهم في قطاعات السوق المختلفة لتحديد قابليته للتعميم. تشير النتائج إلى أنه بينما يلتقط النموذج بفعالية الاتجاهات الأحادية قصيرة المدى خلال ظروف السوق المستقرة، فإن دقته تتناقص بشكل كبير خلال فترات التقلب العالي، أو الصدمات السعرية المفاجئة، أو التحولات الهيكلية. تنشأ هذه القيود من اعتماد النموذج على الافتراضات الخطية واستبعاده للمتنبئين المساعدين مثل حجم التداول، ومؤشرات الزخم، والمتغيرات الاقتصادية الكلية، التي يمكن أن تعزز القدرات التنبؤية. استخدمت تقييم الأداء إطار اختبار خلفي بنظام النافذة المتدحرجة، حيث تم قياس متوسط الخطأ المطلق (MAE) والدقة الاتجاهية، على الرغم من أنه لم يتضمن اختبار فرضيات إحصائية رسمية مثل اختبار ديبولد-ماريانو، مما يجعل النتائج وصفية بدلاً من حاسمة.

بالإضافة إلى ذلك، تم إجراء قياسات زمن الاستجابة لتدريب النموذج باستخدام وحدة الوقت في بايثون، مع حساب المتوسطات على مدار 100 تشغيل مستقل لتقليل ضوضاء القياس. كانت المقياس الرئيسي المسجل هو زمن التدريب، المشار إليه بـ \( T_{\text{train}} \)، والذي يعكس الوقت المستغرق لتكييف النموذج على آخر 60 يوم تداول. تهدف الأبحاث المستقبلية إلى دمج اختبار رسمي للمتانة والأهمية لتعزيز التحقق التجريبي من نظام التوقعات.

النتائج

يقدم قسم النتائج معايير كمية لنموذج الانحدار الخطي المقترح، مع تسليط الضوء على كفاءته من حيث زمن الاستجابة واستخدام الموارد. يتمتع النموذج بزمن تدريب ($T_{\text{train}}$) يتراوح بين 0.8-1.2 مللي ثانية، وزمن استنتاج ($T_{\text{infer}}$) يتراوح بين 0.1-0.3 مللي ثانية، وزمن استجابة شامل ($T_{\text{total}}$) يتراوح بين 1.0-1.5 مللي ثانية. بالإضافة إلى ذلك، فإن حجم النموذج المتسلسل أقل من 5 كيلوبايت، واستخدام الذاكرة القصوى أقل من 1 ميغابايت، مما يشير إلى نموذج مضغوط عالي الكفاءة مناسب لتطبيقات توقعات مالية.

في تحليل مقارن، تم تقييم أداء النموذج باستخدام إعداد نافذة متدحرجة على مدار آخر 60 يوم تداول، مع توقع لمدة 7 أيام. تشمل المقاييس المستخدمة للتقييم متوسط الخطأ المطلق (MAE) والدقة الاتجاهية. تشير النتائج إلى تباين الأداء عبر مختلف الرموز، حيث تتراوح قيم MAE من 1.12 دولار أمريكي لمايكروسوفت (MSFT) إلى 9.45 دولار أمريكي لتيسلا (TSLA). كما تباينت نسب الدقة الاتجاهية، حيث كانت الأعلى 61.4% لآبل (AAPL) والأدنى 53.3% لتيسلا (TSLA). كان متوسط MAE عبر جميع الرموز حوالي 3.89 دولار أمريكي، مع دقة اتجاهية إجمالية تبلغ 57.9%، مما يظهر فعالية النموذج المحتملة في توقع تحركات أسعار الأسهم.

المناقشة

تؤكد قسم المناقشة في الورقة على دمج مبادئ ضغط النموذج ضمن StockBuddy Assistant، وهو منصة تحليل وتوقع الأسهم القائمة على الويب. تسلط الضوء على أهمية تحقيق توازن بين الأداء التنبؤي وكفاءة النشر، خاصة في البيئات المالية في الوقت الفعلي. يستخدم النظام نموذج الانحدار الخطي، الذي، على الرغم من كونه أبسط وأكثر قابلية للتفسير من نماذج التعلم العميق المعقدة، يلتقط بفعالية الاتجاهات قصيرة المدى. تعطي هذه الاختيار الأولوية لزمن استجابة منخفض وكفاءة حسابية، مما يجعله مناسبًا للتفاعل مع المستخدمين. تم تصميم الهيكل للسماح بتحسينات مستقبلية، مما يمكّن من دمج نماذج أكثر تقدمًا دون إعادة هيكلة كبيرة.

تحدد الورقة أيضًا قيود النهج الحالي، مثل عدم قدرته على نمذجة تحركات الأسعار غير الخطية ونقص نمذجة عدم اليقين الاحتمالي. يتم تناول الاعتبارات الأخلاقية، مما يضمن أن النظام يقدم توصيات لأغراض إعلامية فقط، وبالتالي يتجنب أي تمثيل خاطئ كنصيحة مالية. تهدف الأعمال المستقبلية إلى استكشاف تقنيات توقع متقدمة وتحسين نظام التوصيات من خلال دمج آليات واعية بالتقلبات، مما يعزز في النهاية فائدة المنصة في ظروف السوق الديناميكية.

القيود

تتمتع استراتيجية التوصية المقترحة، على الرغم من كونها شفافة وفعالة حسابيًا، بعدة قيود ملحوظة تؤثر على فعاليتها. أولاً، لا تأخذ في الاعتبار مقاييس التقلب، أو مقاييس العائد المعدل للمخاطر مثل نسبة شارب، أو تحليل الانخفاض، مما يؤدي إلى توصيات تركز على الاتجاهات الاتجاهية دون دمج الوعي بالمخاطر. بالإضافة إلى ذلك، يفتقر النموذج إلى دمج حجم التداول، ومؤشرات الزخم، أو الإشارات الفنية، التي يمكن أن تعزز موثوقية التوقعات قصيرة المدى؛ يعتمد فقط على أسعار الإغلاق المتوقعة، مما يحد من تفسيره للسوق.

علاوة على ذلك، لا يأخذ الإطار في الاعتبار تكاليف المعاملات، أو الانزلاق، أو فروق الأسعار، أو قيود السيولة، مما يعني أنه لا ينبغي اعتبار التوصيات مؤشراً على ربحية التداول في ظروف السوق الواقعية. قد يتأثر أداء النموذج أيضًا خلال الأحداث الحرجة مثل إعلانات الأرباح أو تغييرات السياسة الاقتصادية الكلية، حيث يمكن أن تتغير ديناميكيات الأسعار بشكل كبير. في النهاية، تعتمد موثوقية التوصيات على دقة نموذج التوقع الأساسي، وأي تراجع في أداء التوقع—خاصة خلال فترات التقلب العالي أو صدمات السوق—يمكن أن يقوض بشكل كبير فعالية النظام. يتم الاعتراف بهذه القيود لضمان عدم اعتماد المستخدمين بشكل مفرط على الآلية، التي تهدف إلى أن تكون أداة دعم قرار بدلاً من حل تداول آلي بالكامل.

Journal: International Journal of Innovative Science and Research Technology (IJISRT)
DOI: https://doi.org/10.38124/ijisrt/26mar1068
Publication Date: 2026-03-23
Author(s): Sujit Shibaprasad Maity
Primary Topic: Stock Market Forecasting Methods

Overview

The research paper introduces StockBuddy Assistant, a web-based decision support system designed for stock market analysis and short-term price forecasting. It leverages real-time stock data from the Alpha Vantage API and employs a supervised machine learning approach, specifically Linear Regression, to predict closing prices for the next seven trading days while accounting for trading-day constraints. The system includes a visualization component and a rule-based recommendation module that offers basic investment guidance based on forecasted trends. Experimental results indicate that while the linear model effectively captures short-term trends under stable conditions, its performance diminishes in volatile market environments. The system demonstrates improved mean absolute error and directional accuracy compared to a naïve persistence baseline, all while maintaining sub-millisecond inference latency suitable for real-time applications.

In conclusion, StockBuddy Assistant exemplifies the integration of interpretable machine learning models into accessible financial tools, adhering to modern decision support system principles. Future work aims to enhance the system by incorporating advanced forecasting models such as ARIMA, Prophet, and LSTM, exploring knowledge-distilled deep learning for improved accuracy without sacrificing interpretability, and developing volatility-aware recommendation mechanisms. Additionally, the research will extend to multi-asset and portfolio-level analytics, emphasizing the need to balance predictive performance, interpretability, and deployment efficiency in real-time financial decision support systems.

Introduction

The introduction highlights the complexities of forecasting stock prices in financial markets, which are influenced by a myriad of factors such as macroeconomic indicators, geopolitical events, corporate performance, and investor sentiment. The stochastic and non-stationary characteristics of these influences present significant challenges in quantitative finance. Despite advancements in predictive modeling, many existing systems remain inaccessible to retail investors due to their computational demands and lack of interpretability.

Recent developments in web technologies and data science have facilitated the creation of interactive financial analytics platforms. However, a gap remains between sophisticated algorithmic trading systems and basic visualization tools that do not incorporate predictive intelligence. The paper aims to evaluate the effectiveness and limitations of linear trend-based forecasting in real-world market conditions and to illustrate how lightweight predictive models can be integrated into user-friendly, web-based financial decision-support systems.

Methods

The forecasting methodology employed in this study involved evaluating a Linear Regression model across various equities in different market sectors to determine its generalizability. The findings indicate that while the model effectively captures short-term monotonic trends during stable market conditions, its accuracy diminishes significantly during periods of high volatility, abrupt price shocks, or structural regime shifts. This limitation arises from the model’s reliance on linear assumptions and its exclusion of auxiliary predictors such as trading volume, momentum indicators, and macroeconomic variables, which could enhance predictive capabilities. The performance evaluation utilized a rolling-window backtesting framework, measuring Mean Absolute Error (MAE) and directional accuracy, although it did not include formal statistical hypothesis testing like the Diebold-Mariano test, rendering the results descriptive rather than conclusive.

Additionally, latency measurements for model training were conducted using Python’s time module, with averages computed over 100 independent runs to mitigate measurement noise. The primary metric recorded was the training latency, denoted as \( T_{\text{train}} \), which reflects the time taken to fit the model on the most recent 60 trading days. Future research aims to incorporate formal robustness and significance testing to enhance the empirical validation of the forecasting system.

Results

The results section presents quantitative benchmarks for the proposed Linear Regression model, highlighting its efficiency in terms of latency and resource usage. The model has a training latency ($T_{\text{train}}$) of 0.8-1.2 ms, an inference latency ($T_{\text{infer}}$) of 0.1-0.3 ms, and an end-to-end latency ($T_{\text{total}}$) of 1.0-1.5 ms. Additionally, the serialized model size is less than 5 KB, and peak memory usage is under 1 MB, indicating a highly efficient compressed model suitable for financial forecasting applications.

In a comparative analysis, the model’s performance was evaluated using a rolling-window setup over the most recent 60 trading days, forecasting for a 7-day horizon. Metrics used for evaluation included Mean Absolute Error (MAE) and Directional Accuracy. The results indicate varying performance across different tickers, with MAE values ranging from 1.12 USD for Microsoft (MSFT) to 9.45 USD for Tesla (TSLA). Directional Accuracy percentages also varied, with the highest at 61.4% for Apple (AAPL) and the lowest at 53.3% for Tesla (TSLA). The average MAE across all tickers was approximately 3.89 USD, with an overall directional accuracy of 57.9%, demonstrating the model’s potential effectiveness in predicting stock price movements.

Discussion

The discussion section of the paper emphasizes the integration of model compression principles within the StockBuddy Assistant, a web-based stock analysis and forecasting platform. It highlights the importance of balancing predictive performance with deployment efficiency, particularly in real-time financial environments. The system employs a Linear Regression model, which, while simpler and more interpretable than complex deep learning models, effectively captures short-term trends. This choice prioritizes low latency and computational efficiency, making it suitable for interactive user engagement. The architecture is designed to allow for future enhancements, enabling the incorporation of more advanced models without significant restructuring.

The paper also outlines the limitations of the current approach, such as its inability to model nonlinear price movements and the lack of probabilistic uncertainty modeling. Ethical considerations are addressed, ensuring that the system provides recommendations solely for informational purposes, thereby avoiding potential misrepresentation as financial advice. Future work aims to explore advanced forecasting techniques and improve the recommendation system by incorporating volatility-aware mechanisms, ultimately enhancing the platform’s utility in dynamic market conditions.

Limitations

The proposed recommendation strategy, while transparent and computationally efficient, has several notable limitations that impact its effectiveness. Firstly, it does not account for volatility measures, risk-adjusted return metrics such as the Sharpe ratio, or drawdown analysis, leading to recommendations that focus on directional trends without incorporating risk-awareness. Additionally, the model lacks integration of trading volume, momentum indicators, or technical signals, which could enhance short-term predictive reliability; it relies solely on forecasted closing prices, thus limiting its market interpretation.

Moreover, the framework does not consider transaction costs, slippage, bid-ask spreads, or liquidity constraints, meaning that the recommendations should not be viewed as indicative of trading profitability in realistic market conditions. The model’s performance may also suffer during critical events such as earnings announcements or macroeconomic policy changes, where price dynamics can shift dramatically. Ultimately, the reliability of the recommendations hinges on the accuracy of the underlying forecasting model, and any decline in forecast performance—especially during periods of high volatility or market shocks—can significantly undermine the system’s effectiveness. These limitations are acknowledged to ensure users do not over-rely on the mechanism, which is intended as a decision support tool rather than a fully automated trading solution.