From c05eae81f9aaa0a764203446ec54d7dd7cbeb66f Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 9 Apr 2024 00:15:21 +0200 Subject: Update notebooks --- notebooks/check-pdf.ipynb | 402 ---------------------------------------------- notebooks/testing.ipynb | 51 ------ 2 files changed, 453 deletions(-) delete mode 100644 notebooks/check-pdf.ipynb diff --git a/notebooks/check-pdf.ipynb b/notebooks/check-pdf.ipynb deleted file mode 100644 index a98f8c1..0000000 --- a/notebooks/check-pdf.ipynb +++ /dev/null @@ -1,402 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "fad5b45a-158a-4484-a34e-453f1b3316cc", - "metadata": {}, - "outputs": [], - "source": [ - "from pathlib import Path\n", - "from dotenv import load_dotenv\n", - "load_dotenv()\n", - "from importlib.util import find_spec\n", - "if find_spec(\"rag\") is None:\n", - " import sys\n", - " sys.path.append('..')\n", - "from rag.parser.pdf import PDFParser" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "6762495a-fc4e-4022-963e-e302e095b0cf", - "metadata": {}, - "outputs": [], - "source": [ - "p = PDFParser()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "1eeef01f-497b-4069-8cde-fa018e99ce52", - "metadata": {}, - "outputs": [], - "source": [ - "path = Path(\"/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf\")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "9ac72c90-fea7-4f96-a648-691a01e5b38b", - "metadata": {}, - "outputs": [], - "source": [ - "d = p.from_data(p.from_path(path))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "24d3edd0-8430-4f54-b03a-4dcce67d2cff", - "metadata": {}, - "outputs": [], - "source": [ - "d[1]\n", - "b = p.from_path(path)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "0a2c5f13-17f9-4674-b524-4bba7e05754a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "langchain_core.document_loaders.blob_loaders.Blob" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "type(b)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8496ab61-dfa8-45be-bea0-4a31fc5476da", - "metadata": {}, - "outputs": [], - "source": [ - "Path(d[1].metadata[\"source\"]).name" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "00df538f-2d15-47c8-87dd-639582c41cbb", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[Document(page_content='A Signal Processing\\nPerspective on Financial\\nEngineering\\nYiyong Feng\\nDept. of Electronic and Computer Engineering\\nThe Hong Kong University of Science and Technology\\nClear Water Bay, Kowloon\\nHong Kong\\nyiyong@connect.ust.hk\\nDaniel P. Palomar\\nDept. of Electronic and Computer Engineering\\nThe Hong Kong University of Science and Technology\\nClear Water Bay, Kowloon\\nHong Kong\\npalomar@ust.hk\\nBoston — Delft', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 0}),\n", - " Document(page_content='Foundations and TrendsR⃝in Signal Processing\\nPublished, sold and distributed by:\\nnow Publishers Inc.\\nPO Box 1024\\nHanover, MA 02339\\nUnited States\\nTel. +1-781-985-4510\\nwww.nowpublishers.com\\nsales@nowpublishers.com\\nOutside North America:\\nnow Publishers Inc.\\nPO Box 179\\n2600 AD Delft\\nThe Netherlands\\nTel. +31-6-51115274\\nThe preferred citation for this publication is\\nY. Feng and D. P. Palomar. A Signal Processing Perspective on Financial\\nEngineering . Foundations and TrendsR⃝in Signal Processing, vol. 9, no. 1-2,\\npp. 1–231, 2015.\\nThis Foundations and TrendsR⃝issue was typeset in LATEX using a class file designed\\nby Neal Parikh. Printed on acid-free paper.\\nISBN: 978-1-68083-119-1\\nc⃝2016 Y. Feng and D. P. Palomar\\nAll rights reserved. No part of this publication may be reproduced, stored in a retrieval\\nsystem, or transmitted in any form or by any means, mechanical, photocopying, recording\\nor otherwise, without prior written permission of the publishers.\\nPhotocopying. In the USA: This journal is registered at the Copyright Clearance Cen-\\nter, Inc., 222 Rosewood Drive, Danvers, MA 01923. Authorization to photocopy items for\\ninternal or personal use, or the internal or personal use of specific clients, is granted by\\nnow Publishers Inc for users registered with the Copyright Clearance Center (CCC). The\\n‘services’ for users can be found on the internet at: www.copyright.com\\nFor those organizations that have been granted a photocopy license, a separate system\\nof payment has been arranged. Authorization does not extend to other kinds of copy-\\ning, such as that for general distribution, for advertising or promotional purposes, for\\ncreating new collective works, or for resale. In the rest of the world: Permission to pho-\\ntocopy must be obtained from the copyright owner. Please apply to now Publishers Inc.,\\nPO Box 1024, Hanover, MA 02339, USA; Tel. +1 781 871 0245; www.nowpublishers.com;\\nsales@nowpublishers.com\\nnow Publishers Inc. has an exclusive license to publish this material worldwide. Permission\\nto use this content must be obtained from the copyright license holder. Please apply to\\nnow Publishers, PO Box 179, 2600 AD Delft, The Netherlands, www.nowpublishers.com;\\ne-mail: sales@nowpublishers.com', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 1}),\n", - " Document(page_content='Foundations and TrendsR⃝in Signal Processing\\nVolume 9, Issue 1-2, 2015\\nEditorial Board\\nEditor-in-Chief\\nYonina Eldar\\nTechnion - Israel Institute of Technology\\nIsrael\\nEditors\\nRobert M. Gray\\nFounding Editor-in-Chief\\nStanford University\\nPao-Chi Chang\\nNCU, Taiwan\\nPamela Cosman\\nUC San Diego\\nMichelle Effros\\nCaltech\\nYariv Ephraim\\nGMU\\nAlfonso Farina\\nSelex ES\\nSadaoki Furui\\nTokyo Tech\\nGeorgios Giannakis\\nUniversity of Minnesota\\nVivek Goyal\\nBoston University\\nSinan Gunturk\\nCourant Institute\\nChristine Guillemot\\nINRIA\\nRobert W. Heath, Jr.\\nUT AustinSheila Hemami\\nNortheastern University\\nLina Karam\\nArizona State U\\nNick Kingsbury\\nUniversity of Cambridge\\nAlex Kot\\nNTU, Singapore\\nJelena Kovacevic\\nCMU\\nGeert Leus\\nTU Delft\\nJia Li\\nPenn State\\nHenrique Malvar\\nMicrosoft Research\\nB.S. Manjunath\\nUC Santa Barbara\\nUrbashi Mitra\\nUSC\\nBjörn Ottersten\\nKTH Stockholm\\nVincent Poor\\nPrinceton UniversityAnna Scaglione\\nUC Davis\\nMihaela van der Shaar\\nUCLA\\nNicholas D. Sidiropoulos\\nTU Crete\\nMichael Unser\\nEPFL\\nP. P. Vaidyanathan\\nCaltech\\nAmi Wiesel\\nHebrew U\\nMin Wu\\nUniversity of Maryland\\nJosiane Zerubia\\nINRIA', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 2}),\n", - " Document(page_content='Editorial Scope\\nTopics\\nFoundations and TrendsR⃝in Signal Processing publishes survey and\\ntutorial articles in the following topics:\\n•Adaptive signal processing\\n•Audio signal processing\\n•Biological and biomedical signal\\nprocessing\\n•Complexity in signal processing\\n•Digital signal processing\\n•Distributed and network signal\\nprocessing\\n•Image and video processing\\n•Linear and nonlinear filtering\\n•Multidimensional signal\\nprocessing\\n•Multimodal signal processing\\n•Multirate signal processing\\n•Multiresolution signal processing\\n•Nonlinear signal processing\\n•Randomized algorithms in signal\\nprocessing\\n•Sensor and multiple source signal\\nprocessing, source separation•Signal decompositions, subband\\nand transform methods, sparse\\nrepresentations\\n•Signal processing for\\ncommunications\\n•Signal processing for security and\\nforensic analysis, biometric signal\\nprocessing\\n•Signal quantization, sampling,\\nanalog-to-digital conversion,\\ncoding and compression\\n•Signal reconstruction,\\ndigital-to-analog conversion,\\nenhancement, decoding and\\ninverse problems\\n•Speech/audio/image/video\\ncompression\\n•Speech and spoken language\\nprocessing\\n•Statistical/machine learning\\n•Statistical signal processing\\nInformation for Librarians\\nFoundationsandTrendsR⃝inSignalProcessing,2015,Volume9,4issues.ISSN\\npaper version 1932-8346. ISSN online version 1932-8354. Also available as a\\ncombined paper and online subscription.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 3}),\n", - " Document(page_content='Foundations and TrendsR⃝in Signal Processing\\nVol. 9, No. 1-2 (2015) 1–231\\nc⃝2016 Y. Feng and D. P. Palomar\\nDOI: 10.1561/2000000072\\nA Signal Processing Perspective on Financial\\nEngineering\\nYiyong Feng\\nDept. of Electronic and Computer Engineering\\nThe Hong Kong University of Science and Technology\\nClear Water Bay, Kowloon\\nHong Kong\\nyiyong@connect.ust.hk\\nDaniel P. Palomar\\nDept. of Electronic and Computer Engineering\\nThe Hong Kong University of Science and Technology\\nClear Water Bay, Kowloon\\nHong Kong\\npalomar@ust.hk', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 4}),\n", - " Document(page_content='Contents\\n1 Introduction 2\\n1.1 A Signal Processing Perspective on Financial Engineering . 5\\n1.2 Connections between Fin. Eng. and Signal Process. . . . . 9\\n1.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12\\nI Financial Modeling & Order Execution 16\\n2 Modeling of Financial Time Series 17\\n2.1 Asset Returns . . . . . . . . . . . . . . . . . . . . . . . . 18\\n2.2 General Structure of a Model . . . . . . . . . . . . . . . . 21\\n2.3 I.I.D. Model . . . . . . . . . . . . . . . . . . . . . . . . . 22\\n2.4 Factor Model . . . . . . . . . . . . . . . . . . . . . . . . 23\\n2.5 VARMA Model . . . . . . . . . . . . . . . . . . . . . . . 27\\n2.6 VECM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31\\n2.7 Conditional Volatility Models . . . . . . . . . . . . . . . . 34\\n2.8 Summary of Different Models and Their Limitations . . . . 42\\n3 Modeling Fitting: Mean and Covariance Matrix Estimators 47\\n3.1 Fitting Process, Types of Estimators, and Main Focus . . . 47\\n3.2 Warm Up: Large Sample Regime . . . . . . . . . . . . . . 50\\n3.3 Small Sample Regime: Shrinkage Estimators . . . . . . . . 59\\nii', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 5}),\n", - " Document(page_content='iii\\n3.4 Heavy Tail Issue: Robust Estimators . . . . . . . . . . . . 70\\n3.5 Small Sample Regime & Heavy Tail Issue . . . . . . . . . 74\\n3.6 Summary of Different Estimators . . . . . . . . . . . . . . 83\\n4 Order Execution 85\\n4.1 Limit Order Book and Market Impact . . . . . . . . . . . 85\\n4.2 Price Model and Execution Cost . . . . . . . . . . . . . . 91\\n4.3 Minimizing Expected Execution Cost . . . . . . . . . . . . 94\\n4.4 Minimizing Mean-Variance Trade-off of Execution Cost . . 94\\n4.5 Minimizing CVaR of Execution Cost . . . . . . . . . . . . 95\\nII Portfolio Optimization (Risk-Return Trade-off) 101\\n5 Portfolio Optimization with Known Parameters 102\\n5.1 Markowitz Mean-Variance Portfolio Optimization . . . . . 103\\n5.2 Drawbacks of Markowitz Framework . . . . . . . . . . . . 111\\n5.3 Black-Litterman Model . . . . . . . . . . . . . . . . . . . 114\\n6 Robust Portfolio Optimization 120\\n6.1 Robust Mean-Variance Trade-off Portfolio Optimization . . 121\\n6.2 Robust Sharpe ratio Optimization . . . . . . . . . . . . . 128\\n6.3 Connections with Robust Beamforming . . . . . . . . . . . 131\\n7 Multi-Portfolio Optimization 135\\n7.1 From Single-Portfolio to Multi-Portfolio . . . . . . . . . . 136\\n7.2 Multi-Portfolio Problems . . . . . . . . . . . . . . . . . . 139\\n7.3 Efficient Solving Methods . . . . . . . . . . . . . . . . . . 142\\n8 Index Tracking 148\\n8.1 Different Index Tracking Methods . . . . . . . . . . . . . 149\\n8.2 Sparse Index Tracking: Two-Step Approach . . . . . . . . 151\\n8.3 Sparse Index Tracking: Joint Optimization Approach . . . 154\\n9 Risk Parity Portfolio Optimization 161\\n9.1 What is a Risk Parity Portfolio? . . . . . . . . . . . . . . . 162\\n9.2 Risk Parity Portfolio Formulations . . . . . . . . . . . . . 165', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 6}),\n", - " Document(page_content='iv\\n9.3 SCRIP: An Efficient Numerical Solving Approach . . . . . 169\\nIII Statistical Arbitrage (Mean-Reversion) 172\\n10 Statistical Arbitrage 173\\n10.1 Cointegration versus Correlation . . . . . . . . . . . . . . 174\\n10.2 Pairs Selection . . . . . . . . . . . . . . . . . . . . . . . . 181\\n10.3 Cointegration Test . . . . . . . . . . . . . . . . . . . . . . 184\\n10.4 Investing in Cointegrated Pairs . . . . . . . . . . . . . . . 192\\n10.5 From Pairs Trading to Statistical Arbitrage . . . . . . . . 198\\n11 Conclusions 201\\nAppendices 203\\nA MATLAB Code of Example 3.1 204\\nB MATLAB Code of Figure 5.1 207\\nC MATLAB Code of Example 10.4 209\\nAbbreviations 211\\nNotation 213\\nReferences 216', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 7}),\n", - " Document(page_content='Abstract\\nFinancial engineering and electrical engineering are seemingly differ-\\nent areas that share strong underlying connections. Both areas rely\\non statistical analysis and modeling of systems; either modeling the\\nfinancial markets or modeling, say, wireless communication channels.\\nHaving a model of reality allows us to make predictions and to optimize\\nthe strategies. It is as important to optimize our investment strategies\\nin a financial market as it is to optimize the signal transmitted by an\\nantenna in a wireless link.\\nThis monograph provides a survey of financial engineering from a\\nsignal processing perspective, that is, it reviews financial modeling, the\\ndesign of quantitative investment strategies, and order execution with\\ncomparison to seemingly different problems in signal processing and\\ncommunication systems, such as signal modeling, filter/beamforming\\ndesign, network scheduling, and power allocation.\\nY. Feng and D. P. Palomar. A Signal Processing Perspective on Financial\\nEngineering . Foundations and TrendsR⃝in Signal Processing, vol. 9, no. 1-2,\\npp. 1–231, 2015.\\nDOI: 10.1561/2000000072.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 8}),\n", - " Document(page_content='1\\nIntroduction\\nDespitethedifferentnaturesoffinancialengineeringandelectricalengi-\\nneering, both areas are intimately connected on a mathematical level.\\nThe foundations of financial engineering lie on the statistical analy-\\nsis of numerical time series and the modeling of the behavior of the\\nfinancial markets in order to perform predictions and systematically\\noptimize investment strategies. Similarly, the foundations of electrical\\nengineering, for instance, wireless communication systems, lie on statis-\\ntical signal processing and the modeling of communication channels in\\norder to perform predictions and systematically optimize transmission\\nstrategies. Both foundations are the same in disguise.\\nThisobservationimmediatelypromptsthequestionofwhetherboth\\nareas can benefit from each other. It is often the case in science that the\\nsame or very similar methodologies are developed and applied indepen-\\ndently in different areas. The purpose of this monograph is to explore\\nsuch connections and to capitalize on the existing mathematical tools\\ndeveloped in wireless communications and signal processing to solve\\nreal-life problems arising in the financial markets in an unprecedented\\nway.\\n2', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 9}),\n", - " Document(page_content='3\\nThus,thismonographisaboutinvestmentinfinancialassetstreated\\nas a signal processing and optimization problem. An investment is the\\ncurrent commitment of resources in the expectation of reaping future\\nbenefits. In financial markets, such resources usually take the form of\\nmoney and thus the investment is the present commitment of money\\nin order to reap (hopefully more) money later [27]. The carriers of\\nmoney in financial markets are usually referred to as financial assets.\\nThere are various classes of financial assets, namely, equity securities\\n(e.g., common stocks), exchange-traded funds (ETFs), market indexes,\\ncommodities, exchanges rates, fixed-income securities, derivatives (e.g.,\\noptions and futures), etc. A detailed description of each kind of asset\\nis well documented, e.g., [27, 103]. For different kinds of assets, the key\\nquantitiesofinterestarenotthesame;forexample,forequitysecurities\\nthe quantities of interest are the compounded returns or log-returns;\\nfor fixed-income securities they are the changes in yield to maturity;\\nand for options they are changes in the rolling at-the-money forward\\nimplied volatility [143].\\nRoughly speaking, there are three families of investment philoso-\\nphies: fundamental analysis, technical analysis, and quantitative analy-\\nsis. Fundamental analysis uses financial and economical measures, such\\nas earnings, dividend yields, expectations of future interest rates, and\\nmanagement, to determine the value of each share of the company’s\\nstocks and then recommends purchasing the stocks if the estimated\\nvalue exceeds the current stock price [88, 89]. Warren Buffett of Berk-\\nshire Hathaway is probably the most famous practitioner of fundamen-\\ntal analysis [91]. Technical analysis, also known as “charting,” is essen-\\ntially the search for patterns in one dimensional charts of the prices of a\\nstock.Inaway,itpretendstobeascientificanalysisofpatterns(similar\\nto machine learning) but generally implemented in an unscientific and\\nanecdotal way with a low predictive power, as detailed in [132]. Quanti-\\ntative analysis applies quantitative (namely scientific or mathematical)\\ntools to discover the predictive patterns from financial data [128]. To\\nput this in perspective with the previous approach, technical analysis\\nis to quantitative analysis what astrology is to astronomy. The pioneer\\nof the quantitative investment approach is Edward O. Thorp, who used', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 10}),\n", - " Document(page_content='4 Introduction\\nhis knowledge of probability and statistics in the stock markets and has\\nmade a significant fortune since the late 1960s [193]. Quantitative anal-\\nysis has become more and more widely used since advanced computer\\nscience technology has enabled practitioners to apply complex quan-\\ntitative techniques to reap many more rewards more efficiently and\\nmore frequently in practice [4]. In fact, one could even go further to\\nsay that algorithmic trading has been one of the main driving forces in\\nthe technological advancement of computers. Some institutional hedge\\nfund firms that rely on quantitative analysis include Renaissance Tech-\\nnologies, AQR Capital, Winton Capital Management, and D. E. Shaw\\n& Co., to name a few.\\nIn this monograph, we will focus on the quantitative analysis of eq-\\nuity securities since they are the simplest and easiest accessible assets.\\nAs we will discover, many quantitative techniques employed in signal\\nprocessing methods may be applicable in quantitative investment. Nev-\\nertheless, the discussion in this monograph can be easily extended to\\nsome other tradeable assets such as commodities, ETFs, and futures.\\nThus, to explore the multiple connections between quantitative in-\\nvestment in financial engineering and areas in signal processing and\\ncommunications, we will show how to capitalize on existing mathemat-\\nical tools and methodologies that have been developed and are widely\\napplied in the context of signal processing applications to solve prob-\\nlems in the field of portfolio optimization and investment management\\nin quantitative finance. In particular, we will explore financial engineer-\\ning in several respects: i) we will provide the fundamentals of market\\ndata modeling and asset return predictability, as well as outline state-\\nof-the-art methodologies for the estimation and forecasting of portfolio\\ndesign parameters in realistic, non-frictionless financial markets; ii) we\\nwill present the problem of optimal portfolio construction, elaborate\\non advanced optimization issues, and make the connections between\\nportfolio optimization and filter/beamforming design in signal process-\\ning; iii) we will reveal the theoretical mechanisms underlying the design\\nand evaluation of statistical arbitrage trading strategies from a signal\\nprocessing perspective based on multivariate data analysis and time\\nseries modeling; and iv) we will discuss the optimal order execution', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 11}),\n", - " Document(page_content='1.1. A Signal Processing Perspective on Financial Engineering 5\\nand compare it with network scheduling in sensor networks and power\\nallocation in communication systems.\\nWe hope this monograph can provide more straightforward and sys-\\ntematic access to financial engineering for researchers in signal process-\\ning and communication societies1so that they can understand prob-\\nlems in financial engineering more easily and may even apply signal\\nprocessing techniques to handle financial problems.\\nIn the following content of this introduction, we first introduce fi-\\nnancial engineering from a signal processing perspective and then make\\nconnectionsbetweenproblemsarisinginfinancialengineeringandthose\\narising in different areas of signal processing and communication sys-\\ntems. At the end, the outline of the monograph is detailed.\\n1.1 A Signal Processing Perspective on Financial Engineer-\\ning\\nFigure 1.1 summarizes the procedure of quantitative investment.\\nRoughly speaking and oversimplifying, there are three main steps\\n(shown in Figure 1.1):\\n•financial modeling: modeling a very noisy financial time series to\\ndecompose it into trend and noise components;\\n•portfolio design: designing quantitative investment strategies\\nbased on the estimated financial models to optimize some pre-\\nferred criterion; and\\n•order execution: properly executing the orders to establish or un-\\nwind positions of the designed portfolio in an optimal way.\\nIn the following, we will further elaborate the above three steps from\\na signal processing perspective.\\n1There have been some initiatives in Signal Processing journals on the financial\\nengineering topic, namely, the 2011 IEEE Signal Processing Magazine - Special Issue\\non Signal Processing for Financial Applications, the 2012 IEEE Journal of Selected\\nTopics in Sginal Processing - Special Issue on Signal Processing Methods in Finance\\nand Electronic Trading, and the 2016 IEEE Journal of Selected Topics in Signal\\nProcessing - Special Issue on Financial Signal Processing and Machine Learning for\\nElectronic Trading.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 12}),\n", - " Document(page_content='6 Introduction\\nFinancial Modeling\\nPortfolio Optimization\\n(Risk-Return Trade-Off)\\nOrder ExecutionStatistical Arbitrage\\n(Mean-Reversion)Investment Strategies\\nFigure 1.1: Block diagram of quantitative investment in financial engineering.\\n1.1.1 Financial Modeling\\nFor equity securities, the log-prices (i.e., the logarithm of the prices)\\nand the compounded returns or log-returns (i.e., the differences of the\\nlog-prices) are the quantities of interest. From a signal processing per-\\nspective, a log-price sequence can be decomposed into two parts: trend\\nandnoisecomponents,whicharealsoreferredtoasmarketandidiosyn-\\ncratic components, respectively. The purpose of financial modeling or\\nsignal modeling is to decompose the trend components from the noisy\\nfinancial series. Then based on the constructed financial models, one\\ncan properly design some quantitative investment strategies for future\\nbenefits [196, 129, 143].\\nFor instance, a simple and popular financial model of the log-price\\nseries is the following random walk with drift:\\nyt=µ+yt−1+wt, (1.1)\\nwhereytis the log-price at discrete-time t,{wt}is a zero-mean white\\nnoise series, and the constant term µrepresents the time trend of the', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 13}),\n", - " Document(page_content='1.1. A Signal Processing Perspective on Financial Engineering 7\\nJan−10 Jan−11 Jan−12 Jan−13 Jan−14 Jan−15−0.3−0.2−0.100.10.20.30.40.50.60.7Log−priceS&P 500\\n \\nLog−price\\nTrend\\nAccum. noise\\nFigure 1.2: The decomposition of the log-price sequence of the S&P 500 Index into\\ntimetrendcomponent,andthecomponentwithouttimetrend(i.e.,theaccumulative\\nnoise).\\nlog-priceytsince E[yt−yt−1] =µ, which is usually referred to as drift.\\nBased on model (1.1), we can see the trend signal and noise com-\\nponents in the log-prices more clearly by rewriting ytas follows:\\nyt=µt+y0+t\\uf8fa\\ni=1wi, (1.2)\\nwhere the term µtdenotes the trend (e.g., uptrend if µ>0, downtrend\\nifµ < 0, or no trend if µ= 0), and the term∑t\\ni=1widenotes the\\naccumulative noise as time evolves.\\nFigure 1.2 shows the weekly log-prices of the S&P 500 index from\\n04-Jan-2010 to 04-Feb-2015 (the log-prices are shifted down so that\\nthe initial log-price is zero, i.e., y0= 0), where the estimated drift is\\nµ= 0.0022. Obviously, we observe two patterns: first, there exists a\\nsignificant uptrend since 2010 in the US market (see the dashed red', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 14}),\n", - " Document(page_content='8 Introduction\\nlineµt); and second, the accumulative noise in the log-prices is not\\nsteady and looks like a random walk (see the solid gray line for the\\naccumulative noise∑t\\ni=1wi=yt−µt).\\n1.1.2 Quantitative Investment\\nOnce the specific financial model is calibrated from the financial time\\nseries, the next question is how to utilize such a calibrated financial\\nmodel to invest. As mentioned before, one widely employed approach\\nis to apply quantitative techniques to design the investment strategies,\\ni.e., the quantitative investment [65, 128, 64, 143].\\nFigure 1.2 shows that there are two main components in a finan-\\ncial series: trend and noise. Correspondingly, there are two main types\\nof quantitative investment strategies based on the two components: a\\ntrend-based approach, termed risk-return trade-off investment; and a\\nnoise-based approach, termed mean-reversion investment.\\nThe trend-based risk-return trade-off investment tends to maximize\\nthe expected portfolio return while keeping the risk low; however, this\\nis easier said than done because of the sensitivity to the imperfect\\nestimation of the drift component and the covariance matrix of the\\nnoise component of multiple assets. In practice, one needs to consider\\nthe parameter estimation errors in the problem formulation to design\\nthe portfolio in a robust way. Traditionally, the variance of the portfolio\\nreturn is taken as a measure of risk, and the method is thus referred\\nto as “mean-variance portfolio optimization” in the financial literature\\n[135, 137, 138]. From the signal processing perspective, interestingly,\\nthe design of a mean-variance portfolio is mathematically identical to\\nthe design of a filter in signal processing or the design of beamforming\\nin wireless multi-antenna communication systems [123, 149, 213].\\nThe noise-based mean-reversion investment aims at seeking prof-\\nitability based on the noise component. For clarity of presentation, let\\nus use a simple example of only two stocks to illustrate the rough idea.\\nSuppose the log-price sequences of the two stocks are cointegrated (i.e.,\\nthey share the same stochastic drift), at some point in time if one stock\\nmoves up while the other moves down, then people can short-sell the\\nfirst overperforming stock and long/buy the second underperforming', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 15}),\n", - " Document(page_content='1.2. Connections between Fin. Eng. and Signal Process. 9\\nstock2, betting that the deviation between the two stocks will eventu-\\nally diminish. This idea can be generalized from only two stocks to a\\nlarger number of stocks to create more profitable opportunities. This\\ntype of quantitative investment is often referred to as “pairs trading”,\\nor more generally, “statistical arbitrage” in the literature [160, 203].\\n1.1.3 Order Execution\\nIdeally, after one has made a prediction and designed a portfolio, the\\nexecutionshouldbeaseamlesspartoftheprocess.However,inpractice,\\nthe process of executing the orders affects the original predictions in\\nthe wrong way, i.e., the achieved prices of the executed orders will\\nbe worse than what they should have been. This detrimental effect\\nis called market impact. Since it has been shown that smaller orders\\nhave a much smaller market impact, a natural idea to execute a large\\norder is to partition it into many small pieces and then execute them\\nsequentially [8, 18, 78, 146].\\nInterestingly, the order execution problem is close to many other\\nscheduling and optimization problems in signal processing and com-\\nmunication systems. From a dynamic control point of view, the order\\nexecutionproblemisquitesimilartosensorschedulingindynamicwire-\\nlesssensornetworks[180,181,208].Fromanoptimizationpointofview,\\ndistributing a large order into many smaller sized orders over a certain\\ntime window [8, 79] corresponds to allocating total power over differ-\\nent communication channels in broadcasting networks [198] or wireless\\nsensor networks [214].\\n1.2 Connections between Financial Engineering and Areas in\\nSignal Processing and Communication Systems\\nWe have already briefly introduced the main components of financial\\nengineering from a signal processing perspective. In the following we\\nmake several specific connections between financial engineering and\\nareas in signal processing and communication systems.\\n2In financial engineering, to “long” means simply to buy financial instruments,\\nto “short-sell” (or simply, to “short”) means to sell financial instruments that are\\nnot currently owned.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 16}),\n", - " Document(page_content='10 Introduction\\nModeling. Oneofthemostpopularmodelsusedinfinancialengineer-\\ning is the autoregressive moving average (ARMA) model. It models the\\ncurrent observation (e.g., today’s return) as the weighted summation\\nof a linear combination of previous observations (e.g., several previous\\ndays’ returns) and a moving average of the current and several previ-\\nous noise components [196]. Actually, this model is also widely used\\nin signal processing and it is referred to as a rational model because\\nitsz-transform is a rational function, or as a pole-zero model because\\nthe roots of the numerator polynomial of the z-transform are known as\\nzeros and the roots of the denominator polynomial of the z-transform\\nare known as poles [133].\\nRobust Covariance Matrix Estimation. After a specific model has\\nbeen selected, the next step is to estimate or calibrate its parameters\\nfrom the empirical data. In general, a critical parameter to be esti-\\nmatedisthecovariancematrixofthereturnsofmultiplestocks.Usually\\nthe empirical data contains noise and some robust estimation methods\\nare needed in practice. One popular idea in financial engineering is\\nto shrink the sample covariance matrix to the identity matrix as the\\nrobust covariance matrix estimator [120]. Interestingly, this is mathe-\\nmaticallythesameasthediagonalloadingmatrix(i.e.,theadditionofa\\nscaled identity matrix to the sample interference-plus-noise covariance\\nmatrix) derived more than thirty years ago for robust adaptive beam-\\nformingin signalprocessing andcommunication systems[1, 38,45]. For\\nlarge-dimensional data, the asymptotic performance of the covariance\\nmatrix estimators is important. The mathematical tool for the asymp-\\ntotic analysis is referred to as general asymptotics or large-dimensional\\ngeneral asymptotics in financial engineering [121, 122], or as random\\nmatrix theory (RMT) in information theory and communications [199].\\nPortfolioOptimizationvsFilter/BeamformingDesign. Onepopular\\nportfolio optimization problem is the minimum variance problem:\\nminimizewwTΣw\\nsubject to wT1= 1,(1.3)', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 17}),\n", - " Document(page_content='1.2. Connections between Fin. Eng. and Signal Process. 11\\nwhere w∈RNis the portfolio vector variable representing the nor-\\nmalized dollars invested in Nstocks, wT1= 1is the capital budget\\nconstraint, and Σ∈RN×Nis the (estimated in advance) positive defi-\\nnite covariance matrix of the stock returns.\\nThe above problem (1.3) is really mathematically identical to the\\nfilter/beamforming design problem in signal processing [149]:\\nminimizewwHRw\\nsubject to wHa= 1,(1.4)\\nwhere w∈CNis the complex beamforming vector variable denoting\\nthe weights of Narray observations and a∈CNandR∈CN×N(es-\\ntimated in advance) are the signal steering vector (also known as the\\ntransmission channel) and the positive definite interference-plus-noise\\ncovariance matrix, respectively. The similarity between problems (1.3)\\nand(1.4)showssomepotentialconnectionsbetweenportfoliooptimiza-\\ntion and filter/beamforming design, and we will explore more related\\nformulations in detail later in the monograph.\\nIndex Tracking vs Sparse Signal Recovery. Index tracing is a widely\\nused quantitative investment that aims at mimicking the market index\\nbut with much fewer stocks. That is, suppose that a benchmark index\\nis composed of Nstocks and let rb= [rb\\n1,...,rb\\nT]T∈RTandX=\\n[r1,...,rT]T∈RT×Ndenote the returns of the benchmark index and\\ntheNstocks in the past Tdays, respectively, index tracking intends\\nto find a sparse portfolio wto minimize the tracking error between the\\ntracking portfolio and benchmark index [106]:\\nminimizew1\\nT∥Xw−rb∥2\\n2+λ∥w∥0\\nsubject to 1Tw= 1,w≥0,(1.5)\\nwhereλ≥0is a predefined trade-off parameter.\\nMathematically speaking, the above problem (1.5) is identical to\\nthe sparse signal recovery problem [37] and compressive sensing [51] in\\nsignal processing:\\nminimizew1\\nT∥Φw−y∥2\\n2+λ∥w∥0 (1.6)', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 18}),\n", - " Document(page_content='12 Introduction\\nTable 1.1: Connections between financial engineering and signal processing.\\nFinancial Engineer-\\ningSignal Processing\\nModeling ARMA model [196]rational or pole-zero\\nmodel [133]\\nCovariance\\nMatrix\\nEstimationshrinkage sample co-\\nvariance matrix estima-\\ntor [120]diagonal loading in\\nbeamforming [1, 38, 45]\\nAsymptotic\\nAnalysis(large-dimensional)\\ngeneral asymptotics\\n[121, 122]random matrix theory\\n[199]\\nOptimizationportfolio optimization\\n[135, 137, 179, 213]filter/beamforming de-\\nsign [149, 213]\\nSparsity index tracking [106]sparse signal recovery\\n[37, 51]\\nwhereλ≥0is a predefined trade-off parameter, Φ∈RT×Nis a dic-\\ntionary matrix with T≪N,y∈RTis a measurement vector, and\\nw∈RNis a sparse signal to be recovered. Again, the similarity be-\\ntween the two problems (1.5) and (1.6) shows that the quantitative\\ntechniques dealing with sparsity may be useful for both index tracking\\nand sparse signal recovery.\\nTable 1.1 summarizes the above comparisons in a more compact\\nway and it is interesting to see so many similarities and connections\\nbetween financial engineering and signal processing.\\n1.3 Outline\\nThe abbreviations and notations used throughout the monograph are\\nprovided on pages 211 and 213, respectively.\\nFigure 1.3 shows the outline of the monograph and provides the\\nrecommended reading order for the reader’s convenience. The detailed\\norganization is as follows.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 19}),\n", - " Document(page_content='1.3. Outline 13\\nPart I mainly focuses on financial modeling (Chapters 2 and 3) and\\norder execution (Chapter 4).\\nChapter 2 starts with some basic financial concepts and then in-\\ntroduces several models, such as the i.i.d. model, factor model, ARMA\\nmodel, autoregressive conditional heteroskedasticity (ARCH) model,\\ngeneralized ARCH (GARCH) model, and vector error correction model\\n(VECM), which will be used in the later chapters. Thus, this chapter\\nprovides a foundation for the following chapters in the monograph.\\nChapter 3 deals with the model parameter estimation issues. In\\nparticular, it focuses on the estimation of the mean vector and the co-\\nvariance matrix of the returns of multiple stocks. Usually, these two\\nparameters are not easy to estimate in practice, especially under two\\nscenarios: when the number of samples is small, and when there exists\\noutliers. This chapter reviews the start-of-the-art robust estimation of\\nthe mean vector and the covariance matrix from both financial engi-\\nneering and signal processing.\\nChapter 4 formulates the order execution as optimization problems\\nand presents the efficient solving approaches.\\nOnce financial modeling and order execution have been introduced\\nin Part I, we move to the design of quantitative investment strate-\\ngies. As shown in Figure 1.1 there are two main types of investment\\nstrategies,namelyrisk-returntrade-offinvestmentstrategiesandmean-\\nreversion investment strategies, which are documented in Parts II and\\nIII, respectively.\\nPart II entitled “Portfolio Optimization” focuses on the risk-return\\ntrade-off investment. It contains Chapters 5-9 and is organized as fol-\\nlows.\\nChapter 5 reviews the most basic Markowitz mean-variance portfo-\\nlio framework, that is, the objective is to optimize a trade-off between\\nthe mean and the variance of the portfolio return. However, this frame-\\nwork is not practical due to two reasons: first, the optimized strategy\\nis extremely sensitive to the estimated mean vector and covariance\\nmatrix of the stock returns; and second, the variance is not an ap-\\npropriate risk measurement in financial engineering. To overcome the\\nsecond drawback, some more practical single side risk measurements,', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 20}),\n", - " Document(page_content='14 Introduction\\ne.g.,Value-at-Risk(VaR)andConditionalVaR(CVaR),areintroduced\\nas the alternatives to the variance.\\nChapter 6 presents the robust portfolio optimization to deal with\\nparameter estimation errors. The idea is to employ different uncer-\\ntainty sets to characterize different estimation errors and then derive\\nthe corresponding worst-case robust formulations.\\nChapter 7, different from previous Chapters 5 and 6 that consider\\neach portfolio individually, designs multiple portfolios corresponding to\\ndifferent clients jointly via a game theoretic approach by modeling a\\nfinancial market as a game and each portfolio as a player in the game.\\nThis approach is important in practice because multiple investment\\ndecisions may affect each other.\\nChapter 8 considers a passive quantitative investment method\\nnamed index tracking. It aims at designing a portfolio that mimics a\\npreferred benchmark index as closely as possible but with much fewer\\ninstruments.\\nChapter 9 considers a newly developed approach to the portfolio\\ndesign aiming at diversifying the risk, instead of diversifying the capital\\nas usually done, among the available assets, which is called a “risk\\nparity portfolio” in the literature.\\nPart III, containing Chapter 10, explores the mean-reversion in-\\nvestment that utilizes the noise component in the log-price sequences\\nof multiple assets.\\nChapter 10 introduces the idea of constructing a pair of two stocks\\nvia cointegration and optimizes the threshold for trading to achieve a\\npreferred criterion. Then it extends further from pairs trading based\\non only two stocks to statistical arbitrage for multiple stocks.\\nAfter covering the main content of the three parts, Chapter 11\\nconcludes the monograph.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 21}),\n", - " Document(page_content='1.3. Outline 15\\nChapter 1:\\n“Introduction ”\\nChapter 2:\\n“Basic Models ”Chapter 3:\\n“Mean/Cov \\nEstimaton ”\\nChapter 4:\\n“Order \\nExecution ”\\nChapter 5:\\n“MV Portfolio ”\\nChapter 9:\\n“Risk Parity \\nPortfolio”Chapter 7:\\n“Multiple \\nPortfolio”\\nChapter 8:\\n“Index \\nTracking ”Chapter 10:\\n“Statistical \\nArbitrage ”\\nChapter 11:\\n“Conclusion ”Part I:\\nFinancial \\nModeling\\nPart II:\\nPortfolio\\nOptimization\\nRecommended reading orderPart III:\\nStatistical\\nArbitrageChapter 6:\\n“Robust Portfolio \\nOptimization ”\\nFigure 1.3: Outline of the monograph.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 22}),\n", - " Document(page_content='Part I\\nFinancial Modeling &\\nOrder Execution', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 23}),\n", - " Document(page_content='2\\nModeling of Financial Time Series\\nModeling of financial time series provides the quantitative tools to ex-\\ntract useful (or predictable) information for future investments. There\\nare two main philosophies of modeling like then are in signal process-\\ning and control theory [98]: continuous-time and discrete-time systems.\\nContinuous-time modeling, using the Black-Scholes model, for exam-\\nple, involves stochastic calculus and concepts like the Brownian motion\\nthat are at the core of many fundamental results. For computational\\npurposes, however, discrete-time modeling is more convenient. In addi-\\ntion, practical investment strategies are usually naturally discretized,\\ni.e., daily or monthly investments.\\nTherefore, this chapter focuses on discrete-time modeling of finan-\\ncial time series, i.e., the interested time series quantities (mainly the\\nlog-returns) of some interested assets (say Nassets) given the past\\ninformation (i.e., the past log-returns of the Nassets).\\nThe detailed organization is as follows. Section 2.1 starts with some\\nbasic financial concepts, i.e., prices and returns. Then Section 2.2 in-\\ntroduces the general structure of modeling and Sections 2.3-2.7 explain\\nseveralspecificmodels,suchasthei.i.d.model,factormodel,vectorau-\\ntoregressive moving average (VARMA) model, vector error correction\\n17', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 24}),\n", - " Document(page_content='18 Modeling of Financial Time Series\\nmodel (VECM), autoregressive conditional heteroskedasticity (ARCH)\\nmodel, generalized ARCH (GARCH) model, and multivariate ARCH\\nand GARCH models, which will be used in the later chapters. At the\\nend, Section 2.8 summarizes all the models briefly.\\nThis chapter focuses on the models themselves but leaves the fitting\\nof the models with real data or parameter estimation to Chapter 3. All\\nthe models are introduced in their vector/multivariate cases.\\n2.1 Asset Returns\\nFor simplicity, let us focus on a single asset. Let ptbe the price of an\\nasset at (discrete) time index t.\\n2.1.1 Returns Based on Prices\\nSuppose the asset pays no dividends1, the simple return (a.k.a. linear\\nreturn or net return) over one interval from time t−1totis\\nRt≜pt−pt−1\\npt−1=pt\\npt−1−1. (2.1)\\nThe numerator pt−pt−1is the profit (or the loss in case of a negative\\nprofit)duringtheholdingperiodandthedenominator pt−1istheinitial\\ninvestment at time t−1. Thus the simple return can be regarded as\\nthe profit rate.\\nThen the quantity\\nRt+ 1 =pt\\npt−1(2.2)\\ndenotes the ratio between the end capital and the initial investment,\\nthus it is referred to as total return or gross return.\\nBased on the above definitions for only one investment period, the\\ngross return on the most recent kperiods is the product of the past k\\nsingle period gross returns\\n1 +Rt(k) =pt\\npt−k=pt\\npt−1×pt−1\\npt−2×···×pt−k+1\\npt−k\\n= (1 +Rt)×···× (1 +Rt−k+1),(2.3)\\n1If there exists dividend dtat timet, then the simple return in (2.1) can be\\nadjusted as Rt=pt−pt−1+dt\\npt−1.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 25}),\n", - " Document(page_content='2.1. Asset Returns 19\\nand the corresponding net return is\\nRt(k) =pt\\npt−k−1. (2.4)\\n2.1.2 Returns Based on Log-prices\\nThe log-return (a.k.a. continuously compounded return) at time tis\\ndefined as follows:\\nrt≜log(1 +Rt) = logpt\\npt−1=yt−yt−1, (2.5)\\nwhereyt≜logptis the log-price and log denotes the natural logarithm.\\nSince the function f(x) = log(1 + x)has the first order Taylor\\napproximation f(x) = log(1 + x)≈xat point 0, we can see rt=\\nlog(1 +Rt)is approximately equal to the net return Rtin (2.1), i.e.,\\nrt≈Rt, especially when Rtis small around zero (which is the case for\\nthe usual intervals).\\nThe log-return on the most recent kperiods is\\nrt(k)≜log(1 +Rt(k)) = log[(1 + Rt)×···× (1 +Rt−k+1)]\\n= log(1 +Rt) + log(1 + Rt−1) +···+ log(1 +Rt−k+1)\\n=rt+rt−1+···+rt−k+1,(2.6)\\nwhich has a nice additive property over periods (recall that the linear\\nmulti-period net return Rt(k)in (2.4) does not have such a property).\\n2.1.3 Portfolio Returns\\nFor a portfolio composing of Nassets, let w∈RNbe a vector with wi\\ndenoting normalized capital invested into the i-th asset. Then the net\\nreturn of the portfolio over a single period tisRp\\nt=∑N\\ni=1wiRitwhere\\nRitis the net return of the i-th asset.\\nThe log-return of a portfolio, however, does not have the above ad-\\nditivity property. If the simple returns Ritare all small in magnitude,\\ntheycanbeapproximatedbythelog-returns ritandtheportfolionetre-\\nturn can be approximated as Rp\\nt=∑N\\ni=1wiRit≈∑N\\ni=1wirit. However,\\nwhen some Ritare significantly different from zero, using∑N\\ni=1wiritto\\napproximate∑N\\ni=1wiRitmay introduce some serious errors [144].', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 26}),\n", - " Document(page_content='20 Modeling of Financial Time Series\\nModels for Financial \\nTime SeriesAdditivity Over Periods Log-Returns\\nPortfolio OptimizationAdditivity Over Assets Simple Returns\\nFigure 2.1: Simple returns versus log-returns.\\n2.1.4 Comparisons: Simple Returns versus Log-returns\\nFigure 2.1 provides a summary of the comparisons between simple re-\\nturns and log-returns.\\nFirst, the simple returns have the advantage of additivity over as-\\nsets. Because of that, it is the simple returns that will be used in port-\\nfolio optimization later in Part II.\\nSecond, the log-returns have the advantage of additivity over assets\\nperiods. This makes the distribution of the log-returns in the future\\neasier to compute and predict.\\nThird, the statistical properties of the log-returns are relatively\\nmore tractable. For example, from (2.1) we can see that simple returns\\nare highly asymmetric because they are bounded below by −1and un-\\nbounded above. Instead, the log-returns are relatively more symmetric\\nand this makes the corresponding distributions easier to model.\\nIt is the additivity over periods and statistical simplicity that are\\nneeded for modeling purposes and thus we focus on the log-returns in\\nthis chapter. However, as shown in Figure 2.1, either simple returns or\\nlog-returns should be used depending on the investor’s specific goal.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 27}),\n", - " Document(page_content='2.2. General Structure of a Model 21\\n2.2 General Structure of a Model\\nMost of the existing financial time series models aim at modeling the\\nlog-returns of Nassets jointly denoted by rt∈RN. In particular, they\\nmodel the log-returns at time tbased on the previous historical data\\ndenoted byFt−1. However, modeling an N-dimensional random vari-\\nable may be a daunting task not just because of the estimation aspect\\nbut also the storage issue. For this reason, most models simplify the\\ntask by modeling only the mean and covariance matrix.\\nConditional onFt−1, we can decompose rt∈RNas follows:\\nrt=µt+wt, (2.7)\\nwhereµtis the conditional mean\\nµt=E[rt|Ft−1] (2.8)\\nandwtis a white noise with zero mean and conditional covariance\\nΣt=E[(rt−µt)(rt−µt)T|Ft−1]. (2.9)\\nHere,µtandΣt(or equivalently Σ1/2\\nt) are the two main components\\nto be modeled, and they are usually referred to as conditional mean\\nand conditional covariance matrix (or more often conditional volatility\\nforΣ1/2\\nt), respectively, in the literature.\\nIn the literature, the underlying distribution wtis always assumed\\nto be Gaussian (or sometimes a more general elliptical distribution) for\\nmathematical simplicity even though reality does not fit the thin tails\\nof the Gaussian distribution [143].\\nIn the following, we first provide general models for both µtand\\nΣtand then explore several different types of specific models. Sections\\n2.3 and 2.4 model both conditional mean and covariance as constants,\\nSections 2.5 and 2.6 explore various models of the conditional mean\\nbut leave the conditional covariance matrix as a constant, and Section\\n2.7 focuses on modeling the conditional covariance matrix only. All the\\nspecific models can be regarded as special cases of the general models,\\nand we summarize them in Section 2.8.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 28}),\n", - " Document(page_content='22 Modeling of Financial Time Series\\n2.2.1 General Model for Conditional Mean µt\\nFor most log-return series, the following model is enough to model the\\nconditional mean µt:\\nµt=φ0+Πxt+p\\uf8fa\\ni=1Φirt−i−q\\uf8fa\\nj=1Θjwt−j, (2.10)\\nwhereφ0∈RNdenotes a constant vector, xt∈RKdenotes a vector\\nof exogenous variables, Π∈RN×Kis a loading matrix, pandqare\\nnonnegative integers, Φi,Θj∈RN×Nare matrix parameters, and rt−i\\nandwt−jare past log-returns and temporally white noise.\\n2.2.2 General Model for Conditional Covariance Matrix Σt\\nFor a multivariate case, there exist many different models of the con-\\nditional covariance matrix Σt, and, in general, there does not exist a\\ngeneral model formulation that captures all the existing ones as special\\ncases, e.g., see [16, 182, 196, 129]. Nevertheless, for the consistency of\\npresentation, let us introduce the following model [62]:\\nΣt=A0AT\\n0+m\\uf8fa\\ni=1Ai(wt−iwT\\nt−i)AT\\ni+s\\uf8fa\\nj=1BjΣt−jBT\\nj,(2.11)\\nwheremandsare nonnegative integers and Ai,Bj∈RN×Nare pa-\\nrameters. This model ensures a positive definite matrix provided that\\nA0AT\\n0is positive definite. The above model is referred to as the Baba-\\nEngle-Kraft-Kroner (BEKK) model in the literature.\\nIn practice, most models simply assume a constant covariance ma-\\ntrixΣt=Σw, i.e., a special case of (2.11) with m= 0ands= 0.\\n2.3 I.I.D. Model\\nPerhaps the simplest model for rtis that it follows an i.i.d. distribution\\nwith fixed mean and covariance matrix, i.e.,\\nrt=µ+wt, (2.12)\\nwhere wt∈RNis a white noise series with zero mean and constant\\ncovariance matrix Σw.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 29}),\n", - " Document(page_content='2.4. Factor Model 23\\nComparing the i.i.d. model (2.12) with the general model (2.7)-\\n(2.11), obviously we can see it is the simplest special case with µ=φ0,\\nΠ=0,p= 0,q= 0,Σw=A0AT\\n0,m= 0, ands= 0. And the\\nconditional mean and covariance matrix are both constant:\\nµt=µ, (2.13)\\nΣt=Σw. (2.14)\\nThis i.i.d. model assumption may look simple, however, it is one\\nof the most fundamental assumptions for many important works. One\\nexample is the Nobel prize-winning Markowitz portfolio theory [135,\\n136, 137, 138, 179] that will be covered in Chapter 5.\\n2.4 Factor Model\\nIf we look at (2.12) carefully, we may think that the dimension of the\\nmarketalwaysequalsthenumberofassets N.However,thismaynotbe\\ntrue in practice. In general, the market is composed of a large number\\nofassets(i.e., Nislarge),butitisusuallyobservedthatitsdimensionis\\nrelatively small, that is, the market is only driven by a limited number\\nof factors, say Kfactors with K≪N.\\nThe general factor model is\\nrt=φ0+h(ft) +wt, (2.15)\\nwhereφ0denotes a constant vector; ft∈RKwithK≪Nis a vector\\nof a few factors that are responsible for most of the randomness in\\nthe market, the vector function h:RK↦→RNdenotes how the low\\ndimensional factors affect the higher dimensional market; and a resid-\\nual vector wtof (possibly independent) perturbations that has only a\\nmarginal effect. In general, the function his assumed to be linear.\\nThis approach of modeling enjoys a wide popularity; refer to [42,\\n66, 67, 68, 69, 70, 118] for some typical references.\\nIn the following, we consider two specific models of (2.15) with\\neither explicit or hidden factors.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 30}),\n", - " Document(page_content='24 Modeling of Financial Time Series\\n2.4.1 Explicit Factors\\nThe explicit factor model is\\nrt=φ0+Πft+wt, (2.16)\\nwhich is a specific case of (2.15) with h(ft) =Πft,ft∈RKbeing\\nexplicitly observable market variables, and Π∈RN×Kbeing the factor\\nloading matrix.\\nSome popular explicit factors include returns on the market port-\\nfolio2, growth rate of the GDP, interest rate on short term Treasury\\nbills, inflation rate, unemployment, etc. [171].\\nObviously, the factor model with explicit factors (2.16) is a special\\ncase of the general model (2.7)-(2.11) with exogenous input being the\\nfactors xt=ft,p= 0, andq= 0.\\nIn general, it is assumed that ftfollows an i.i.d. distribution with\\nconstant mean µfand constant covariance matrix Σf,wtfollows an\\ni.i.d. distribution with zero mean and (possibly diagonal) constant co-\\nvariance matrix Σw, and ftandwtare uncorrelated. Then the con-\\nditional mean and covariance matrix are both constant and can be\\ncomputed as follows:\\nµt=E[rt|Ft−1] =E[rt] =φ0+Πµf (2.17)\\nΣt=E[(rt−µt)(rt−µt)T|Ft−1],\\n=ΠΣfΠT+Σw. (2.18)\\nCapital Asset Pricing Model (CAPM)\\nOne of the most popular factor models is the CAPM with the returns\\non the market portfolio being the only factor [70]. The i-th stock return\\nat timetis\\nri,t−rf=βi(rM,t−rf) +wi,t, (2.19)\\nwhererfis the risk-free rate, rM,tis the return of the market portfolio,\\nandwi,tis a stock-specific white noise with zero mean and constant\\nvariance.\\n2The market portfolio is a portfolio consisting of all equities with the normalized\\nportfolio weights being proportional to the market values of the equities.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 31}),\n", - " Document(page_content='2.4. Factor Model 25\\nTaking the expectation on both sides of (2.19) results in the so-\\ncalled CAPM:\\nE[ri,t]−rf=βi(E[rM,t]−rf). (2.20)\\nBased on (2.20)\\n•E[rM,t]−rfmeasures the difference between the expected market\\nreturn and risk-free rate, which is known as the market premium;\\n•E[ri,t]−rfmeasures the difference between the expected stock\\nreturn and risk-free rate, which is known as the risk premium;\\nand\\n•βiin general is given by\\nβi=Cov(ri,t,rM,t)\\nVar(rM,t)(2.21)\\nwhich measures how sensitive the risk premium is to the market\\npremium, that is, the risk premium equals the market premium\\ntimesβi.\\nNote that the conditional mean E[ri,t|Ft−1]is the same as the un-\\nconditional mean E[ri,t] =rf+βi(E[rM,t]−rf).\\nTaking the variance on both sides of (2.19) gives us the following\\nrelationship:\\nVar[ri,t] =β2\\niVar[rM,t] +Var[wi,t], (2.22)\\nwhich is decomposed into two parts:\\n•β2\\niVar[rM,t]measures the risk associated with the market and it\\nis referred to as systematic risk, and\\n•Var[wi,t]is specific to each stock and it is called nonsystematic\\nrisk.\\nAlso, the conditional variance Var[ri,t|Ft−1]equals the unconditional\\nvariance Var[ri,t].', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 32}),\n", - " Document(page_content='26 Modeling of Financial Time Series\\n2.4.2 Hidden Factors\\nThe assumption of a linear model of (2.15) with hidden factors is that\\nthe factors are not explicit market variables but are functions of rtthat\\nsummarize as much information as possible.\\nOne method is to define the hidden factors as affine transformations\\nofrtas follows:\\nft=d+ΥTrt, (2.23)\\nwhere d∈RKandΥ∈RN×Kare parameters to be estimated.\\nThen the hidden factor model can be expressed as follows:\\nrt=φ0+Π(d+ΥTrt) +wt, (2.24)\\nwhich is a specific case of (2.15) with h(ft) =Πft,ft∈RKbeing\\nthe hidden variables defined in (2.23); Π∈RN×Kbeing the factor\\nloading matrix; and wtfollows an i.i.d. distribution with zero mean\\nand a (possibly diagonal) constant covariance matrix Σw.\\nThe model (2.24) can be further simplified as follows:\\nrt=m+ΠΥTrt+wt, (2.25)\\nwhere m=φ0+Πdis an newly defined parameter.\\nThe parameters m,Π, and Υcan be estimated by the following\\nnonlinear least-square (LS) regression:\\nminimize\\nm,Π,ΥE\\ued79\\ued79\\ued79rt−m−ΠΥTrt\\ued79\\ued79\\ued792\\n2. (2.26)\\nRecall that Π,Υ∈RN×K, then ΠΥT∈RN×Nwith rank(ΠΥT)≤\\nK≪N, then intuitively problem (2.26) is projecting rtonto a lower\\nK-dimensional subspace with variations being captured as much as\\npossible. Indeed, this technique is usually referred to as principal com-\\nponent analysis (PCA) [109] in the literature, the optimal solution of\\nwhich can be stated in closed-form as follows [143]:\\nΠ=Υ=EK, (2.27)\\nm=(\\nI−EKET\\nK)\\nE[rt], (2.28)\\nwhere EK∈RN×Kwith thek-th column vector being the k-th largest\\neigenvector of the covariance matrix Cov[rt],k= 1,...,K., and it can\\nbe shown that the white noise wtis uncorrelated of the hidden factors.', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 33}),\n", - " Document(page_content='2.5. VARMA Model 27\\nThen combining (2.25), (2.27) and (2.28) together, we can find the\\nconditional mean and covariance matrix as follows:\\nµt=E[rt|Ft−1] =E[rt], (2.29)\\nΣt=E[(rt−µt)(rt−µt)T|Ft−1]\\n=EKΛKET\\nK+Σw, (2.30)\\nwhere ΛK= Diag([λ1,...,λK])is aK-by-Kdiagonal matrix with λk\\nbeing thek-th largest eigenvalue of Cov[rt], and we can see both the\\nconditional mean and covariance matrix are constant and independent\\nof time.\\n2.4.3 Comparisons: Explicit Factors versus Hidden Factors\\nBased on (2.17)-(2.18) or (2.29)-(2.30), we can see that the factor mod-\\nels,i.e.,(2.16)and(2.25),decomposetheconditionalcovariance Σtinto\\ntwo parts: low dimensional factors and marginal noise. The key is the\\nway to choose or construct the factors, and the comparisons between\\nthe explicit and hidden factor models are as follows:\\n•The explicit factor model tends to explain the log-returns with a\\nsmaller number of fundamental or macroeconomic variables and\\nthus it is easier to interpret. However, in general there is no sys-\\ntematic method to choose the right factors.\\n•The hidden factor model employs PCA to explore the structure\\nof the covariance matrix and locate a low-dimensional subspace\\nthat captures most of the variation in the log-returns. It is a more\\nsystematical approach and thus it may provide a better explana-\\ntory power. One drawback of the hidden factors compared with\\nthe explicit factors is that they do not have explicit econometric\\ninterpretations.\\n2.5 VARMA Model\\nThe previous i.i.d. and factor models, while commonly employed, do\\nnot incorporate any time-dependency in the model for rt. In other\\nwords, the conditional mean and covariance matrix are constant and', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 34}),\n", - " Document(page_content='28 Modeling of Financial Time Series\\npast information is not explicitly used (it can still be used implicitly\\nvia the estimation of the parameters).\\nThe VARMA model can incorporate the past information into the\\nmodel of conditional mean, although still not in the conditional covari-\\nance matrix.\\nStationarity is an important characteristic for time series analysis\\nwhich describes the time-invariant behavior of a time series. A mul-\\ntivariate time series rtis said to be weakly stationary if its first and\\nsecond moments are time-invariant. In general, a stationary time series\\nis much easier to model, estimate, and analyze.\\n2.5.1 VAR( 1) Model\\nLet us start with the vector autoregressive (VAR) model of order 1,\\ndenoted as VAR( 1), as follows:\\nrt=φ0+Φ1rt−1+wt, (2.31)\\nwhereφ0∈RNisaconstantvector, Φ1∈RN×Nisamatrixparameter,\\nandwtdenotes a serially uncorrelated noise series with zero mean\\nand constant covariance matrix Σw. We can see that the term Φ1rt−1\\nmodels the serial correlation of the time series rt.\\nAlso, compared with the general model (2.7)-(2.11), the VAR( 1)\\nmodel (2.31) is a special case with Π=0,p= 1,q=m=s= 0, and\\nΣt=Σw, and it is straightforward to obtain the conditional mean and\\ncovariance matrix based on (2.31) as follows:\\nµt=φ0+Φ1rt−1, (2.32)\\nΣt=Σw. (2.33)\\nObviously, the conditional covariance matrix Σtis constant.\\n2.5.2 VAR( p) Model\\nThep-th order autoregressive process, denoted as VAR( p), extends the\\nVAR( 1) model by including more previous observations into the model\\nas follows:\\nrt=φ0+p\\uf8fa\\ni=1Φirt−i+wt, (2.34)', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 35}),\n", - " Document(page_content='2.5. VARMA Model 29\\nwherepis a nonnegative integer, φ0∈RNis a constant vector, Φi∈\\nRN×Nare matrix parameters, and wtdenotes a serially uncorrelated\\nwhite noise series with zero mean and constant covariance matrix Σw.\\nClearly we can see that the time series rtis serially correlated via\\nthe term∑p\\ni=1Φirt−iwhich contains more previous observations than\\nthe AR( 1) model (2.31). Similar to (2.32) and (2.33), the conditional\\nmean and covariance matrix based on (2.34) are\\nµt=φ0+p\\uf8fa\\ni=1Φirt−i, (2.35)\\nΣt=Σw, (2.36)\\nwhere the conditional covariance matrix is constant.\\n2.5.3 VMA( q) Model\\nEven though the VAR model models the serial correlations, it imposes\\nsuch correlations with all the past observations. We can observe this\\neasily by substituting the VAR( 1) model (2.31) recursively and we have\\nthatrtis serially correlated to all the past observations r0,...,rt−1,\\nespecially when the eigenvalues of Ψ1are close to 1.\\nFor some realistic cases, the time series rtshould only have serial\\ncorrelation up to a small lag qsuch that rtis serially uncorrelated to\\nrt−ℓfor allℓ > q. Unfortunately, the VAR model does not have this\\nproperty.\\nA useful alternative to the VAR model is a vector moving average\\n(VMA) model. The VMA model of order q, denoted as VMA( q), is\\nrt=µ+wt−q\\uf8fa\\nj=1Θjwt−j, (2.37)\\nwhereqis a nonnegative integer, µ∈RNis a constant vector, Θj∈\\nRN×Nare matrix parameters, and wtdenotes a serially uncorrelated\\nwhite noise series with zero mean and constant covariance matrix Σw.\\nBased on (2.37), it is easy to check that rtis serially uncorrelated\\ntort−ℓfor allℓ > q. Also, the VMA( q) model (2.37) is a special case\\nof the general model (2.7)-(2.11) with Π=0andp=m=s= 0, and', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 36}),\n", - " Document(page_content='30 Modeling of Financial Time Series\\nwe have the conditional mean and covariance matrix as follows:\\nµt=µ−q\\uf8fa\\nj=1Θjwt−j, (2.38)\\nΣt=Σw, (2.39)\\nwhere the conditional covariance matrix is constant.\\n2.5.4 VARMA Model\\nSometimes, using simply a VAR model or a VMA model only is not\\nenough to fit the data and it is helpful to combine them together. The\\ncombination of VAR( p) and VMA( q), referred to as VARMA( p,q), is\\ngiven by\\nrt=φ0+p\\uf8fa\\ni=1Φirt−i+wt−q\\uf8fa\\nj=1Θjwt−j, (2.40)\\nwherepandqare nonnegative integers, φ0∈RNis a constant vector,\\nthe matrices Φi,Θj∈RN×Nare parameters, and wtis a white noise\\nseries with zero mean and constant covariance matrix Σw. Directly, the\\nconditional mean and covariance matrix based on (2.40) are\\nµt=φ0+p\\uf8fa\\ni=1Φirt−i−q\\uf8fa\\nj=1Θjwt−j, (2.41)\\nΣt=Σw, (2.42)\\nwhere the conditional covariance matrix is still constant.\\nRemark 2.1. The VARMA model is a powerful model of conditional\\nmean, however, it also has some drawbacks that need to be dealt with\\ncarefully.\\nThe identifiability issue, i.e., two VARMA( p,q) models with differ-\\nent coefficient matrices can be rewritten as the same VMA( ∞) model,\\nis one of the most important ones. This issue is important because the\\nlikelihood function of the VARMA( p,q) model may not be uniquely\\ndefined and thus the parameters cannot be estimated. To overcome\\nthis drawback, some model structural specifications are needed. There', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 37}),\n", - " Document(page_content='2.6. VECM 31\\nare two main approaches namely the Kronecker index, and the scalar\\ncomponent model in the literature [197].\\nAnother issue is that, for a causal and invertible VARMA model,\\nthe conditional maximum likelihood estimation may not result in a\\ncausal and invertible estimated VARMA model, especially when the\\nnumber of samples is small [129, 197]. The solving approach is to either\\naddmoreconstraintsintheconditionalmaximumlikelihoodestimation\\n[169] or switch to the unconditional maximum likelihood estimation\\n[197]. However, both of them require more intensive computation. ■\\n2.6 VECM\\nUntil now we have focused on modeling directly the log-return series\\nrtinstead of the log-price series yt(recall that rt= ∆yt=yt−yt−1).\\nThisisbecauseingeneralthelog-priceseries ytisnotweaklystationary\\n(think for example of Apple stock whose log-prices keep increasing) and\\nthus is not easy to model, while its difference series, i.e., the log-return\\nseries rt, is weakly stationary and is easier to model and analyze.\\nHowever, it turns out that differencing may destroy part of the\\nrelationship among the log-prices which may be invaluable for a proper\\nmodeling with forecast power. It is therefore also important to analyze\\nthe original (probably non-stationary) time series directly [129].\\nInterestingly, it turns out that in fact a (probably non-stationary)\\nVAR model may be enough. For example, one can always fit the log-\\nprice series ytwith a VAR model, say, the following VAR( p):\\nyt=φ0+Φ1yt−1+···+Φt−pyt−p+wt, (2.43)\\nwherepis a nonnegative integer, φ0∈RNis a constant vector, Φi∈\\nRN×Nare matrix parameters, and wtdenotes a serially uncorrelated\\nwhite noise series with zero mean and constant covariance matrix Σw.\\nHere (2.43) models the log-price series and ytis not necessarily\\nstationary. The standard results for a stationary VAR model may not\\nbe useful.\\nIntheliterature,atimeseriesiscalledintegratedoforder p,denoted\\nasI(p),ifthetimeseriesobtainedbydifferencingthetimeseries ptimes\\nis weakly stationary, while by differencing the time series p−1times is', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 38}),\n", - " Document(page_content='32 Modeling of Financial Time Series\\nnot weakly stationary [196, 129]. A multivariate time series is said to be\\ncointegrated if it has at least one linear combination being integrated of\\na lower order. To illustrate the concepts visually, we consider a slightly\\nmodified example from [196] with only two dimensions as follows.\\nExample 2.1. Suppose the log-price series ytfollows\\nyt=Φ1yt−1+wt, (2.44)\\nwhere Φ1=)\\n0.5−1\\n−0.25 0.5[\\n, and wtfollows an i.i.d. distribution with\\nzero mean and constant covariance matrix Σw. The model (2.44) (or\\nyt) is not stationary because the eigenvalues of Φ1are0and1(recall\\nfor stationarity the modulus of the eigenvalues need to be less than\\none).\\nTo check the integration order of yt, rewriting (2.44) as\\n)\\n1−0.5B B\\n0.25B 1−0.5B[\\nyt=wt, (2.45)\\nwhereBis the backshift operator, and premultiplying both sides of\\n(2.45) by)\\n1−0.5B−B\\n−0.25B1−0.5B[\\nyields\\n)\\n1−B 0\\n0 1−B[\\nyt=)\\n1−0.5B−B\\n−0.25B1−0.5B[\\nwt. (2.46)\\nSince the right hand side of (2.46) is stationary, so is the first order\\ndifference of yton the left hand side of (2.46). This implies that ytis\\nintegrated of order one, i.e., it is I(1).\\nTocheckwhether ytiscointegratedornot,wedefine L≜)\\n1−2\\n0.5 1[\\nand premultiply (2.44) by L, then we have\\nLyt=LΦ1L−1Lyt−1+Lwt, (2.47)\\nwhich can be rewritten more explicitly as\\n)\\ny1t−2y2t\\n0.5y1t+y2t[\\n=)\\n1 0\\n0 0[)\\ny1,t−1−2y2,t−1\\n0.5y1,t−1+y2,t−1[\\n+Lwt.(2.48)', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 39}),\n", - " Document(page_content='2.6. VECM 33\\nSince Lwtis always stationary, so is the linear combination 0.5y1t+\\ny2t, and thus ytis cointegrated. This derived cointegration result in\\nfact is very important and can be utilized to design very profitable\\nquantitative trading strategies (which will be shown later in Part III).\\nNow we can observe that if we difference the log-price series directly\\nand reach the model (2.46), we cannot obtain the cointegration result\\nthat 0.5y1t+y2tis stationary any more. Therefore, it is important to\\nstudy the log-price series ytdirectly as mentioned before. ■\\nThe above Example 2.1 shows a specific example of cointegration.\\nIn practice, a systematic way to find the cointegrated components (if\\nthey exist) is via a vector error correction model (VECM) [61].\\nLet us assume the log-price series ytis at most I(1), that is, at\\nleast its difference series rtor the log-return series is always weakly\\nstationary. Using the relation yt=yt−1+rt, the VAR(p) model (2.43)\\ncan always be rewritten as\\nrt=φ0+Πyt−1+˜Φ1rt−1+···+˜Φp−1rt−p+1+wt,(2.49)\\nwhere\\nΠ=−(I−Φ1−···− Φp) =−Φ(1) (2.50)\\n˜Φj=−p\\uf8fa\\ni=j+1Φi, j = 1,...,p−1. (2.51)\\nInterestingly, the above model (2.49) can also be regarded as a\\nspecial case of the general model (2.10) with the exogenous variables\\nbeing the previous log-prices, i.e., xt=yt−1. And the conditional mean\\nand covariance matrix are\\nµt=φ0+Πyt−1+p−1\\uf8fa\\ni=1˜Φirt−i, (2.52)\\nΣt=Σw, (2.53)\\nwhere the conditional covariance matrix is constant.\\nUnder the assumption that ytis at mostI(1), it is straightforward\\ntoconcludethattheterm Πyt−1intheabovemodel(2.49)isstationary,\\ntherefore, some linear combinations of ytmay be stationary. The term', metadata={'source': '/home/aktersnurra/projects/library/quant/math/a-signal-processing-perspective-on-financial-engineering.pdf', 'page': 40}),\n", - " Document(page_content='34 Modeling of Financial Time Series\\nΠyt−1is usually referred to as an error correction term and thus the\\nmodel is called a VECM. There are three interesting cases of Πyt−1:\\n1.rank(Π) = 0. This implies Π=0andytis not cointegrated since\\nthere is no linear combination of ytbeing stationary. Then the\\nVECM (2.49) reduces to a VAR( p−1) for the log-return time\\nseries rt.\\n2.rank(Π) =N. This implies Πis invertible. Then ytmust be\\nstationary already since rtandwtare both stationary and yt\\ncan be rewritten as a linear combination of rtandwtby left\\nmultiplying both sides of (2.49) by Πinverse. Thus, one can\\nstudy ytdirectly.\\n3.0