Featured2025ML engineer and data scientist

NVDA Daily Price Movement Prediction

Combined RNN, LSTM, and Conv1D market models with a fine-tuned BERT sentiment pipeline to study daily NVDA price direction.

  • NLP
  • Time Series
  • Machine Learning

TL;DR

A notebook-based deep-learning project that models historical NVDA price direction, fine-tunes BERT on financial phrases, aggregates headline sentiment by day, and compares market movement with sentiment trends.

Problem

Price history captures temporal patterns but misses the information arriving through financial news; the project explored both signals and how to evaluate them together.

TL;DR

I built a set of deep-learning experiments for daily NVDA price direction and a separate BERT pipeline for classifying financial-news sentiment. The repository joins the resulting daily sentiment signal with market data for interpretation, while leaving a clear next step: a time-aware ablation that proves whether news adds predictive value beyond price history.

Why it matters

Market models often combine structured time series with unstructured news, but each signal has different failure modes. This project demonstrates both sides of that workflow: sequence models for historical prices and domain-adapted language modeling for positive, neutral, and negative financial text.

Dataset / inputs

Historical NVDA prices are retrieved with yfinance. Sentiment fine-tuning uses the 2,264-example AllAgree subset of FinancialPhraseBank, and the downstream news pipeline creates a sentiment-enriched analyst-ratings CSV for daily aggregation. The repository includes the FinancialPhraseBank license and the generated CSV.

Technical decisions

I compared recurrent, LSTM, and one-dimensional convolutional models rather than assuming one sequence architecture would dominate. For language, I fine-tuned bert-base-uncased with an 80/20 split, a 2e-5 learning rate, and early stopping, then aggregated headline predictions into daily sentiment values that could be aligned with trading dates.

Challenges

The largest remaining issue is evaluation design. The notebooks record useful classification results, but market data is chronological and should be tested with walk-forward splits. A future experiment also needs a price-only baseline, a price-plus-sentiment model, and trading-cost-aware results before any claim of actionable forecasting performance is justified.

Methods

  • Retrieved historical NVDA prices with yfinance and prepared sequential up/down targets
  • Trained and compared RNN, LSTM, and Conv1D architectures for daily movement classification
  • Fine-tuned BERT on FinancialPhraseBank using positive, neutral, and negative labels
  • Generated headline-level sentiment and aggregated it into daily signals
  • Compared price and sentiment series with dual-axis visualizations

Results

  • The Conv1D notebook records 86.68% accuracy on its test split after 40 epochs
  • The BERT training history records a peak validation accuracy of 97.35%
  • Produced a sentiment-enriched analyst-ratings dataset and price-versus-sentiment visualizations

Lessons learned

  • A high classification score is not evidence of a profitable strategy without time-aware validation and trading-cost analysis
  • Sentiment is most useful when its incremental value is measured against a price-only baseline

Limitations

  • The notebooks do not report a walk-forward backtest, transaction costs, calibration, or risk-adjusted trading returns
  • The repository visualizes sentiment and price together but does not quantify the incremental lift from adding sentiment to the forecasting model
  • Some notebooks use local absolute paths and saved weights that are not included, so the workflow is not fully portable

Next steps

  • Replace random splits with walk-forward validation that respects market chronology
  • Run a price-only versus price-plus-sentiment ablation with confidence intervals
  • Evaluate calibration, class imbalance, transaction costs, and risk-adjusted returns
  • Package data preparation and evaluation as scripts with a locked environment