Exemplo n.º 1
0
# %%

title = title_prefix + " Difference Scatter Matrix"
plot = f"vecm_analysis_{example}_differencescatter_matrix"
vecm.scatter_matrix_plot(title, df_diff_1, plot)

# %%

results = vecm.cointgration_params_estimate(df, rank)
for result in results:
    print(result.summary())

# %%

vecm_result = vecm.vecm_estimate(df, 1, rank, report=True)

# %%

vecm.residual_adf_test(df, vecm_result.beta.T, report=True)

# %%

train = vecm.vecm_train(df, 1, rank, 10)

# %%

var = "x1"
title = title_prefix + r" $x_1$ Training"
plot = f"vecm_analysis_{example}_x1_training"
vecm.training_plot(title, train, var, [0.7, 0.2], plot)
Exemplo n.º 2
0
example = 1
rank = 1
maxlags = 1
title_prefix = f"Trivariate VECM: Rank={rank}, Maxlags={maxlags}, "

# %%

title = title_prefix
labels = [r"$x_1$", r"$x_2$", r"$x_3$"]
plot = f"vecm_prediction_{example}_samples"

vecm.comparison_plot(title, df, α.T, β, labels, [0.45, 0.075], plot)

# %%

vecm_result = vecm.vecm_estimate(df, maxlags, rank, report=True)

# %%

train = vecm.vecm_train(df, maxlags, rank, 10)

# %%

var = "x1"
title = title_prefix + r" $x_1$ Training"
plot = f"vecm_prediction_{example}_x1_training"
vecm.training_plot(title, train, var, [0.7, 0.2], plot)

# %%

var = "x2"