UV garch model forecasts

Discussions of ARCH, GARCH, and related models
TomDoan
Posts: 7700
Joined: Wed Nov 01, 2006 4:36 pm

Re: UV garch model forecasts

Unread post by TomDoan »

ac_1 wrote:
TomDoan wrote:With p=.01, the Poisson approximation to the binomial is MUCH better than the Normal. You can also do an exact calculation using the %BETAINC (incomplete beta) function:
compute p=.01,n=250
do i=0,10
   ?i %poisson(n*p,i) %betainc(1-p,n-i,i+1)
end do i
though there is no practical difference between the Poisson approximation and the exact calculation.
Thanks - Yes, it's a one liner:

report(atrow=5,atcol=6,fillby=cols) %if(ntrigger_1>=10.0,"Red",%if(ntrigger_1<=4.0,"Green","Yellow"))

How to proceed with the ES Traffic Light?
Your 10 and 4 are specific to a particular combination of N and alpha. Why would you restricted yourself that way?

The "ES Traffic Light" is (a) not really about the ES and (b) looks like gibberish (mainly because of (a)). What they are analyzing is not the "expected shortfall" (which would be a $ amount) but the observed percentile. If the distribution is thin-tailed, a loss of 10% over the VaR might give you a .50 value, while in a thick-tailed distribution, a loss of 50% over the VaR might give you a .25 value.
ac_1
Posts: 412
Joined: Thu Apr 15, 2010 6:30 am

Re: UV garch model forecasts

Unread post by ac_1 »

TomDoan wrote:
ac_1 wrote:
TomDoan wrote:With p=.01, the Poisson approximation to the binomial is MUCH better than the Normal. You can also do an exact calculation using the %BETAINC (incomplete beta) function:
compute p=.01,n=250
do i=0,10
   ?i %poisson(n*p,i) %betainc(1-p,n-i,i+1)
end do i
though there is no practical difference between the Poisson approximation and the exact calculation.
Thanks - Yes, it's a one liner:

report(atrow=5,atcol=6,fillby=cols) %if(ntrigger_1>=10.0,"Red",%if(ntrigger_1<=4.0,"Green","Yellow"))

How to proceed with the ES Traffic Light?
Your 10 and 4 are specific to a particular combination of N and alpha. Why would you restricted yourself that way?

The "ES Traffic Light" is (a) not really about the ES and (b) looks like gibberish (mainly because of (a)). What they are analyzing is not the "expected shortfall" (which would be a $ amount) but the observed percentile. If the distribution is thin-tailed, a loss of 10% over the VaR might give you a .50 value, while in a thick-tailed distribution, a loss of 50% over the VaR might give you a .25 value.
Yes, I am using a different size window than N=250.
ac_1
Posts: 412
Joined: Thu Apr 15, 2010 6:30 am

Re: UV garch model forecasts

Unread post by ac_1 »

TomDoan wrote: Fri Sep 01, 2023 9:49 am
ac_1 wrote: A few more questions:-

[A] Interpretation:

As coded in the rpf file, dlogdm=log(dm/dm{1}), log returns are time additive; the portfolio value is value=100, and ftrigger=VaR/value.
Now let's say e.g. VaR=2.6, this can be interpreted as 2.6% is at risk on the portfolio value: be it 1,000 USD, 10,000 USD or x USD in value. In otherwords, a probability p=0.01 (say) of losses >= to 2.6% on any USD sized portfolio. Correct?

E.g. For FX, from the point-of-view of a dollar investor, I would model USD/XXX, as that would be XXX per 1 USD, and based on the 100 USD portfolio the 2.6% loss would be in terms of USD. Correct?
Returns to USD/XXX and XXX/USD are signed opposites of each other. USD/XXX would give you USD per xxx (literally---that's what / means), not the other way around. In GARCHUV.RPF, the data are in USD/DM so, as written, that would be analyzing returns in holding DM's.

My analysis is from the point-of-view of a dollar investor, i.e. using dollars to invest in foreign currency.

I want to confirm the wording:
https://estima.com/webhelp/topics/garch ... casts.html : the investment would be a $100 US invested in DM.
https://estima.com/webhelp/topics/egarc ... terpf.html : returns to 100 DM
viewtopic.php?t=3645&start=15 : In GARCHUV.RPF, the data are in USD/DM so, as written, that would be analyzing returns in holding DM's
https://estima.com/webhelp/topics/garchbootrpf.html : returns to 100 yen

So those examples are using dollars to invest in foreign currency and being LONG XXXUSD.
Correct?

(Note the modern way is to quote currency pairs without the forward slash see: https://en.wikipedia.org/wiki/Currency_pair, and as an example click on forex tab https://tradingeconomics.com/)


If I have rawdata on USDJPY (the large number e.g. 145.00) i.e. Yen's per dollar, I would calculate:

set JPYUSD=1.0/USDJPY
set returns = 100.0*log(JPYUSD/JPYUSD{1})

that way round would make it easier to follow the garch examples above, and from them calculate VaR and ES analysis for a LONG position in JPYUSD. Correct?
And as per discussions in this topic for a SHORT [right-tail] position in JPYUSD.


In the market, the Yen dollar currency pair is typically traded having being quoted as USDJPY (the large number e.g. 145.00). So the analysis for JPYUSD would have reverse interpretations from the point-of-view of a dollar investor having traded USDJPY i.e.
- VaR and ES for LONG position in JPYUSD would be the same dollar amount for SHORT position in USDJPY
- VaR and ES for SHORT [right-tail] position in JPYUSD would be the same dollar amount for LONG position in USDJPY
Correct?
TomDoan
Posts: 7700
Joined: Wed Nov 01, 2006 4:36 pm

Re: UV garch model forecasts

Unread post by TomDoan »

The g10xrate file has all currencies quoted as USD value of a foreign currency unit whether that is the standard quotation or not.

set x = -100.0*log(usxjpn/usxjpn{1})

would give you the return to a long position of $100 US.

set x = +100.0*log(usxjpn/usxjpn{1})

would give you the return to a long position of 100 yen.

However, it doesn't really matter, does it? GARCHBOOT.RPF shows how to bootstrap returns to a long position of A in terms of B. As long as you understand what your data mean, you don't need to understand what the data in the example mean.
ac_1
Posts: 412
Joined: Thu Apr 15, 2010 6:30 am

Re: UV garch model forecasts

Unread post by ac_1 »

TomDoan wrote: Mon Aug 26, 2024 8:57 am The g10xrate file has all currencies quoted as USD value of a foreign currency unit whether that is the standard quotation or not.

set x = -100.0*log(usxjpn/usxjpn{1})

would give you the return to a long position of $100 US.

set x = +100.0*log(usxjpn/usxjpn{1})

would give you the return to a long position of 100 yen.

However, it doesn't really matter, does it? GARCHBOOT.RPF shows how to bootstrap returns to a long position of A in terms of B. As long as you understand what your data mean, you don't need to understand what the data in the example mean.

And for a SHORT position using right-tail analysis:

set x = -100.0*log( (1.0/usxjpn) / (1.0/usxjpn{1}) )

would give the return to a SHORT position of $100 US.

set x = +100.0*log( (1.0/usxjpn) / (1.0/usxjpn{1}) )

would give the return to a SHORT position of 100 yen.

Correct?
TomDoan
Posts: 7700
Joined: Wed Nov 01, 2006 4:36 pm

Re: UV garch model forecasts

Unread post by TomDoan »

log(1/x)=-log(x)
ac_1
Posts: 412
Joined: Thu Apr 15, 2010 6:30 am

Re: UV garch model forecasts

Unread post by ac_1 »

Sorry, I am unclear as to what x I use for the corresponding SHORT [right-tail] positions of $100 US and of 100 yen, respectively.
TomDoan
Posts: 7700
Joined: Wed Nov 01, 2006 4:36 pm

Re: UV garch model forecasts

Unread post by TomDoan »

Isn't a short on USD/JPY identical to a long on JPY/USD?
TomDoan
Posts: 7700
Joined: Wed Nov 01, 2006 4:36 pm

Re: UV garch model forecasts

Unread post by TomDoan »

G10XRATE is one of the data files used in Pritsker, Matthew (2006), "The hidden dangers of historical simulation," Journal of Banking & Finance, vol. 30, no. 2, pp 561-582 which might be helpful for you, since it looks at calculations of VaR.
ac_1
Posts: 412
Joined: Thu Apr 15, 2010 6:30 am

Re: UV garch model forecasts

Unread post by ac_1 »

TomDoan wrote: Sun Sep 01, 2024 5:14 pm G10XRATE is one of the data files used in Pritsker, Matthew (2006), "The hidden dangers of historical simulation," Journal of Banking & Finance, vol. 30, no. 2, pp 561-582 which might be helpful for you, since it looks at calculations of VaR.
Thanks.
Post Reply