I need custom simulated stationary and non-stationary(trending) time series data for one of my python projects. I searched all the web for it but didn't find anything for python. Then I came across this post Is a model with a sine wave time-series stationary? where a stationary series is explained as
yt=yt−1+ϵ
where μ(ϵ)=0
in the comment section. I coded a sample code for generating stationary series
import matplotlib.pyplot as plt
import numpy as np
n=100
x=np.arange(n)
y_=np.random.uniform(-1,1,[n])
mu=0
sigma=0.01
e= np.random.normal(mu, sigma, n)
#stationary series
y=y_+e
plt.plot(x,y)
plt.show()
the output looks like a stationary time series but I am not sure of it.
But the most difficult part is finding a way to generate non-stationary(ie. trending) time series data. I can't find anything releated to it. How can we generate stationary and non-stationary time series data in python?