Quantitative Analysis, Risk Management, Modelling, Algo Trading, and Big Data Analysis

# Applied Portfolio VaR Decomposition. (3) Incremental VaR and Portfolio Revaluation.

Portfolios are like commercial aircrafts. Rely on computers. Dotted around the world. Vulnerable to ever changing weather conditions. Designed to bring benefits. Crafted to take risks and survive when the unexpected happens. As portfolio managers we have an ability to control those risk levels and adjust positions accordingly. The turbulences may occur anytime. A good pilot then knows what to do.

In Part 1 we implemented VaR analytical methodology to an exemplary 7-asset portfolio of equities deriving a running portfolio VaR, marginal VaR, and component VaR. In Part 2 we have examined an approximative impact of historical data on the covariance matrix estimation used in the portfolio VaR calculations.

Today, we will add a third component: an incremental VaR.

For a current portfolio holding $N$ assets with a total exposure of $C$ (dollars) we get a 95% portfolio VaR estimation simply computing:
$$\mbox{VaR}_P = 1.65 \sigma_P C = 1.65\left(\boldsymbol{d}’ \boldsymbol{M}_2 \boldsymbol{d} \right)^{1/2}$$ This can be estimated any time. For example, if we evaluate a portfolio of US stocks on the daily basis, and new data are available to be downloaded after 4pm when markets close, 1-day VaR can be recalculated. If it increases day-over-day and, say, one of component VaR behaves in an abnormal way (rising a warning flag), we may want to do something about that particular position: remove it completely or decrease the exposure.

A second scenario could be more optimistic. Say, we have extra cash to invest and we want to increase one (or few) currently held positions in our portfolio. Adding more shares of $i$-th asset in portfolio will increase portfolio VaR. The secret is in not pushing running engines too much and keep the oil temperature within acceptable brackets.

Alternatively, as a risk manager working in a global bank, the bank’s portfolio lists 10,453 open positions (across various markets and continents) and you have an incoming proposal of a new trade coming from one of the bank’s client. He wants to invest $\$$2,650,000 in highly illiquid asset. It is physically possible but the bank VaR may increase significantly over night. How much? Well, in this or any similar scenarios, you need to perform the portfolio revaluation employing the incremental VaR procedure. Your aircraft may be brand new but remember that big planes fall from the sky too. In general, by the incremental VaR we consider the difference between a new portfolio VaR (including (a) new trade(s) or a change in (a) current holding(s)) and recent portfolio VaR:$$ \mbox{iVaR}_P = \mbox{VaR}_{P+a} – \mbox{VaR}_P $$where a symbolises the proposed change. The incremental VaR changes in a non-linear way as the position size can be increased/reduced in any amount. That is the main difference as compared to the marginal VaR. It is possible to expand \mbox{VaR}_{P+a} in series around the original point, ignoring second-order terms if the deviations a are small:$$ \mbox{VaR}_{P+a} = \mbox{VaR}_{P} + (\Delta \mbox{VaR})’a + … $$and by “small” I mean a dollar change in (a) current holding(s) much much less than C under market exposure. In such case,$$ \mbox{iVaR}_P^{\rm approx} \approx (\Delta \mbox{VaR})’a $$and the apostrophe denotes the transposition of the vector. This approximation becomes important for really large portfolios (e.g. in banks) where revaluation and a new estimation of bank VaR needs to be derived quickly. A time saver at a reliable precision of landing. In all other cases, a new vector of extra exposures can be added to present position sizes and reevaluated. Let’s see how it works in practice! Case Study A: Increasing Position of One Asset Let’s recall the same initial settings as we have done in Part 1. We deal with 7-asset portfolio of US equities as of 12th of January, 2015. There is nearly 3 million dollars invested in stock market (I wish it were mine! ;) and based on 3-year historical data of all underlying stocks, the estimated 1-day 95% portfolio VaR is \$$33,027.94 as forecasted for the next trading day. Id est, there is 5% of chances that we can lose 1.1% of the portfolio value before English men in New York will rise their cups of tea: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 % Applied Portfolio VaR Decomposition. (3) Incremental VaR and Portfolio % Revaluation. % % (c) 2015 QuantAtRisk.com, by Pawel Lachowicz clear all; close all; clc; format bank %{ % Read the list of the portfolio components fileID = fopen('portfolio.lst'); tmp = textscan(fileID, '%s'); fclose(fileID); pc=tmp{1}; % a list as a cell array % fetch stock data for last 3 years since: t0=735976; % 12-Jan-2015 date2=datestr(t0,'yyyy-mm-dd'); % from date1=datestr(t0-3*365,'yyyy-mm-dd'); % to % create an empty array for storing stock data stockd={}; % scan the tickers and fetch the data from Quandl.com for i=1:length(pc) quandlc=['WIKI/',pc{i}]; fprintf('%4.0f %s\n',i,quandlc); % fetch the data of the stock from Quandl % using recommanded Quandl's command and % saving them directly into Matlab's FTS object (fts) fts=0; [fts,headers]=Quandl.get(quandlc,'type','fints', ... 'authcode','YourQuandlCode',... 'start_date',date1,'end_date',date2); stockd{i}=fts; % entire FTS object in an array's cell end save data %} load data % limit data to 3 years of business days, select adjusted % close price time-series and calculate return-series rs=[]; for i=1:length(pc) cp=fts2mat(stockd{i}.Adj_Close,0); rv=cp(2:end,1)./cp(1:end-1,1)-1; rs=[rs rv(end-(3*5*4*12):end)]; end rs(isnan(rs))=0.0; % covariance matrix M2=cov(rs) % an initial dollar expose per position d=[ 55621.00; ... 101017.00; ... 23409.00; ... 1320814.00; ... 131145.00; ... 321124.00; ... 1046867.00] % invested capital of C C=sum(d) % the portfolio volatility vol_P=sqrt(d'*M2*d); % diversified portfolio VaR VaR_P=1.65*vol_P % volatility of assets (based on daily returns) v=sqrt(diag(cov(rs))); % individual and undiversified portfolio VaR VaRi=1.65*abs(v.*d); uVaR_P=sum(VaRi); % the portfolio betas beta=C*(M2*d)/vol_P^2; % the portfolio marginal VaR DVaR=1.65*(M2*d)/vol_P; % the component VaR cVaR=100*DVaR.*d/VaR_P; % [percent] cVaRd=DVaR.*d; % dollars Now, we want to add$\$$10,000 to our exposure in Walt Disney Co. stock. As of Jan/12 2015 DIS closes at \$$94.48 therefore we consider to buy $\$$10,000/\$$94.48=105.8 shares on the next day. We are flexible so we buy at the market price of$\$$95.23 on Jan/13, i.e. extra 105 shares in DIS. Therefore we added 105\times \95.23 or \$$9,999.15 to our portfolio:

89 90 91 92 93 94 95 96 % proposed changes to current exposure da=[0; ... 9999.15; ... 0; ... 0; ... 0; ... 0; ... 0 ];

Of course we can assume a new portfolio VaR estimation by adding extra 105 shares of DIS. In real weather conditions, this number can be lower. Keep that in mind.

The remaining part seems to be easy to code:

100 101 102 103 104 105 106 107 108 109 % new portfolio VaR VaR_Pa=1.65*sqrt((d+da)'*M2*(d+da)) % incremental VaR iVaR=VaR_Pa-VaR_P; % incremental VaR (approximation; see text) iVaR_approx=DVaR'*da;   % new component VaR ncVaR=100*DVaR.*(d+da)/VaR_P; % [percent] ncVaRd=DVaR.*(d+da); % dollars

followed by a new risk report on the impact of proposed changes:

111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 fprintf('Current exposure:\t\t\t $%1s\n',bankformat(C)); fprintf('Current Portfolio VaR (diversified):\t$%1s\n',bankformat(VaR_P)); fprintf('Proposed changes in holdings:\n'); for i=1:length(d) fprintf(' %s\t $%-s\n',pc{i},bankformat(da(i)) ); end fprintf('New Portfolio VaR (diversified):\t$%1s\n',bankformat(VaR_Pa)); fprintf('Incremental VaR:\t\t\t $%1s\n',bankformat(iVaR)); fprintf('Incremental VaR (approximation):\t$%1s\n',bankformat(iVaR_approx)); fprintf('Change in exposure:\t\t\t %-1.4f%%\n',sum(da)/C); fprintf('Component VaR:\n'); fprintf('\t Current\t\t New\t\t\tChange in CVaR\n'); for i=1:length(d) fprintf(' %s\t%6.2f%% $%-10s\t%6.2f%%$%-10s\t$%-10s\n', ... pc{i},cVaR(i), ... bankformat(cVaRd(i)),ncVaR(i), ... bankformat(ncVaRd(i)),bankformat(ncVaRd(i)-cVaRd(i)) ); end In this case study, the report says: Current exposure:$2,999,997.00 Current Portfolio VaR (diversified): $33,027.94 Proposed changes in holdings: AAPL$0.00 DIS $9,999.15 IBM$0.00 JNJ $0.00 KO$0.00 NKE $0.00 TXN$0.00 New Portfolio VaR (diversified): $33,084.26 Incremental VaR:$56.31 Incremental VaR (approximation): $55.84 Change in exposure: 0.0033% Component VaR: Current New Change in CVaR AAPL 0.61%$202.99 0.61% $202.99$0.00 DIS 1.71% $564.13 1.88%$619.97 $55.84 IBM 0.26%$84.43 0.26% $84.43$0.00 JNJ 30.99% $10,235.65 30.99%$10,235.65 $0.00 KO 1.19%$392.02 1.19% $392.02$0.00 NKE 9.10% $3,006.55 9.10%$3,006.55 $0.00 TXN 56.14%$18,542.15 56.14% $18,542.15$0.00

That’s the great example to show how the approximation of the incremental VaR works in practice. $\$$10,000 added to DIS is “small” as compared to C of nearly 3 million dollars in the game. By adding 105 shares of DIS we didn’t move 1-day portfolio VaR significantly which is good. Let’s play again. Case Study B: Increase and Decrease Exposure From the initial risk report we learnt that TXN contributed most to the overall portfolio VaR. Let’s say we have extra \$$126,000 to invest and we think that AAPL would be the next shining star. In the same time, we want to reduce our market exposure to TXN by selling stocks of the total worth of$\$$500,000. This operation would be denoted as: 89 90 91 92 93 94 95 96 % proposed changes to current exposure da=[126000; ... 0; ... 0; ... 0; ... 0; ... 0; ... -500000 ]; and Current exposure: 2,999,997.00 Current Portfolio VaR (diversified): 33,027.94 Proposed changes in holdings: AAPL 126,000.00 DIS 0.00 IBM 0.00 JNJ 0.00 KO 0.00 NKE 0.00 TXN -500,000.00 New Portfolio VaR (diversified): 25,869.04 Incremental VaR: -7,158.90 Incremental VaR (approximation): -8,396.16 Change in exposure: -0.1247% Component VaR: Current New Change in CVaR AAPL 0.61% 202.99 2.01% 662.85 459.85 DIS 1.71% 564.13 1.71% 564.13 0.00 IBM 0.26% 84.43 0.26% 84.43 0.00 JNJ 30.99% 10,235.65 30.99% 10,235.65 0.00 KO 1.19% 392.02 1.19% 392.02 0.00 NKE 9.10% 3,006.55 9.10% 3,006.55 0.00 TXN 56.14% 18,542.15 29.33% 9,686.13 -8,856.02 The incremental VaR reacts to a massive sell out of TXN reducing the overall portfolio VaR significantly. Adding \$$126k to APPL (share number precision omitted for the sake of simplicity) does not affect the portfolio risk levels in any dramatic way.

Case Study C: Adding Two New Assets

Your are a child of a new era, the era of credit cards. More and more people use them worldwide. You have this brilliant idea to add to your portfolio extra \$\$$100,000 invested in (split equally between) Mastercard Inc. and Visa Inc. Considering such an operation requires a new portfolio revaluation. Let’s do it step by step. First, let’s fetch historical data for both MA and V stocks, the same way as we did it at the very beginning. We save the tickers names in a separate file named proposal.lst: MA V We supplement out Matlab code with extra few lines: 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 % Read the list of the portfolio components fileID = fopen('proposal.lst'); tmp = textscan(fileID, '%s'); fclose(fileID); pcE=tmp{1}; % a list as a cell array % fetch stock data for last 3 years since: t0=735976; % 12-Jan-2015 date2=datestr(t0,'yyyy-mm-dd'); % from date1=datestr(t0-3*365,'yyyy-mm-dd'); % to % create an empty array for storing stock data stockd={}; % scan the tickers and fetch the data from Quandl.com for i=1:length(pcE) quandlc=['WIKI/',pcE{i}]; fprintf('%4.0f %s\n',i,quandlc); % fetch the data of the stock from Quandl % using recommanded Quandl's command and % saving them directly into Matlab's FTS object (fts) fts=0; [fts,headers]=Quandl.get(quandlc,'type','fints', ... 'authcode','YourQuandlCode',... 'start_date',date1,'end_date',date2); stockdp{i}=fts; % entire FTS object in an array's cell end save datap %} load datap % limit data to 3 years of business days, select adjusted % close price time-series and calculate return-series rsp=[]; for i=1:length(pcE) cp=fts2mat(stockdp{i}.Adj_Close,0); rv=cp(2:end,1)./cp(1:end-1,1)-1; rsp=[rsp rv(end-(3*5*4*12):end)]; end rsp(isnan(rsp))=0.0; As quickly as new data arrive, we build and extend return-series matrix, now not 721×7 but 721×9 in its dimensions: 171 rsE=[rs rsp]; What follows is pretty intuitive in coding: 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 % covariance matrix M2E=cov(rsE); % proposed changes to current exposure daE=[0; ... 0; ... 0; ... 0; ... 0; ... 0; ... 0; ... 50000; ... 50000 ]; % new portfolio VaR d=[d; 0; 0] % we have to extend it to allow d+daE VaR_PaE=1.65*sqrt((d+daE)'*M2E*(d+daE)) % a running list of tickers, too pcE=[pc; pcE] % incremental VaR iVaRE=VaR_PaE-VaR_P; fprintf('Current exposure:\t\t\t %1s\n',bankformat(C)); fprintf('Current Portfolio VaR (diversified):\t %1s\n',bankformat(VaR_P)); fprintf('Proposed changes in holdings:\n'); for i=1:length(daE) fprintf(' %s\t %-s\n',pcE{i},bankformat(daE(i)) ); end fprintf('New Portfolio VaR (diversified):\t %1s\n',bankformat(VaR_PaE)); fprintf('Incremental VaR:\t\t\t %1s\n',bankformat(iVaRE)); generating new risk estimations: Current exposure: 2,999,997.00 Current Portfolio VaR (diversified): 33,027.94 Proposed changes in holdings: AAPL 0.00 DIS 0.00 IBM 0.00 JNJ 0.00 KO 0.00 NKE 0.00 TXN 0.00 MA 50,000.00 V 50,000.00 New Portfolio VaR (diversified): 33,715.09 Incremental VaR: 687.15 From this example we can see that extending our portfolio with two assets would lead us to the increase of 1-day portfolio VaR by approximately \$$680. A digestable amount.

Stay tuned as in Part 4 we go extreme with Extreme VaR.

Endnote

When you pilot an aircraft from Amsterdam to Tokyo, the path is usually over Norway, North Pole, and eastern Russia. If one of the engines goes down, you switch it off and ground the plane at the nearest airport. The risk in a commercial aviation is too high to continue the flight.

As a portfolio manager you deal with similar situations but you do not necessarily close your portfolio at once. Instead, you reduce the risk to troublesome assets. You can still fly in the markets but with reduced thrust and hopes for big gains. But don’t worry! Every plane lands with its nose up towards the sky. You can be losing but stay positive till the very end. You never know when cross-winds will change your situation. You may be in the game again before the bell will close the session.