Hello! :wave:
I have to test effectiveness of technical analysis indicators. Major problem is that I don't know how to correctly use output of arima.sim. I did sequantially: In order to conduct this study I created ARIMA model based on real data:
Next I need to generate data based on the coefficient of this model (created above):
arima.sim return values such as:
What should I do next? I used function diffinv to reverse differencing (closing price are non-stationary time series so I had to use differencing).
result:
But I still have negative(and small) values, So I did:
Please tell me, Is this a good way? In next step I need to use technical analysis on this simulated data to check how big is the profits thanks to using indicators.
I have to test effectiveness of technical analysis indicators. Major problem is that I don't know how to correctly use output of arima.sim. I did sequantially: In order to conduct this study I created ARIMA model based on real data:
Code:
data <-read.csv(file="enea.csv", header=TRUE, sep=";",dec=".")
dates = as.POSIXct(strptime(dane[,1], format="%Y-%m-%d"))
closnigPrice= xts(dane[,c(5)], order.by = dates)
model <- auto.arima(closingPrice, stepwise=FALSE,approx=FALSE)
model
Acf(model$residuals)
Code:
fit <- arima.sim(model=as.list(coef(model)), n=1249)
fit
Code:
[1] 0.847159832 -0.013145894 -0.693873961 -0.369817368 0.159847319 -1.205464018 0.726248204
[8] -1.053571191 1.119042946 1.002395435 -0.388118449 -0.438277787 0.550959984 1.257593875
[15] -0.781547747 -1.419707655 1.395393362 0.950545042 -0.382795625 -1.808498408 0.712247879
[22] -0.346448159 0.431701619 -0.111542058 -0.074330765 1.344385279 -1.448159915 0.361477760
Code:
fit <- diffinv(fit)
Code:
0.847159832 -0.013145894 -0.693873961 -0.369817368 0.159847319 -1.205464018 0.726248204
[8] -1.053571191 1.119042946 1.002395435 -0.388118449 -0.438277787 0.550959984 1.257593875
Code:
fit <- fit+100