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)

# %%

var = "x2"
title = title_prefix + r" $x_2$ Training"
plot = f"vecm_analysis_{example}_x2_training"
vecm.training_plot(title, train, var, [0.7, 0.2], plot)
Example #2
0
# %%

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"
title = title_prefix + r" $x_2$ Training"
plot = f"vecm_prediction_{example}_x2_training"
vecm.training_plot(title, train, var, [0.7, 0.2], plot)