diff --git a/matlab/swz/identification/exclusions.m b/matlab/swz/identification/exclusions.m
new file mode 100644
index 0000000000000000000000000000000000000000..a184e5a4ff5b1462c5e18e938fac650846752046
--- /dev/null
+++ b/matlab/swz/identification/exclusions.m
@@ -0,0 +1,22 @@
+function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)
+
+indxC0Pres = options_ms.cross_restrictions;
+nlags = options_ms.nlags;
+
+Qi = options_ms.Qi;
+Ri1 = options_ms.Ri;
+
+k = nlags*nvar+1;
+
+Ri = zeros(k,k,nvar);
+sR = size(Ri1);
+Ri(1:sR(1),1:sR(2),1:sR(3)) = Ri1;
+
+for n=1:nvar
+ Ui{n} = null(Qi(:,:,n));
+ Vi{n} = null(Ri(:,:,n));
+ n0(n) = size(Ui{n},2);
+ np(n) = size(Vi{n},2);
+end
+
+ixmC0Pres = NaN;
\ No newline at end of file
diff --git a/tests/swz/test_exclusions.mod b/tests/swz/test_exclusions.mod
new file mode 100644
index 0000000000000000000000000000000000000000..f876c420a1b873c4ae9b8b8ddf15adfebd559fab
--- /dev/null
+++ b/tests/swz/test_exclusions.mod
@@ -0,0 +1,20 @@
+// same as test_lower_cholesky.mod, but using exclusion syntax
+addpath '../../matlab/swz';
+var R Pie Y;
+
+model;
+Y = 0;
+Pie = 0;
+R = 0;
+end;
+
+varobs Y Pie R;
+
+svar_identification;
+exclusion lag 0;
+equation 1, Pie, Y;
+equation 2, Y;
+end;
+
+sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4);
+
diff --git a/tests/swz/test_lower_cholesky.mod b/tests/swz/test_lower_cholesky.mod
new file mode 100644
index 0000000000000000000000000000000000000000..e16f109e3e86f70937aca1ac116e83f6537968f4
--- /dev/null
+++ b/tests/swz/test_lower_cholesky.mod
@@ -0,0 +1,15 @@
+// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
+addpath '../../matlab/swz';
+var R Pie Y;
+
+model;
+Y = 0;
+Pie = 0;
+R = 0;
+end;
+
+varobs Y Pie R;
+
+
+sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4,restriction_fname=lower_cholesky);
+
diff --git a/tests/swz/test_lower_cholesky_a.mod b/tests/swz/test_lower_cholesky_a.mod
new file mode 100644
index 0000000000000000000000000000000000000000..6ee9b7afade53a8cc73e26b293316848e0e71896
--- /dev/null
+++ b/tests/swz/test_lower_cholesky_a.mod
@@ -0,0 +1,18 @@
+// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
+addpath '../../matlab/swz';
+var R Pie Y;
+
+model;
+Y = 0;
+Pie = 0;
+R = 0;
+end;
+
+varobs Y Pie R;
+
+svar_identification;
+lower_cholesky;
+end;
+
+sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4);
+
diff --git a/tests/swz/test_ms.mod b/tests/swz/test_ms.mod
new file mode 100644
index 0000000000000000000000000000000000000000..e16f109e3e86f70937aca1ac116e83f6537968f4
--- /dev/null
+++ b/tests/swz/test_ms.mod
@@ -0,0 +1,15 @@
+// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
+addpath '../../matlab/swz';
+var R Pie Y;
+
+model;
+Y = 0;
+Pie = 0;
+R = 0;
+end;
+
+varobs Y Pie R;
+
+
+sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4,restriction_fname=lower_cholesky);
+
diff --git a/tests/swz/test_ms_variances.mod b/tests/swz/test_ms_variances.mod
new file mode 100644
index 0000000000000000000000000000000000000000..dbc6a5fbd418ff93e63d71c62681ea96e533a576
--- /dev/null
+++ b/tests/swz/test_ms_variances.mod
@@ -0,0 +1,22 @@
+// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
+addpath '../../matlab/swz';
+var R Pie Y;
+
+model;
+Y = 0;
+Pie = 0;
+R = 0;
+end;
+
+varobs Y Pie R;
+
+svar_identification;
+lower_cholesky;
+end;
+
+markov_switching(chain=1,number_of_states=2,duration=2.5);
+
+svar(variances, chain=1);
+
+ms_sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4,draws_nbr_modified_harmonic_mean=10000);
+