Executing and Checking the Model Summary

Now we will check the summary of the model.

R
# Summary of the model
summary(df.close.arima)

Output:

Series: df.close.train 
ARIMA(0,1,1) with drift

Coefficients:
ma1 drift
0.0220 0.0667
s.e. 0.0151 0.0462

sigma^2 = 8.883: log likelihood = -10921.87
AIC=21849.74 AICc=21849.74 BIC=21868.87

Training set error measures:
ME RMSE MAE MPE MAPE MASE ACF1
Training set 1.070102e-05 2.979396 1.175391 -1.252125 2.838547 1.008832 0.0001708062

This ARIMA model appears to:

  • Fit the training data with a low overall error (as indicated by ME, RMSE, MAE, etc.).
  • The coefficients for ma1 and drift show a slight moving average component and a small linear drift.
  • The log-likelihood, AIC, and BIC values are reported for understanding the quality of model fit and for comparing with other models.

Checking Accuracy of Netflix Stock Price Prediction Model

Comparing Training and Testing Accuracy of of the Netflix Stock Price Prediction Model:

R
accuracy(df.close.forecast, df.close.test)

Output:

                       ME       RMSE        MAE       MPE      MAPE       MASE         ACF1
Training set 1.070102e-05 2.979396 1.175391 -1.252125 2.838547 1.008832 0.0001708062
Test set 8.253246e+01 150.853167 122.694874 11.009547 29.253149 105.308391 NA

where:

  • ME (Mean Error) indicates the average error.
  • RMSE (Root Mean Square Error) shows the square root of the average squared errors.
  • MAE (Mean Absolute Error) is the average of the absolute errors.
  • MPE (Mean Percentage Error) represents the average percentage error.
  • MAPE (Mean Absolute Percentage Error) is the average of the absolute percentage errors.
  • MASE (Mean Absolute Scaled Error) measures the accuracy of a model compared to a naive forecasting method.
  • ACF1 (Autocorrelation at Lag 1) indicates how much current values are related to past values.

The training set has much lower error values across all metrics compared to the test set. This suggests the model performs well on the data it was trained on but does not generalize well to new data (the test set).

Performance Comparison on Netflix Stock Price Prediction Model on Training vs Test Data Set

  • The training set has minimal errors (almost perfect), which might indicate overfitting—the model learned the training data too well but is not adaptable to new or unseen data.
  • The test set shows much higher errors, suggesting that the model doesn’t predict well for data it hasn’t seen before.

Netflix Stock Price Prediction & Forecasting using Machine Learning in R

Recently, many people have been paying attention to the stock market as it offers high risks and high returns. In simple words, “Stock” is the ownership of a small part of a company. The more stock you have the bigger the ownership is. Using machine learning algorithms to predict a company’s stock price aims to forecast the future value of the company stock. Due to some factors or elements stock price is dynamic and volatile and predicting it is more challenging.

Table of Content

  • DataSet Used for Netflix Stock Price Prediction
  • Model Used for Netflix Stock Price Prediction
  • How to Predict Netflix Stock Price using Machine Learning in R
    • Step 1: Importing the required libraries
    • Step 2: Loading the Netfix Stock Price Dataset
    • Step 3: Checking the dimension and missing values of our data
    • Step 4: Taking the summary of the data
    • Step 5: Plotting the data
    • Step 6: Model building
    • Step 7: Model Fitting
  • Executing and Checking the Model Summary
    • Checking Accuracy of Netflix Stock Price Prediction Model
    • Performance Comparison on Netflix Stock Price Prediction Model on Training vs Test Data Set
  • Predict Netflix Stock Price
    • Calculate Test accuracy score

Similar Reads

DataSet Used for Netflix Stock Price Prediction

For this R Machine Learning Project, we have used the “2002-01-01” to “2022-12-31” Netflix stock price data. This data can be fetched from either of the below sources:...

Model Used for Netflix Stock Price Prediction

Here we will use only the Close price of the Netflix stock for prediction and we will use the ARIMA (p, d, q) model for the prediction....

How to Predict Netflix Stock Price using Machine Learning in R

Step 1: Importing the required libraries...

Executing and Checking the Model Summary

Now we will check the summary of the model....

Predict Netflix Stock Price

With the help of ARIMA() function for different value of (p, d, q) we are seeing the model accuracy and try to find best predicted values....