1)will MATLAB ARIMA model be able to forecast data of this nature
2) 1440 points of rolling window forecast has not followed the pattern of the data
3) is it that the ARIMA is not suited for the model or that ARIMA GARCH is most appropriate to be applied
refer below script thus:
% Ensure P_w is correctly defined
head(P_w)
t =(0:15:(length(P_w)-1)*15)';
wind_speed = [t, P_w];
% Create datetime array starting from a specific point in time
startTime = datetime('2019-08-23 00:00:00'); % Adjust as needed
timeVector = startTime + minutes(t);
% Create timetable
wind_speed = timetable(timeVector, P_w, 'VariableNames', {'WindSpeed'});
% Number of future points to forecast
numForecasts = 1440;
% Generate future time points correctly
futureTimes = wind_speed.Properties.RowTimes(end) + minutes(15) * (1:numForecasts)';
% Forecast future wind speeds
[forecastedValues, forecastedMSE] = forecast(ARIMA_P_w1, numForecasts, 'Y0', wind_speed.WindSpeed);
% Create timetable for forecasted data with the same variable name as wind_speed
forecastedWindSpeed = forecastedValues; % Rename to match wind_speed
forecastedData = timetable(futureTimes, forecastedWindSpeed, forecastedMSE, ...
'VariableNames', {'WindSpeed', 'ForecastedMSE'}); % Ensure 'WindSpeed' matches
% Ensure both tables have the same variables before concatenation
forecastedData.ForecastedMSE = []; % Remove extra column if necessary
% Combine original and forecasted data
combinedData = [wind_speed; forecastedData]; % Now both have 'WindSpeed' column
% Plot the results
figure;
plot(combinedData.timeVector, combinedData.WindSpeed, 'b', 'DisplayName', 'Observed & Forecasted Wind Speed');
hold on;
plot(forecastedData.futureTimes, forecastedData.WindSpeed, 'r--', 'DisplayName', 'Forecasted Wind Speed');
hold off;
legend;
title('Wind Speed Forecast');
xlabel('Time');
ylabel('Wind Speed');
Any help will be appreciated for young researcher as the research continues to have forecasted windspeed that doesnt align wih the original data layout.