本研究旨在建立一套回測系統來驗證順勢交易策略的有效性,採用以美元為底的外匯期貨作為標的,樣本回測期間為西元1998年至2018年。運用程式建立一個回測系統,分別使用移動平均策略與價格突破策略交易在串接後的連續期貨資料上,透過結果分析其績效。首先經由參數最佳化的方式,挑選最適合期貨的參數組合,接著因應一般投資人的交易心態,透過資金管理的概念操作兩種不同的增減口數的方式,一種為每日衡量可交易之口數,另一種則為在每次交易訊號產生時計算其交易口數,兩種皆透過該契約價值下所需之金額,並經由所設定的槓桿倍數或是策略最大虧損倍數來做口數的增減,最終分析不同槓桿下的策略績效,以挑選最適合該其外匯期貨的順勢交易策略。;This research establishes a back-testing system to verify the effectiveness of trend-following strategy. We take currency futures based on US dollar as the commodity. The back-testing data is collected from May 1998 to September 2018. The back-testing system built by programming uses moving average (MA) strategy and price breakout strategy to trade from connected data of futures and analyze the performance. First of all, we pick the most suitable parameter of two strategies by optimization. For closing to investor’s trade conscious, we make two kinds of ways for trading units from fund management. One considers trading units every day. The other one calculates trading units as appearance of signal. Both of them calculates the contract value to decide the trading units which correspond to the leverage or the maximum drawdown. At last, this research picks the most suitable trend-following trade strategy for currency futures through analyzing the performance of strategies in different leverage.