簡易檢索 / 詳目顯示

研究生: 盧晉偉
Lu, Jin-Wei
論文名稱: 最小平方法、卡爾曼濾波器與其在配對交易上的應用—數學理論及數值模擬
Least Squares Method and Kalman Filter with Its Application to Pairs Trading — Mathematical Theory and Numerical Simulation
指導教授: 許瑞麟
Sheu, Ruey-Lin
學位類別: 碩士
Master
系所名稱: 理學院 - 數學系應用數學碩博士班
Department of Mathematics
論文出版年: 2024
畢業學年度: 112
語文別: 英文
論文頁數: 106
中文關鍵詞: 線性迴歸模型最小平方法加權最小平方法遞迴最小平方法資產定價模型單一指標模型卡爾曼濾波器配對交易
外文關鍵詞: Linear regression model, Least squares method, Weighted least squares method, Recursive least squares method, Capital asset pricing model, Single-index model, Kalman filter, Pairs trading
相關次數: 點閱:61下載:10
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本篇論文中,我們對 Elliott 的價差模型 (spread model) [14, 2005] 感到興趣。在金融上,如果有兩個歷史走勢相近的股票,這兩檔股票就得以配對 (pair) 去進行交易,而它們的價格差距稱為價差(spread)。當兩檔股票走勢改變時,做空價格高的那檔股票同時做多價格低的另一檔股票,等待價差回歸至預設價格時獲利,這便是配對交易策略 (pairs trading strategy)。Elliott 的價差模型運用卡爾曼濾波器(Kalman filter) [26, 1960] 來預估價差走勢。為了充分了解 Elliott 價差模型的數學基礎,我們詳細介紹最小平方法、權重最小平方法、遞迴最小平方法與卡爾曼濾波器等資料分析工具的數學理論,並寫下演算法提供本文數值模擬測試。本文同時介紹資產定價模型 (capital asset pricing model)[39, 1964]、單一指標模型 (single-indexmodel)[35, 1952] 等重要金融模型,並特別研究包括 Sharpe 指標[39, 1964]、beta 指標 [39, 1964] 等參數之數學原理。我們以 2012-2019 的百事可樂與可口可樂交易資料為例,以 Elliott 價差模型模擬這兩檔股票的價差行為,並以我們寫下的卡爾曼濾波器演算法在 R 語言上計算價差的預估價格,並分析卡爾曼濾波器的預估效果。由於Elliott 價差模型沒有說明兩檔股票要具有何種特性才能形成有效的配對交易,在本文中我們也替如何尋找配對標的給出初步想法,並提供數據測試結果,作為未來進一步研究之參考。

    In this thesis, we are interested in Elliott’s spread model [14, 2005]. In finance, if two stocks are roughly of the same historical trend, they can be paired to trade and the price difference is called the spread. When the trend of this pair happens to deviate, by longing the underperforming stock and shorting the outperforming one until the spread returns to the predetermined price, one can make a profit by such a pairs trading strategy. Elliott’s spread model uses the Kalman filter [26, 1960] to estimate the spread. In order to fully understand the mathematical basis of the Elliott spread model, we introduce the data analysis tools in detail, including the least squares method, the weighted least squares method, the recursive least squares method, and the Kalman filter. The Kalman filter algorithm is later implemented for numerical simulation purpose in this paper. In addition, we introduce two classical financial models, the capital asset pricing model (CAPM) [39, 1964] and the single-index model [35, 1952], especially the important financial parameters such as the Sharpe ratio [39, 1964] and the market beta [39, 1964] therein with their respective mathematical basis. We take the Pepsi and Coca-Cola trading data from 2012 to 2019 as an example. We incorporate Elliott spread model with the Kalman filter to simulate the spread and analyse the accuracy of Kalman estimation. Since the Elliott spread model did not explain how to pick a pair for effective trading, we propose some preliminary idea as to how to choose such a pair. We hope the initial numerical results serve the purpose for future researches in this direction.

    摘要 I Abstract II 誌謝 III Table of Contents IV List of Tables VI List of Figures VII 1 Introduction 1 2 Preliminary 13 2.1 Probability 13 3 Linear regression model 18 3.1 Least squares method 18 3.2 Weighted least squares method 28 3.3 Recursive least squares method 36 4 Discrete Kalman filter 43 4.1 State space model 43 4.2 Kalman filter algorithm 45 5 Capital asset pricing model and single-index model 51 5.1 Financial market assumptions 51 5.2 Return rate, risk and Sharpe ratio 52 5.3 Capital Asset Pricing Model 55 5.4 Single-index model 55 6 Mathematical model of spread 59 6.1 Two approaches to find the valid pair 59 6.1.1 Zero beta approach 60 6.1.2 Mean reversion approach 63 6.2 Spread model and its simulation 63 6.3 State space model for spread 71 6.4 Numerical Example: Pepsi and Coca-Cola 72 6.4.1 Finding weight w from the mean reversion approach 76 6.4.2 Finding weight w from the zero beta approach 84 7 Conclusion and Future Research 90 Bibliography 92

    V. Aidala and S. Hammel. Utilization of modified polar coordinates for bearings only tracking. IEEE Transactions on Automatic Control, 28(3):283–294, 1983. doi: 10.1109/TAC.1983.1103230.
    Yacine Ait-Sahalia. Testing continuous-time models of the spot interest rate. The Review of Financial Studies, 9(2):385–426, 1996. ISSN 08939454, 14657368. URL http://www.jstor.org/stable/2962210.
    Marco Avellaneda and Jeong-Hyun Lee. Statistical arbitrage in the us equi ties market. Quantitative Finance, 10:761 – 782, 2010. URL https://api.semanticscholar.org/CorpusID:219717064.
    R. Berg. Estimation and prediction for maneuvering target trajectories. IEEE Transactions on Automatic Control, 28(3):294–304, 1983. doi: 10.1109/TAC.1983.1103231.
    Tomas Björk. Arbitrage Theory in Continuous Time. Oxford University Press, 12 2019. ISBN 9780198851615. doi: 10.1093/oso/9780198851615.001.0001. URL https://doi.org/10.1093/oso/9780198851615.001.0001.
    Fischer Black and Myron Scholes. The pricing of options and corporate liabilities. Journal of Political Economy, 81(3):637–654, 1973. ISSN 00223808, 1537534X. URL http://www.jstor.org/stable/1831029.
    Tim Bollerslev, Ray Y. Chou, and Kenneth F. Kroner. Arch modeling in finance: A review of the theory and empirical evidence. Journal of Econometrics, 52(1):5–59, 1992. ISSN 0304-4076. doi: https://doi.org/10.1016/0304-4076(92)90064-X. URL https://www.sciencedirect.com/science/article/pii/030440769290064X.
    Ilse Botha, Yolanda Stander, and Daniel Marais. Trading strategies with copulas. Journal of Economic and Financial Sciences, 6:103–126, 04 2013. doi: 10.4102/jef.v6i1.278.
    João Frois Caldeira and Guilherme V. Moura. Selection of a portfolio of pairs based on cointegration: A statistical arbitrage strategy. Advanced Risk & Portfolio Man agement® Research Paper Series, 2013. URL https://api.semanticscholar.org/CorpusID:56362325.
    J. Campbell, S. Synnott, and G. Bierman. Voyager orbit determination at jupiter. IEEE Transactions on Automatic Control, 28(3):256–268, 1983. doi: 10.1109/TAC.1983.1103223.
    F. Daum and R. Fitzgerald. Decoupled kalman filters for phased array radar tracking. IEEE Transactions on Automatic Control, 28(3):269–283, 1983. doi: 10.1109/TAC.1983.1103242.
    Akash Deep, Monika Mittal, and Vikas Mittal. Application of kalman filter in gps position estimation. In 2018 IEEE 8th Power India International Conference (PIICON), pages 1–5, 2018. doi: 10.1109/POWERI.2018.8704368.
    A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Soci ety: Series B (Methodological), 39(1):1–22, 1977. doi: https://doi.org/10.1111/j.2517-6161.1977.tb01600.x. URL https://rss.onlinelibrary.wiley.com/doi/abs/10.1111/j.2517-6161.1977.tb01600.x.
    Robert J. Elliott, John Van Der Hoek *, and William P. Malcolm. Pairs trading. Quantitative Finance, 2005.
    Edwin J. Elton and Martin J. Gruber. Risk reduction and portfolio size: An analytical solution. The Journal of Business, 50(4):415–437, 1977. ISSN 00219398, 15375374. URL http://www.jstor.org/stable/2352173.
    Robert W. Faff and Kais Hamza. A new approach to modeling and estimation for pairs trading. 2006. URL https://api.semanticscholar.org/CorpusID:210874882.
    MASAAKI FUKASAWA, HITOMI MAEDA, and JUN SEKINE. On optimal thresholds for pairs trading in a one-dimensional diffusion model. The ANZIAM Journal, 63(2):104–122, 2021. doi: 10.1017/S1446181121000298.
    Evan Gatev, William N. Goetzmann, and K. Geert Rouwenhorst. Pairs Trading: Performance of a Relative-Value Arbitrage Rule. The Review of Financial Studies, 19(3):797–827, 02 2006. ISSN 0893-9454. doi: 10.1093/rfs/hhj020. URL https://doi.org/10.1093/rfs/hhj020.
    Oddmund Groette. Pairs trading strategy –backtest and statistics, 2024. URL https://www.quantifiedstrategies.com/pair-trading-strategy/.
    L. Hostetler and R. Andreas. Nonlinear kalman filtering techniques for terrain aided navigation. IEEE Transactions on Automatic Control, 28(3):315–323, 1983. doi: 10.1109/TAC.1983.1103232.
    Nicolas Huck. Pairs selection and outranking: An application to the s&p 100 index. European Journal of Operational Research, 196(2):819–825, 2009. ISSN 0377-2217. doi: https://doi.org/10.1016/j.ejor.2008.03.025. URL https://www.sciencedirect.com/science/article/pii/S0377221708003160.
    Nicolas Huck. Pairs trading and outranking: The multi-step-ahead forecasting case. European Journal of Operational Research, 207(3):1702–1716, 2010. ISSN 0377-2217. doi: https://doi.org/10.1016/j.ejor.2010.06.043. URL https://www.sciencedirect.com/science/article/pii/S0377221710004820.
    M. Ibragimov, R. Ibragimov, and J. Walden. Heavy-Tailed Distributions and Ro bustness in Economics and Finance. Lecture Notes in Statistics. Springer Inter national Publishing, 2015. ISBN 9783319168777. URL https://books.google.com.tw/books?id=kG6nCQAAQBAJ.
    YuCheng Lin Jing Luo and Sijia Wang. Intraday high-frequency pairs trading strategies for energy futures: evidence from china. Applied Economics, 55(56): 6646–6660, 2023. doi: 10.1080/00036846.2022.2161993. URL https://doi.org/10.1080/00036846.2022.2161993.
    Jakub W. Jurek and Halla Yang. Dynamic portfolio selection in arbitrage. Capital Markets: Asset Pricing & Valuation, 2007. URL https://api.semanticscholar.org/CorpusID:153856473.
    Rudolph Emil Kalman. A new approach to linear filtering and prediction problems. Journal of basic Engineering, 82(1):35–45, 1960.
    Min Kao and D. Eller. Multiconfiguration kalman filter design for high performance gps navigation. IEEE Transactions on Automatic Control, 28(3): 304–314, 1983. doi: 10.1109/TAC.1983.1103224.
    Lev B Klebanov and Irina V Volchenkova. Heavy tailed distributions in finance: Reality or myth? amateurs viewpoint, 2015. URL https://arxiv.org/abs/1507.07735. Christopher Krauss. Statistical arbitrage pairs trading strategies: Review and out look. Journal of Economic Surveys, 31(2):513–545, 2017. doi: https://doi.org/10.1111/joes.12153. URL https://onlinelibrary.wiley.com/doi/abs/10.1111/joes.12153.
    Tim Leung and Xin Li. Optimal Mean Reversion Trading. WORLD SCIENTIFIC, 2016. doi: 10.1142/9839. URL https://worldscientific.com/doi/abs/10.1142/9839.
    Lucas Liew. Pairs trading – a real-world guide, 2021. URL https://algotrading101.com/learn/pairs-trading-guide/.
    Rong Qi Liew and Yuan Wu. Pairs trading: A copula approach. Journal of Deriva tives & Hedge Funds, 19:12–30, 2013. URL https://api.semanticscholar.org/CorpusID:73592157.
    Jun Liu and Allan Timmermann. Optimal Convergence Trade Strategies. The Review of Financial Studies, 26(4):1048–1086, 01 2013. ISSN 0893-9454. doi: 10.1093/rfs/hhs130. URL https://doi.org/10.1093/rfs/hhs130.
    Benoît Mandelbrot. The variation of certain speculative prices. The Journal of Business, 36, 1963. URL https://EconPapers.repec.org/RePEc:ucp:jnlbus:v:36:y:1963:p:394.
    Harry Markowitz. Portfolio selection. The Journal of Finance, 7(1):77–91, 1952. ISSN 00221082, 15406261. URL http://www.jstor.org/stable/2975974.
    G. Mealy and Wang Tang. Application of multiple model estimation to a recursive terrain height correlation system. IEEE Transactions on Automatic Control, 28(3):323–331, 1983. doi: 10.1109/TAC.1983.1103233.
    Jose Scheinkman and Blake Lebaron. Nonlinear dynamics and stock returns. The Journal of Business, 62(3):311–37, 1989. URL https://EconPapers.repec.org/RePEc:ucp:jnlbus:v:62:y:1989:i:3:p:311-37.
    William F. Sharpe. A simplified model for portfolio analysis. Management Science, 9(2):277–293, 1963. ISSN 00251909, 15265501. URL http://www.jstor.org/stable/2627407.
    William F. Sharpe. Capital asset prices: A theory of market equilibrium under conditions of risk*. The Journal of Finance, 19(3):425–442, 1964. doi: https://doi.org/10.1111/j.1540-6261.1964.tb02865.x. URL https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1540-6261.1964.tb02865.x.
    H.W. Sorenson. Kalman Filtering: Theory and Application. IEEE Press selected reprint series. IEEE Press, 1985. ISBN 9780879421915. URL https://books.google.com.tw/books?id=2pgeAQAAIAAJ.
    Street Authority. 2 stocks for the ultimate pairs trade, 2014. URL https://www.nasdaq.com/articles/2-stocks-ultimate-pairs-trade-2014-04-02.
    G. E. Uhlenbeck and L. S. Ornstein. On the theory of the brownian motion. Phys. Rev., 36:823–841, Sep 1930. doi: 10.1103/PhysRev.36.823. URL https://link.aps.org/doi/10.1103/PhysRev.36.823.
    G. Vidyamurthy. Pairs Trading: Quantitative Methods and Analysis. Wiley Fi nance. Wiley, 2004. ISBN 9780471684572. URL https://books.google.com.tw/books?id=yK2mvtpcumcC.
    Guang Zhang. Pairs trading with nonlinear and non-gaussian state space models, 2020. URL https://arxiv.org/abs/2005.09794.

    下載圖示 校內:立即公開
    校外:立即公開
    QR CODE