forecast

LSTM to forecast numerical data by having categorical data as input

别来无恙 提交于 2021-02-11 12:50:53
问题 I have a similar DataFrame : df = pd.DataFrame([ {'date':'2021-01-15', 'value':145, 'label':'negative'}, {'date':'2021-01-16', 'value':144, 'label':'positive'}, {'date':'2021-01-17', 'value':147, 'label':'positive'}, {'date':'2021-01-18', 'value':146, 'label':'negative'}, {'date':'2021-01-19', 'value':155, 'label':'negative'}, {'date':'2021-01-20', 'value':157, 'label':'positive'}, {'date':'2021-01-21', 'value':158, 'label':'positive'}, {'date':'2021-01-22', 'value':157, 'label':'negative'},

When using aTSA and Forecast Packages together forecast() function and Arima() gives error

感情迁移 提交于 2021-01-29 18:57:20
问题 I have been trying to use aTSA and Forecast package together and noticed that the Arima() function works but the forecast() give error. Does anyone have a solution for this or encountered this? I am especially trying to use stationary.test() from aTSA and that was the main reason I called the library. error: Error in forecast(.) : 'object' should be 'Arima' or 'estimate' class estimated from arima() or estimate() As soon as I removed aTSA, the above worked. fitArima_CO <- Arima(train_CO,

R: How to show forecast and actual data in a single plot?

笑着哭i 提交于 2021-01-28 18:28:06
问题 I have some timeseries data for 2000-Q1 to 2010-Q4. I have used the data from 2000-Q1 to 2008-Q2 to forecast the next 10 quarters using HoltWinters CPI.HI.fit <- HoltWinters(CPI.HI.pre, gamma=FALSE) CPI.HI.cfr <- forecast(CPI.HI.fit, 10) Here're the data-- CPI.HI.pre (previous timeseries of the ts class) CPI.HI.pos (posterior timeseries of the ts class) CPI.HI.cfr (crisis forecast of the forecast class) > CPI.HI.pre # Qtr1 Qtr2 Qtr3 Qtr4 # 2000 83.12262 83.72945 84.10338 84.58881 # 2001 85

How to use ARIMA in GARCH model

让人想犯罪 __ 提交于 2021-01-01 10:04:40
问题 I have financial data and my goal is to be able to forecast. I ran an arima model and found that the best fit was arima(1,1,1) w/ drift. I want to use GARCH on the data set because it is the better model to use due to volatility and when I squared my residuals it did have the arch effect. But I know that GARCH takes in a 2 parameter arima and I am not sure how that translates from the 3 parameter arima I currently have. library(dplyr) library(tidyr) library(lubridate) library(ggplot2) library

How to use ARIMA in GARCH model

旧街凉风 提交于 2021-01-01 10:04:22
问题 I have financial data and my goal is to be able to forecast. I ran an arima model and found that the best fit was arima(1,1,1) w/ drift. I want to use GARCH on the data set because it is the better model to use due to volatility and when I squared my residuals it did have the arch effect. But I know that GARCH takes in a 2 parameter arima and I am not sure how that translates from the 3 parameter arima I currently have. library(dplyr) library(tidyr) library(lubridate) library(ggplot2) library

PineScript create a source with n Candles in future for forcasts in Tradingview

帅比萌擦擦* 提交于 2020-12-13 03:11:33
问题 in addition to my question in EMA for One Candle in Future I'm now trying to modify a source for some forecasts in Tradingview. In this modification I would like to modify the default series in that way, that I move every candle in the series N places into the past and overwrite the the places that were then vacated with the newest bar. See picture for better description I only need to do this on the current bar, as I want to plot the result with offset=n into the future. Current idea is

forecast::ets, auto.arima offset by one

房东的猫 提交于 2020-04-30 08:31:56
问题 I'm not sure if this is intended behaviour. Consider the following snippet of code - library(forecast) x <- c( 0, 0, 0, 0, 0.00217764964493354, 0.00339032724317772, 0.00357374918778428, 0.00282328811130057, 0.00272679331678393, 0.0030360769697858, 0.00316665914235777, 0.00163300219677676, 0.00249817841157489, 0.00207838479809976, 0.00192104504850639, 0.00209700948212983, 0.00216356555603635, 0.00250983016815862, 0.0017474879860201 ) tsData <- ts(data = x, start = 2000, frequency = 1) df <-

forecast::ets, auto.arima offset by one

扶醉桌前 提交于 2020-04-30 08:31:29
问题 I'm not sure if this is intended behaviour. Consider the following snippet of code - library(forecast) x <- c( 0, 0, 0, 0, 0.00217764964493354, 0.00339032724317772, 0.00357374918778428, 0.00282328811130057, 0.00272679331678393, 0.0030360769697858, 0.00316665914235777, 0.00163300219677676, 0.00249817841157489, 0.00207838479809976, 0.00192104504850639, 0.00209700948212983, 0.00216356555603635, 0.00250983016815862, 0.0017474879860201 ) tsData <- ts(data = x, start = 2000, frequency = 1) df <-

Extracting values and plot Box-plot from forecast objects

◇◆丶佛笑我妖孽 提交于 2020-04-18 06:11:59
问题 I made some forecast with forecast package with several models.Example of this models you can see below: # CODE library(fpp2) # required for the data library(dplyr) library(forecast) #HOLT WINTER fc <- hw(subset(hyndsight,end=length(hyndsight)-35), damped = TRUE, seasonal="multiplicative", h=35) autoplot(hyndsight) + autolayer(fc, series="HW multi damped", PI=FALSE)+ guides(colour=guide_legend(title="Daily forecasts")) #ETS ets_f <- forecast(subset(hyndsight,end=length(hyndsight)-35), , h=35)

Understanding Fourier for Seasonality

跟風遠走 提交于 2020-01-23 15:28:51
问题 I am using the auto.arima from the forecast package in R to determine the optimal K-terms for fourier series. After I do that, I want to then calculate the seasonality and plug that one seasonality variable into a multiple regression model. Using the dataset from the forecast package, I was able to extract the optimal amount of fourier terms: library(forecast) ##Public dataset from the forecast package head(gas) ##Choose Optimal Amount of K-Terms bestfit <- list(aicc=Inf) for(i in 1:6) { fit