Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-bowles authored Jan 21, 2022
1 parent 7b857a3 commit f760e8f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
Binary file added Bryce_Bowles-My_Forecast_Report.pdf
Binary file not shown.
56 changes: 56 additions & 0 deletions Bryce_Bowles_My_Forecast.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
library(readr)
library(ggplot2)
library(forecast)
library(fpp2)
library(TTR)
library(dplyr)

#month_year - have to make sure youve got a csv with dates column in 01/01/2020 format (month_year)
#core_deposits

#read in data provided (training data)
TSFC <- read_csv("Core_Deposits.csv")
glimpse(TSFC)
dates <- as.Date(TSFC$month_year,
format= "%m/%d/%Y")

#read in the hold out data (validation data)
#"Core_Deposits_Validate.csv" contains just the holdout data
TSFCV <- read_csv("Core_Deposits_Validate.csv")
glimpse(TSFCV)
dates <- as.Date(TSFCV$month_year,
format= "%m/%d/%Y")

#convert them to time series formats
training__data <- ts(TSFC$core_deposits, frequency=12, start=c(1988,11), end=c(1992,09))
validation__data <- ts(TSFCV$core_deposits, frequency=12, start=c(1992,09), end=c(1993,08))
all__data <- ts(TSFC$core_deposits, frequency=12, start=c(1992,09)) #no end because all data is in "Core_Deposits.csv" including hold out

#to view the data
plot.ts(training__data)
plot.ts(validation__data)
plot.ts(all__data)

#taking the LN
log_training_data <- log(training__data)
plot.ts(log_training_data)

#Naive model
naive_mod <- naive(training__data, h = 12)
summary(naive_mod)
plot(naive_mod)

#Simple Exponential Smoothing
se_model <- ses(training__data, h = 12)
summary(se_model)
plot(se_model)

#Holts ES
holt_model <- holt(training__data, h = 12)
summary(holt_model)
plot(holt_model)
print(holt_model)

#ARIMA
arima_model <- auto.arima(training__data)
summary(arima_model)
Binary file added Bryce_Bowles_My_Forecast_Project.xlsx
Binary file not shown.
Binary file added Core_Deposits.txt
Binary file not shown.

0 comments on commit f760e8f

Please sign in to comment.