Deterministic vs stochastic trends

preview_player
Показать описание
This video explains the difference between stochastic and deterministic trends. A simulation is provided at the end of the video, demonstrating the graphical difference between these two types of stochastic process.

I also provide code below in Matlab/Octave for anyone wanting to run these simulations.

clear; close all; clc;



n=10000; % Number of time periods
b=1;
rho=1; %The parameter on the lagged value of x
alpha=0.05; % The slope parameter

% Initialise x and y
x=zeros(n,1);
x(1)=0;
y=zeros(n,1);
y(1)=0;
% Generate the x and y series
for i = 2:n
x(i)=alpha+rho*x(i-1)+b*randn();
y(i)=alpha*i+b*randn();
end

% Plot the x and y series
zoom=1.0;
FigHandle = figure('Position', [750, 300, 1049*zoom, 895*zoom]);
plot(x, 'LineWidth', 1.4)
hold on
Рекомендации по теме
Комментарии
Автор

Thanks a lot for the explanation. Here the the simulated R code if anyone needs it.

n=10000
b=1
rho=1
alpha=0.05


#Initialise x and y

x <- rep(0, n)
y <- rep(0, n)

for (i in 2:n)
{
x[i] = alpha+rho*x[i-1]+b*rnorm(1)
y[i]=alpha*i+b*rnorm(1)
}


# Plot the x and y series
plot(x, type="l", col="red")
lines(y, col="green")

abheeksinha
Автор

Is there a video which explains te concepts that lead to stochastic/deterministic models?I also don't understand the error parameter. Is this a constant value? If it's a variable, on what is it dependent? What does iid mean?

frankthetank
Автор

+Ben Lambert, when you do the variance of the r.w. with drift, you're assuming that Var(X_0)=0, i.e. that the series has an initial fixed value? Otherwise, with an infinite past it would just diverge. Am I right?

ivotavares
Автор

Just to be sure (I may have skipped some important part), the deterministic trend is still a stochastic process right?

MFpermance
Автор

homoskedastic and conditional and non-conditiional heteroskeastic nonstationarity means actually the stochastic trend? or am i wrong?

odiseeacarmen
Автор

Hello sir, good job, good luck
Please, I have a series it is DS (of model 3: with constant and trend) at the level, and TS at the first difference; are we going to the second difference or not?
Ie is this series integer of order 2 or 1?
Cordially

smsm
Автор

These videos are good, but very hard to hear. At maximum volume, this video is much quieter than most music videos. Can you increase the loudness?

StephenGillie
Автор

I can't read the Matlab code. Do you offer a download elsewhere?

littlerainyone
Автор

Thanks a lot, it help to clarify my confusion (:

dunwantoknow
Автор

I was with you for the first two think your brain is a different shape to mine.

tiggersmith