Commit 657f91eb authored by jbracher's avatar jbracher
Browse files

Correct minor error.

parent 4e628e2d
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# source functions: # source functions:
source("code/functions.R") source("code/functions.R")
forecast_date <- as.Date("2021-11-03") forecast_date <- as.Date("2021-11-10")
wt <- gsub("-", "", as.character(forecast_date)) wt <- gsub("-", "", as.character(forecast_date))
# get all forecasts: # get all forecasts:
...@@ -39,7 +39,7 @@ for(i in seq_along(files)){ ...@@ -39,7 +39,7 @@ for(i in seq_along(files)){
library(quantmod) library(quantmod)
getSymbols('^GDAXI',src='yahoo', from = as.Date("2021-09-01")) getSymbols('^GDAXI',src='yahoo', from = as.Date("2021-09-01"))
dat_dax <- data.frame("date" = date(GDAXI), value = GDAXI$GDAXI.Close) dat_dax <- data.frame("date" = index(GDAXI), value = GDAXI$GDAXI.Close)
colnames(dat_dax) <- c("date", "value") colnames(dat_dax) <- c("date", "value")
dat_dax$date <- as.Date(dat_dax$date) dat_dax$date <- as.Date(dat_dax$date)
reference_value <- dat_dax$value[dat_dax$date == forecast_date] reference_value <- dat_dax$value[dat_dax$date == forecast_date]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment