Skip to main content
edited tags
Link
Ferdi
  • 5.3k
  • 10
  • 47
  • 64
Source Link
Alex
  • 2.1k
  • 16
  • 32

How to add a positive trend to simulated ARIMA

I would like to add a positive trend to the following simulated ARIMA variable

price <- arima.sim(n = n, list(ar = c(0.8897, -0.4858), ma = c(0.279, 0.2488)), sd = sqrt(0.001))

In one attempt I tried to change the sign of the second term in ar, but I got the error that this made the series non-stationary. Wether it is stationary or not does not bother me, I just wanted a positive trend.