Financial ML & Market Analytics Mar 31, 2026 Published project
AAPL Regression & Direction Models

Supervised learning on financial time-series features

This project compares next-day price regression and next-day direction classification on Apple stock data using moving averages, returns, and chronological evaluation.

PythonyfinancePandasScikit-learnLinear RegressionLogistic Regression

Challenge

  • Price-level prediction and directional prediction behave very differently in markets.
  • A visually reasonable price regression may still fail to create useful directional signals.
  • Time-series evaluation must respect chronological order.

System architecture

AAPL data
Technical features
Linear regression
Logistic classification

Data and inputs

AAPL daily data from 2014-01-01 to 2024-01-01 with open, high, low, close, volume, SMA_10, SMA_50, and daily return features.

Technical approach

  • Create next-day targets for price and direction.
  • Engineer moving-average and return features.
  • Use chronological train/test splitting.
  • Train linear regression and tuned logistic regression.

Evaluation and results

Key indicators

AAPL data: 2014–2024

Key indicators

RMSE 2.8188

Key indicators

Direction accuracy 51.42%

  • Linear regression reached RMSE 2.8188 for next-day close prediction.
  • Tuned logistic regression reached 51.42% direction accuracy, matching the majority-class baseline.
  • The result highlights the difficulty of short-horizon directional prediction.

Implementation and code

Implementation focus

The implementation connects data preparation, modeling, evaluation, and interpretation in a structured workflow that makes the technical decisions clear.

Source code

The code is available for exploring the implementation details and extending the experiment when needed.

Open source code

Scope and responsible use

The analysis is intended for modeling and evaluation, not investment advice. Real trading use would require risk controls, transaction-cost modeling, out-of-sample validation, and continuous monitoring.

Future development

  • Add walk-forward validation.
  • Compare additional technical and volatility features.
  • Evaluate profitability only after separating signal quality from price fit.

Technical contribution

The project demonstrates careful comparison between regression accuracy and directional signal usefulness in financial ML.