Search found 20 matches

by Gregory
Fri Oct 17, 2008 4:37 pm
Forum: Examples and Sample Code
Topic: GARCH Forecasting with GARCHFORE and MVGARCHFORE
Replies: 4
Views: 13835

Re: GARCH Forecasting with GARCHFORE and MVGARCHFORE

* disp "Univariate Models" disp "VaR on Cisco" @20 -10000*q1 disp "VaR on Intel" @20 -10000*q2 disp "VaR Overall" @20 10000*q12 * I tried running this with my own series. Everything works fine until this point. I get NA for the VaRs. What does the @20 refer t...
by Gregory
Tue Aug 26, 2008 7:53 pm
Forum: Help With Programming
Topic: Need Example of Iterative Regressions
Replies: 2
Views: 8203

Thank you Tom,

Good stuff, particularly %testdiff and BREAK in (2) and the heads-up in (3).

Regards,

Gregory
by Gregory
Mon Aug 25, 2008 2:51 pm
Forum: Help With Programming
Topic: Need Example of Iterative Regressions
Replies: 2
Views: 8203

Need Example of Iterative Regressions

I'd like to do an iterative regression like the one shown below, and I'm hoping that someone can point me to an example. The basic idea is to feed fitted values from a second regression into the first until the coefficients or perhaps the R-squared of the first converge. Any suggestions would be mos...
by Gregory
Wed Aug 13, 2008 4:20 pm
Forum: Help With Programming
Topic: Creating Dynamic File Names Within a Do Loop
Replies: 2
Views: 8358

TomDoan wrote:It sounds as if that path doesn't exist.
You're absolutely right. Missing sub-folder. Thank you, Tom.

Gregory
by Gregory
Wed Aug 13, 2008 3:37 pm
Forum: ARCH and GARCH Models
Topic: A Sad Tale of Homemade Forecasts
Replies: 0
Views: 6737

A Sad Tale of Homemade Forecasts

I'm working with a tri-variate BEKK GARCH(1,1)-M model in which each of the three return series depend on their own current variance (similar to the one on page 431 of the User's Guide). It looks like this. The equation for H also accounts for asymmetries. (1) Return equations rx(t) = constantX + be...
by Gregory
Tue Aug 12, 2008 1:17 pm
Forum: Help With Programming
Topic: Creating Dynamic File Names Within a Do Loop
Replies: 2
Views: 8358

Creating Dynamic File Names Within a Do Loop

Not sure what I'm doing wrong here. I'd like to save results on each iteration of a Do loop and append the iteration number, i, to each file name. But when I run this code, I am prompted for a location to save, and the forward slashes in my file path have been converted to hyphens. declare string th...
by Gregory
Fri Aug 08, 2008 7:29 pm
Forum: Help With Programming
Topic: Nesting IF-ELSE Statements in a Do Loop
Replies: 4
Views: 10869

Crystal clear! Thank you.

Gregory
by Gregory
Fri Aug 08, 2008 9:04 am
Forum: Help With Programming
Topic: Nesting IF-ELSE Statements in a Do Loop
Replies: 4
Views: 10869

You don't need the "end if" when the if-else is inside a loop (or any other compiled structure). Is that the case even if I have other instructions that must be executed after the "end if"? That would mean that RATS uses the curly brackets to determine the contents of the IF blo...
by Gregory
Fri Aug 08, 2008 8:49 am
Forum: Help With Programming
Topic: Is There a Better Way to Save Series?
Replies: 2
Views: 8368

Thank you. I'll give it a shot.
by Gregory
Wed Aug 06, 2008 4:34 pm
Forum: Help With Programming
Topic: Is There a Better Way to Save Series?
Replies: 2
Views: 8368

Is There a Better Way to Save Series?

The variable coeffs is of type vector[series]. Is there a more elegant way to dump it to a file without having to write out coeffs(1), coeffs(2), and so on? open copy "myFilePath/myFileName.xls" copy(org=columns,format=xls) gEnd+1 lastObs $ coeffs(1) coeffs(2) coeffs(3) coeffs(4) coeffs(5)...
by Gregory
Wed Aug 06, 2008 3:05 pm
Forum: Help With Programming
Topic: Nesting IF-ELSE Statements in a Do Loop
Replies: 4
Views: 10869

Nesting IF-ELSE Statements in a Do Loop

I can't get the following to work. * Start of the main loop do i=1,10 * Now I want to do something conditional on iteration i. if i>1 { do j=1,n set residSeries(j) gEnd+i-1 gEnd+i-1 = rv(gEnd+i-1)(j) end do } else { do k=gStart,gEnd do j=1,n set residSeries(j) k k = rv(k)(j) end do end do } end if e...
by Gregory
Tue Aug 05, 2008 2:49 pm
Forum: ARCH and GARCH Models
Topic: Including Asymmetries Under the GARCH Instruction
Replies: 1
Views: 7265

Yes, it is. Answered my own question. I mistakenly specified the C matrix as lower diagonal rather than upper in my replication. Flip it, and you can reproduce RATS's H estimates.
by Gregory
Mon Aug 04, 2008 3:43 pm
Forum: ARCH and GARCH Models
Topic: Including Asymmetries Under the GARCH Instruction
Replies: 1
Views: 7265

Including Asymmetries Under the GARCH Instruction

Hello, I'm running a BEKK GARCH model with the asymmetric option, and I'm wondering whether anyone can confirm the specification of the asymmetric part used in the instruction. I'm assuming that it is GJR (1993) D' u(t-1) u'(t-1) D where u(t) = Min[0, e(t)], e(t) being the residuals from the mean eq...
by Gregory
Fri Jul 25, 2008 9:27 am
Forum: Other RATS Usage Questions
Topic: Reproducing Residuals
Replies: 2
Views: 8579

Good stuff. Thanks.
by Gregory
Thu Jul 24, 2008 4:16 pm
Forum: Other RATS Usage Questions
Topic: Reproducing Residuals
Replies: 2
Views: 8579

Reproducing Residuals

As a quick check of my work, I like to replicate the series of residuals returned by RATS by recalculating them using the estimated coefficients from the model I've run (from a GARCH model in this particular case). I find that my residuals are the same up to about five decimal places. Does this roun...