Open Source Code
View the complete implementation code on GitHub. Provides production-level actual trading simulation code.
Production-level trading simulation using VECM-EGARCH hybrid model
Section 3 covers production-level strategies that apply a hybrid model combining VECM (Vector Error Correction Model) and EGARCH (Exponential GARCH) to actual trading. This project goes beyond simple backtesting to simulate real trading environments and implements confidence-based position sizing and dynamic reoptimization strategies.
VECM models the long-term equilibrium relationships and short-term dynamic adjustment processes among time series variables with cointegration relationships.
| Element | Description |
|---|---|
| α (Adjustment Coefficient) | Speed of adjustment toward equilibrium. If α < 0, it exhibits mean-reverting characteristics |
| β (Cointegration Vector) | Cointegration vector representing long-term equilibrium relationships |
| ECT (Error Correction Term) | β'Y_{t-1}: Equilibrium error from the previous period |
EGARCH is a volatility model that captures asymmetric volatility effects. It better models volatility increases during market downturns.
| Feature | Description |
|---|---|
| Leverage Effect | Negative returns have a greater impact on volatility than positive returns |
| log(σ²_t) | Log transformation automatically ensures positive variance constraint |
| Asymmetric Response | Models asymmetric response using γᵢ parameter |
Combines VECM's long-term equilibrium forecasting with EGARCH's volatility adjustment to perform more accurate price prediction:
Ŷ_{t+1} = VECM_forecast + EGARCH_mean_adjustment
Adjusts position size according to the prediction confidence of each trade. Higher confidence leads to larger positions, while lower confidence leads to a more conservative approach.
View the actual trading history and performance metrics of this strategy:
View the complete implementation code on GitHub. Provides production-level actual trading simulation code.
Learn the theoretical background and detailed implementation process step by step. Covers from mathematical background of VECM and EGARCH models to actual implementation.