本文的主要目標是建構可提供超額報酬的彈性投資組合。我們基於機器學習技術和卡爾曼濾波演算法進行共整合配對交易策略,並且使用五種不同的門檻來生成交易訊號。根據獲得的實證結果,我們認為以公差極限作為門檻的策略是更保守的投資組合,而使用風險價值界限作為門檻的策略是更積極的投資組合。此外,我們在冠狀病毒COVID-19大流行期間獲得了更高的報酬率。;The main objective of this thesis is to build a resilience portfolio that provides excess returns. Based on machine learning technology and the Kalman filter algorithm, we conduct a cointegration pairs trading strategy that uses five different thresholds to generate trading signals. According to the empirical results obtained, we believe that the strategy using the tolerance limits as the threshold is a more conservative portfolio, while the strategy using the Value at Risk bounds as the threshold is a more aggressive portfolio. In addition, we obtaine a higher rate of return during the coronavirus COVID-19 pandemic.