Data Preprocessing - tarunc27/TCS-Stock-Price-Analysis-and-Prediction GitHub Wiki

Converted the Date column to datetime format and sorted records.

Forward-filled missing values to maintain time-series continuity.

Dropped any remaining nulls after transformations.

Created new features for modeling:

  • 50-day and 200-day moving averages

  • Previous day’s close (lag feature)

  • Daily percentage change in closing price

  • Year, Month, Day, Day of the week

Normalized data for LSTM modeling using MinMaxScaler.