Skip to Content
RStudio for R Statistical Computing Cookbook
book

RStudio for R Statistical Computing Cookbook

by Andrea Cirillo
April 2016
Beginner to intermediate content levelBeginner to intermediate
246 pages
5h 20m
English
Packt Publishing
Content preview from RStudio for R Statistical Computing Cookbook

Forecasting the stock market

In this recipe, we will develop a step-by-step 2-year forecast of the Fiat-Chrysler Automotive stock price.

This task will be accomplished by applying the Arima modeling technique to FCA stock time series.

Arima (Autoregressive integrated moving average) models basically involve the estimation of an autoregressive model and a moving average, employed to estimate both the stochastic part and the underlying trend.

Getting ready

This recipe is mainly based on the tseries package and forecast package, the first for Arima model fitting and the second for prediction of future values. We will also need the quantmod package in order to download stock data from Yahoo Finance.

We therefore need to install and load these three packages: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Data Analysis Using Jupyter Notebook

Practical Data Analysis Using Jupyter Notebook

Marc Wintjen

Publisher Resources

ISBN: 9781784391034Supplemental Content