Revenue prediction for Apple 2018

#Revenue-prediction-for-Apple-2018

In 2018 Apple recorded a record 265.5 billion in revenue.

Below is my attempt to predict this figure based on past data including quarterly data collected from Apple's accounts and World Customer Confidence Index.

Results

#Results

SAMRIMA - Best forecast using heuristics e.g. ACF,PACF, heteroskedicity - error terms Dickey Fuller- stationarity

I used heuristics rather than a train/test as the data was limited

Forecast using Sarima: 267 billion

#Forecast-using-Sarima:-267-billion

A little high as expected using just past data with such an upward trend but very close to the actual. Apple had no surprises in 2018. 2019 looks different!

VARMAX

#VARMAX

Modelling with multivariate time series. I need to collect more data and clean. I would like to run sentiment analysis series alongside

To be continued.

Further models

#Further-models

LSTM - long short term memory neural networks in KERAS SpaCy for some NLP and sentiment analysis. Especially to follow Apple in 2019

It would be good to have alot more data for this neural network. I have not used it before and would like to explore it for time series.

Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...

Apple Quarterly revenue data

#Apple-Quarterly-revenue-data
Loading output library...
Loading output library...
Loading output library...
Loading output library...

Eyeballing our series

#Eyeballing-our-series
  • It does not look stationary. Mean, variance and covariance -requirent for SARIMA model forecasts to make sense.
  • It is seasonal
  • Apple has has an insane revenue rise in only 12 years (2005-2017. From 5 billion annually to 250 billion . The early results may not be useful in our future predictions. I will just take from 2010.
Loading output library...
Loading output library...
Loading output library...
Loading output library...

Let's look at the stationarity using PACF , ACF and Dickey Fuller test

#Let's-look-at-the-stationarity-using-PACF-,-ACF-and-Dickey-Fuller-test
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...

Choosing model parameters

#Choosing-model-parameters

Below are some functions I found to test for normality, serial correlation, heteroelasticity Model grid search

Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...

Obtain fitted values with one-step ahead forecasts, in-sample forecasts and out-of sample forecasts.

#Obtain-fitted-values-with-one-step-ahead-forecasts,-in-sample-forecasts-and-out-of-sample-forecasts.
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...

Sarima worked well for predicting Apple's revenue 2018

#Sarima-worked-well-for-predicting-Apple's-revenue-2018

APPROXIMATLEY for 2018 Quarters from graph 57+51+59 +100 = 267 billion

Is Apple's trend on the turn for 2019?

VARMAX

#VARMAX

It would be good to have a go at a multivariate time series.

Data such as: Consumer Confidence - China Revenue forecasts for major suppliers like foxcom Revenue forecasts from sellars like AT&T - iphone 60% of revenue Consensus forecasts of analysts

let's include consumer confidence data

#let's-include-consumer-confidence-data
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...

To be countinued when data cleaned

#To-be-countinued-when-data-cleaned
Loading output library...
Loading output library...
Loading output library...
Loading output library...
Loading output library...

LSTM with Keras and NLP topic and sentiment

#LSTM-with-Keras-and-NLP-topic-and-sentiment