VAR AGARCH model (optimal weight, hedge ratio and Hedging )

Discussions of ARCH, GARCH, and related models
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

VAR AGARCH model (optimal weight, hedge ratio and Hedging )

Unread post by Imranyousaf09 »

I have estimated a spillover Between gold and stock market by using VAR AGARCH model. Now, I don't know, how to calculate optimal weight, hedge ratio and hedging effectiness for these two series in RATS 10. Attached article has first applied var Garch and then calculate optimal weights, hedge ratio and hedging effectiveness.

Kindly guide me, how can i calculate.
https://www.sciencedirect.com/science/a ... 931400385X
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

Those are all functions only of the time-varying covariance matrices, and are computed exactly the same way regardless of the type of multivariate GARCH model you use. For an example, see Sadorsky(2012).
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

Dear TomDoan,
I am first time user of RATS, and I have calculated a spillover between two series by using VAR AGARCH. Kindly guide me, what will be the different steps to calculate time varying variance of both gold and stock returns separately (and time varying covariance). After that, I will calculate weight and hedge ratio. Kindly guide me, what will be the code exactly.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

"Spillover" is irrelevant to those calculations---they depend only upon the covariance matrices at each time period.

With the covariance matrices saved into HH by the HMATRICES option on GARCH, this computes the hedge ratios:

Code: Select all

dec rect[series] hedges(%nvar,%nvar)
do i=1,%nvar
   do j=1,%nvar
      if i==j
         next
      set hedges(i,j) = hh(t)(i,j)/hh(t)(i,i)
   end do j
end do i
Portfolio weights can be computed with

Code: Select all

dec rect[series] weights(%nvar,%nvar)
do i=1,%nvar
   do j=1,%nvar
      if i==j
         next
      set weights(i,j) = $
        (hh(t)(j,j)-hh(t)(i,j))/(hh(t)(i,i)-2*hh(t)(i,j)+hh(t)(j,j))
      *
      * This constrains the positions to the range[0,1]
      *
      set weights(i,j) = %min(1.0,%max(0.0,weights(i,j)))
      *
   end do j
end do i
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

Thanks Tom Doan,
And how can I calculate hedging effectiveness?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

Isn't the hedging effectiveness just the squared correlation?
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

There is a attached documents having hedging effectiveness formula.

Now, kindly guide me, how can i calculate hedging effectiveness.
Attachments
IMG20190412200239.jpg
IMG20190412200239.jpg (4.89 MiB) Viewed 29197 times
IMG20190412200222.jpg
IMG20190412200222.jpg (4.17 MiB) Viewed 29197 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

That's the general formula for any type of hedging strategy with any type of portfolio. In this case (two assets, shorting one to hedge the other), I believe it's the squared correlation.
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

Dear Tom,
Kindly tell me, how can i calculate variance hedged and variance unhedged in RATS? What can be the code?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

Have you read Kroner Ng(1998), section 5, which describes the type of strategy being used? (The paper you cited is relying entirely on that).
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

Dear Tom,
I have calculated the spillover between Indo and gold returns. I attach the document having the code of estimation of VAR AGARCH. Now, I want to calculate weight, hedge ratio and hedging effectiveness. Kindly tell me, how can i calculate weight, hedge ratio and effectiveness, what should I write below VAR AGARCH code to calculate these three factors. I am new user, I run upper 2 codes(provided by you) , but I receive different errors. Kindly send me code in the same form as given in attached file to calculate weights, hedge ratio and hedging effectiveness between two series "Indo and gold".

Thanks
Last edited by Imranyousaf09 on Wed Apr 17, 2019 8:59 am, edited 1 time in total.
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

Simply, assume there are two series "indo" and "gold". Now tell me, what should write below VAR AGARCH command(as attached in last message) to calculate weight, hedge ratio and hedging effectiveness between these two series. Kindly tell me.

Thanks
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

Please do not attach a screen shot. I can't do a thing with that. Attach a program file (.rpf) and data file.

Are you a finance student? These are calculations that come from doing variance minimization on portfolios of two(!!) assets with zero means assumed. (As I said, read Kroner and Ng). If you have the covariance matrix out of the GARCH model (again, read Kroner and Ng) those are all simple calculations on the elements of the covariance matrix. If you use HMATRICES=HH, the conditional covariance matrix at time T is HH(T). It has three elements: HH(T)(1,1) is the variance of the first asset, HH(T)(1,2) is the covariance between them, and HH(T)(2,2) is the variance of the second asset.
Imranyousaf09
Posts: 9
Joined: Wed Apr 10, 2019 1:24 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by Imranyousaf09 »

I equate hmatrices with HH. But I am unable to calculate conditional variance of both series and confidence. I am beginner, I don't know, how to run code. Kindly elaborate me the procedure to calculate time varying conditional variance of both series and covariance?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VAR AGARCH model (optimal weight, hedge ratio and Hedgi

Unread post by TomDoan »

The conditional covariance matrices are saved using the HMATRICES option. (See the User's Guide). They're time-varying which means they produce time-varying portfolio weights and hedge ratios (and correlations and variances, ...). The Sadorsky paper does pairwise calculations using a 3 variable GARCH model. If you just have one pair of series, then (for instance) the hedge ratios both ways (again, these are time varying) would be

set hedge1with2 = hh(t)(1,2)/hh(t)(2,2)
set hedge2with1 = hh(t)(1,2)/hh(t)(1,1)

(if you saved the covariances matrices into HH---if you use a different name, replace it in those calculations).

I don't know what you mean by "confidence".
Post Reply