$BI
FIL

FIL

(slelelelelslelelelsieleizie)

a000000

200

FILE 18CKIND=DISK, TITLE
FILE 99(KIND=REMOTE,MYUSE=OUT)

-18-

$SET _LINEINFO
SRESET FREE LIST
$SET AUTOBIND

ND=FROM XNAGF/=;
E 19(KIND=DISK,TITL

INFILE', FILETYPE=7 )
="OUTFILE',PROTECTION=SAVE)

E 98CKIND=REMOTE,MYUSE=IN)

THIS IS THE "JAB" PROGRAM WRITTEN BY G.P. AUSTIN, W. BUITER
AND ROBERT JOHNSON. ONE MUST HAVE THE N.A.G. LIBRARY TO BE ABLE
TO IMPLEMENT THIS PROGRAM.

IMPLICIT REAL%8(A-H,0-Z)

REALX8 E1(24,24),E2(24,24),E3(24,24),E4(24,24),E5(24, 24)
1,66(24,24),E7 (24,24), E8(24,24),F1(24,24) ,F2(24, 24), F3(24, 24), F4(24
1,24), B(24,24),2(24, 24), WKSPCE(24) , FOLDAF,X,Y,2Z,1,CR,CI,XEND

COMPLEX¥16 C1(24,24),C2(24,24)
1 ,C3€24,24) ,C4( 24,24) ,C5( 24,24) ,C6( 24,24) ,C7( 24,24) ,C8C
124,24) ,C9(24, 24) ,C10(24,24),C11(24,24),C12(24, 24) ,C13(24
1,24),C€14(24,24),C15(24, 24) ,C16 (24,24) ,CC(24,24),CX

INTEGER INTGER(24),N1,N2,N3,NZ,NSR,NUSR,NIC,IA

CHARACTER®128 INFILE,OUTFILE

PRINT, "WHAT IS YOUR DATA FILE CALLED*®

READC98,%)INFILE

OPEN(19, FILE=INFILE, FORM="FORMATTED' )

PRINT, "WHERE SHOULD I WRITE THE OUTPUT*

READ(98,%)OUTFILE

OPEN (18,FILE=OUTFILE, FORM="FORMATTED! )
READ(19,*)N1,N2,N3,NZ

TA=MAXOCN1,N2,N3,NZ)

READ SIZE OF MODEL AND PASS LARGEST DIMENSION TO ALL SUBROUTINES

164 tb SUBS CEI, 2, £3, E4,E5,E6,E7,€8,F1,F2,F3,F4,B,Z,WKSPCE,C1,C2,C3,

C4,C5,C6,C7,

1 €8,C9,510,C11,C12,C13,C14,C15,C16,CC,CX, INTGER,N1,N2,N3,NZ,IA)
RETURN

END

SUBROUTINE SUBS(E1,E2,E3,£4,E5,£6,£7,E8,F1,F2,F3,F4,B,Z,WKSPCE,Cl,

1€2,C3,C4,C5,C6,

1_C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,CC,CX, INTGER,N1,N2,N3,NZ,IA)
IMPLICIT REAL®8(A-H, 0-Z)

REALX8 E1(IA,IA),E2CIA,IA),E3CIA,IA),E4CIA,IA),E5CIA,IA)

1,E6CIA,IA),E7(IA,IA),

1 E8CIA,IA),FICIA,IA),F2CIA,IA),F3CIA,IA),F4CIA,IA),BCIA,IA),ZCIA,I

1A),WKSPCECIA)

FOMBLEXx16 C1CIA,IA),C2CIA,IA),C3CIA,IA),CGCIA,IA),C5CIA,IA),C6(
A,IA)D,

1 C7CTA,IA),C8CIA,IA),C9CIA,IA),CLOCIA,IA),C1ICIA, IA),

1 C12(TA, IA), C13CIA,IA),C14CIA,IA),C15(IA,1A),C16C(IA, IA),

1 CCCIA,IA),CX

REALX8 BLANK 7? s

INTEGER IA,N1,N2,N3,NZ,NUSR, NIC, IFLAG,KSTR, INTGER

DIMENSION INTGER(IA)

FORMAT(1X,A6)

FORMAT(/* SOLN. TO MATRIX A',/)

FORMAT(/* SOLN. TO MATRIX B",7)


-12-

Thus

ACES) 94g *h * Diz -z]

tty -
feo mie K+1 2K

-1,A,(s-tk)
to 2 e2

becomes
Wii¥x Dl2K+1 - 2KI,

where yx is an N, *(N-N,) matrix whose element 6, o equals,
K 1 1

ra 6 Or,
0 attet ty) hy (tot) 9 glla(to-ty)

i ,8,0°°6, 1.

Now for every K from 1 to J there will be an expression of this type.

Thus the contribution of these past terms can be expressed as

(28)

RNG

a YK Dla.) ~ I.

The final set of terms are derived from the elements of

f(s)! which are of the form a5 'bze and they evaluate to expressions of

the form,

J
(29). - Ww Cag! ® meets (trty eg Ay (tty) Dz, 44].

feo 12 1

J+
and finally between tj and t one must evaluate the component of f(s)y

of the form A5'Dz which integrates to become

J+

(30) Wy,Cag! * CAT! eM Cre) aD ee


-22-

Nw
Q
°
z
a
4
z
cS
m

CONTINUE
IF (2Z.GT.0)GO TO 11

SORT THE E-VALUES INTO ASCENDING ORDER AND ARRANGE THE
E-VECTORS CONFORMALLY.

WRITEC18,99995) BLANK
WRITE(18,240)
WRITEC18,100)(E2(1,1),1=1,N1)
WRITEC18,99995) BLANK
WRITE(18,250)
WRITEC18,100)(E3(I,1),I=1,N1)
WRITEC18,99995) BLANK
WRITE(18,260)
DO 59 I=1,N1

59 WRITE(18,100)CE4(I,J),J=1,N1)
WRITEC18,99995) BLANK
WRITEC18,270)
DO 888 I=1,N1

338 WRITEC18,100)(F1(I,J),J=1,N1)

9000 He

c WRITE THE E-VECTORS AND E-VALUES TO THE OUTPUT FILE.
c

WRITEC18,99995) BLANK

NSR=0

DO 14 I=1,N1

IF CE2(I,1).LE. O)NSR=NSR41
14 CONTINUE

“C
c FIND THE NUMBER OF STABLE ROOTS.
c
NUSR=N1-NSR
DO 15 I=1,N1
DO 15 J=1,N1
X=E4(I,J)
Y=FICI,J)
: C1CI,J)= DCMPLX(X,Y)
C2CI,J)= DCMPLX(X,Y)
15 C3C(T,J)= DCMPLX(X,Y)
DO 16 I=1,NSR


where Ait» Viz, and Wy, are Ny * Ny matrices.
A12» Vi2, and Wy2 are Ny * (N-Ny) matrices.
Aa1» Vai and Wo, are (N-N,) * Ny, matrices.
A22> V2 and W22 are (N-Ny) * (N-Ny) matrices.
Ay, is an Ny * Ny matrix containing the stable roots of A.

Ag is an (N-Ny) * (N-Ny) matrix containing the unstable roots

of A.
By is an Ny * K constant matrix.

Ba is an (N-N;) * K constant matrix.

Let variables p and q be defined as follows.
Pp x x 1 p

4 =V r =V- .

(4) (Q ) f) cre) (y
p is an Ny vector and q and N-N, vector.

Substituting expression (2) for A, and taking the expectation

of (1) yields,

Ey k(t) | yy Ey x(t)
(5) E y(t) VOT AV Eg y(t) + BE, z(t).
Premultiplying both sides of equation (5) by V using the

definitions presented in (4) and partitioning the A, V and B matrices as

in (3) one obtains.

E, p A, 0 E, P(t) Vv Vv B
(6) t a(t) | = TA t + W112 1 | E 2(t).
EE be] 0 ] EL a(t) | E i | E ] t

Let
(1) D = V21By + VooBo.


-19-

220 FORMAT(/* SOLN. TO MATRIX C',/)
230 FORMAT(7# SOLN. TO MATRIX D',7)
240 FORMAT(7* = REAL_PART OF THE EIGENVALUES OF MATRIX A',/)
250° FORMAT(7* IMAGINARY PARTS OF THE EIGENVALUES OF MATRIX A',/)
260 FORNAT(* REAL PARTS OF THE EIGENVECTORS OF MATRIX A (BY COLUMN)
Lis
270 " FORMAT(/* IMAGINARY PARTS OF THE EIGENVECTORS OF MATRIX A'/)
280 FORMAT(/* SOLN. TO XBAR’,/)
290 FORMATC/* SOLN. TO XBARBAR',/)
300 FORMATC/* SOLN: TO YBAR',/)
310 FORMAT(/* SOLN. TO YBARBAR',/)
320 FORMATC' — A PROGRAM FOR SOLVING FOR THE BEHAVIOUR OF LINEAR ',/*
L_ RATIONAL EXPECTATION MODELS ON THE STABLE MANIFOLD! ,//)
550 FORMATC? DATA SUPPLIED ....£1,£2,£3,E4,E5,E6,E7,8, EXOGENOUS Z
L_VECTORS*, 777
100 FORMAT(1X,16(F13.6))
199 FORMATCLX, 16(F10.6))
4 I=1,
CCCI, 1)= DCMPLX¢1.0D0,0.0D0)
g4 BEL, D=1.0
¢€ SET ELEMENTS OF CC AND B FOR LATER INVERSION ROUTINES
c
READ(19,%)(CE1CI,J),J=1,N1),
READ(19,%)((E2(I,J),J=1,N1),
READ(19, x) ((E3(I,J),J=15N2),
READ(19,%)(CEGCI,J),J=15N3)>
READ(19,x)(CE5(I,J),J=1,N1)>
READ(19,%)((E6(I,J)/J=1,N1)>
READ(19,%)(CE7(I,J),J=1,N2)>
READ(19,%)((E8(I,J),J=1,N3),
READC19,X)((2C1,J),J=1, NZ) 1
TFAIL=0
c
¢ SET ALL NAG ROUTINES TO TAKE IFAIL PARAMETER AS ZERO
Cc
WRITE(18, 320)
WRITE(18, 99995) BLANK
WRITEC18, 33
WRITEC18;99995) BLANK
1 I=
WRITE(18,100)¢E1¢I,J),J=1,NL)
81 CONTINUE
WRITEC18, 99995) BLANK
I=1,
5 WRITECI8,100)CE2CT, J), J=1,N1)
2 CONTINUE
: WRITECL8,99995) BLANK
D =i,N
WRITE(18,100)(E3(I,J),J=1,N2)
83 CONTINUE
WRITECLS 99995) BLANK
D T=i
8 WRITEC8, 100)CB4(T, J), J=1,N3)
CON
: WRITECI8, 99995) BLANK
85 I=
WRITECI8,100)CE5(T, J), J=1,N1)
85 CONTINUE


88882

88885,

888384

30
31

32. Y=

33

52
c
c
c

993

99993

35
38

500

780

42
989

988

-25-

WRITE(18,88882)

FORMATC * COEFFICIENT MATRIX F2")
WRITE(18,100)(CF2(I,J),1= 1, M),J=1,NIC)
WRITE(18,99995) BLANK

WRITE(18, 88883)

FORMAT C * COEFFICIENT MATRIX F3" )
WRITE(18,100)(CF3(1,J),1=1,M),J=1,NUSR)
WRITEC18,99995) BLANK

WRITEC18,88884)

FORMATC " R.H.S. VECTOR F* )
WRITEC18,100)(F4(I,1),I=1,M)
WRITE(18,99995) BLANK

CALL FOGAEFCF1,1A,B,1IA,M,M,E2,IA,WKSPCE,E4,1A,E5,1A,IFAIL)

CALL FOICKF(E6,F3,E3,IA,1A,IA,WKSPCE, IA, IOPT,IFAIL)
DO 30 I=1,M

NIC] = NIC+1

DO 30 J=NIC1,NSR

K=J-NIC
F1CI,K)=FOLDAFCL,M,X,1,J,E2,1A,E6,IA,N)
DO 31 I=1,M
F1CI,ID=F1CI,I)+1.0

DO 33 I= 1M

Y=0.0

DO 32 _J=1,NIC
Y+CF2(I,J)+E6C1,J))XE10J,1)
F2¢1,1)=Y

Abe POGAEFCF1,1A,B,IA,M»M,E6,1A,WKSPCE, E4,1A,E5,1A,IFAIL)

IOPT=

CALL Fouckece, E6,E2,1A,1A,IA,WKSPCE,IA,IOPT,IFAIL)
E2(1,1)=0.

SET TCO) TO BE ZERO

WRITEC99,993)

FORMAT(/* WHAT ARE THE TRANSITION TIMES FOR THE Z(I)?")
READ(98,*)CE2(1I,1),1=2,NZ)

WRITE(18,99993) (E2C€I,1),1=2,NZ)

FORMAT(/" TRANSITION TIMES FOR THE ZCI) GIVEN AS := '7
® (10F13.6)7)

E2(NZ+1,1)=1000.0

IF(M.EQ.0)GOTO 780

CALL A2(C2,C11,CC,E2,C5,C13,C14,C15,C16,£5,C9,CX,X,NZ,
1_NUSR,N3,IA,L)

DO 35 I=1,M

F3CI, gsr FOLDAFCL, NUSR,X,1I,L,F3,1A,E5,1A,N)

DO 38

EICEENIC. ie FOIDAFC(L,M,X,I,L,E6,1A,F3,1A,N)

DO 34 I=1,M

E1CI+NIC,1)=E1CI+NIC,1)-FOIDAFC(L,M,X,1,L,E6,1A,F2,1A,N)

4 ELCI+NIC,1)=E1CI+NIC,1)+FO1DAFC(L,M,X,1,L,E6,1A,F4,1A,N)

DO 42 I= i,NSR

C7(I,1)= DCMPLX(0.0D0,0.0D0)

DO 42 J=1,NSR

C7(1,1)= DCMPLXCE1(J,1),0.0D0)*C6(1,J)+C7(1,1)
WRITE(99,989)

FORMAT(7' HOW MANY TIME PERIODS TO INTEGRATE OVER?")
READ(98,%)NN

WRITE(99, 988)

FORMAT(/" HOW BIG A TIME PERIOD?")

READ(98,%)XEND


636

501

502

637

20

55

56

57

o00u
00

CONTINUE
WRITE(18,99995) BLANK

MANIPULATE THE E MATRICES TO GIVE SOLN. TO A,B,C,D

WRITEC18,99995) BLANK
WRITEC99, 501)

FORMAT(“" SOLN TO XBAR')
WRITEC99,100)CE1(J,1),J=1,N1)
WRITEC18,99995) BLANK
HWRITEC99, 502)

FORMAT(4" SOLN TO XBARBAR')
WRITEC99,100)CE1(J,NZ),J=1,N1)
WRITEC18,280)
WIRITEC18,100)CE1(J,1),J=1,N1)
WRITEC18,99995) BLANK
WRITEC18,290)
WRITEC18,100)CE1(CJ,NZ),J=1,N1)
WRITE(18,99995) BLANK
WRITEC18,300)
WRITEC18,100)CE2€J,1),J=1,N2)
WRITEC18,99995) BLANK
WRITEC18,310)
WRITEC18,100)CE2(J,NZ),J=1,N2)
WRITE(18,99995) BLANK

DO 637 I=1,1A
DO 637 J=1,1A
E1CI,J)=-El(I,J)
CONTINUE

-21-

NRITE SOLN. TO XBAR,XBARBAR, YBAR, YBARBAR

WRITEC18,200)

0.55 I=1,N1
WRITEC18,100)CE5(I,J),J=1,N1)
CONTINUE

WRITEC18,99995) BLANK
WRITEC18,210)

DO 56 I=1,N1
WRITE(18,100)(E6(I,J),J=1,N3)
CONTINUE

WRITEC18,99995) BLANK
WRITEC18,220)

DO 57 I=1,N2
WRITE(18,100)CE7(1,J),J=1,N1)
CONTINUE

WRITEC18,99995) BLANK
WRITE(18,230)

DO 58 I=1,N2
WRITE(18,100)CE8(I,J),J=1,N3)
CONTINUE

WRITE A,B,C,D TO OUTPUT FILE.

)O0 10 I=1,N1

DO 10 J=1,N1
12C1,J)=DCMPLXCE5(1I,J),0.0D0)
NRITEC18,99995) BLANK

CALL FO2AGFCES,IA,N1,E2,E3,E4,1A,F1,1A,INTGER,IFAIL)
TO FIND THE E-VALUES AND VECTORS OF MATRIX A


-16-

References
Austin, G. P., and Willem H. Buiter: "Saddlepoint" A Programme for
Solving Continuous Time Linear Rational Expectations Models",
University of Bristol Discussion Papaer No. 82/132, November,
1982.
Buiter, Willem H., "Saddlepoint Problems in Continuous Time Rational
Expectations Models: A General Method and Some Macroeconomic

Examples," Econometrica, Vol. 52 (May 84), pp. 665-80.


Section III

We can now examine the components of the solution for x(t) and
y(t). First the solution for x(t) is developed and then the solution to
y(t) is analyzed.

To develop a solution that is analytically tractable and that
can be implemented on computer I will limit the elements of the forcing
vector to change only in steps.

Z=Zy for t $ to,

2=2, for to < ts ty,

Z=Zo for ty < ts to,

Z=Z; for ti-1 < ts ty,

Z=Z@ for th < t Sa,

Where n= the number of columns in the Z matrix minus one.

The solution to x(t) has three components. The first,
representing the n; vector of initial conditions, can be evaluated
without manipulation. The second term represents the influence of the

foreing vector from the initial time to, to time to the present.

t Ay(t-s), -1
Seo W142 Wy, B,2(s)ds.

If the forcing vector is constant between sucessive Points as assumed

above then this integral becomes

J
(21) “Wasa +

-1 teM (t-ty dieM (t-ty-4 yey
i=1

1

cwooattpaee At (t-t3)
Way [1-e J Jaye.


IFDP
NUMBER

276

275

274

273

272

271

270

269

268

267

266

31

International Finance Discussion Papers

TITLES

1986

Post~simulation Analysis of Monte Carlo
Experiments: Interpreting Pesaran's (1974)
Study of Non*nested Hypothesis Test Statistics

A Method for Solving Systems of First Order
Linear Homogeneous Differential Equations
When the Elements of the Forcing Vector
are Modelled as Step Functions

International Comparisons of Fiscal Policy:
The OECD and the IMF Measures of Fiscal
Impulse

An Analysis of the Welfare Implications of

Alternative Exchange Rate Regimes: An

Intertemporal Model with an Application
1985

Expected Fiscal Policy and the Recession

of 1982

Elections and Macroeconomic Policy Cycles

Assertion Without Empirical Basis: An
Econometric Appraisal of Monetary Trends
in... the United Kingdom by Milton Friedman

and Anna J. Schwartz

Canadian Financial Markets:
Proposal for Reform

The Government's

Was It Real? The Exchange Rate Interest
Differential Relation, 1973-1984

The U.K. Sector of the Federal Reserve's
Multicountry Model: The Effects of
Monetary and Fiscal Policies

Optimal Currency Basket in a World of
Generalized Floating: An Application to
the Nordic Countries

———_—__________

Please address requests for co
Papers, Division of International F
the Federal Reserve Board, Washington, D.C.

20551.

AUTHOR(s)

Neil R. Ericsson

Robert A. Johnson

Garry Schinasi

Andrew Feltenstein
David Lebow
Anne Sibert

William H. Branson
Arminio Fraga
Robert A. Johnson

Kenneth Rogoff
Anne Sibert

David F. Hendry
Neil R. Ericsson

Garry J. Schinasi

Richard Meese
Kenneth Rogoff

Hali J. Edison

Hali J. Edison
Erling Vardal

pies to International Finance Discussion
inance, Stop 24, Board of Governors of


15

11

12
10

112

lll

ne

1

-28-

FCJ,N)=DCMPLX( (XXXZR-YXZI) , CXXXZI+YXZR) )
GOTO 23

DO 11 J=1,NSR

DO 11 N=1,NUSR

XX=1.0

X=DREALCBCN,N)-ACJ,J))

Y=DIMAGCB(N,N)-ACJ,J))

CALL AO2ACF(XX,TT,X,Y,ZR,Z1)
X=DREAL(CCN,N))-CDREALCDCJ,J)))¥CDREALCECN,N) ) )-CDIMAGC DCJ, J) )*
% CDIMAGCECN,N)))

Y=DIMAGC(CCN,N) )~CDREAL CDC J,J)) XC DIMAGCECN,N)) )-CDIMAGCD(J,J)))*
% CDREALCECN,N)))

XX=DREAL (GC J,N) )¥X-DIMAG(GCJ,N))*Y
Y=DIMAG(GCJ,N))*X+DREAL(GCJ,N) )*Y

FCJ,N)=DCMPLX( (XXX¥ZR-YXZI) , (XXXZI+YXZR) )

CONTINUE

RETURN

END

SUBROUTINE AGC(A,B,C,D,E,F,G,H,P,Q,R,S,U,CX,T,NUSR,NSR,N3,NZ,IA,L)
IMPLICIT REAL%8(A~H,0-Z)

COMPLEXX%16 ACIA,IA),BCIA,IA),CCIA,IA),D(IA, IA), ECIA,IA),

1 GCIA, IA), HCIA, IA), PCIA, IA), QCIA, IA), RCIA, IA),SCIA,IA),CX

REAL%8 FCIA),UCIA,IA),T,CR,CI

DO 11 I=1,NSR

UCI,1)=0.

UCI,2)=0.

KFLAG=1200

DO 12 I=1,NZ

IFC(T.GE.FCI) .AND.T.LT.FCI+1) )KFLAG=I

CONTINUE .

I=NZ

CALL A3C(A,B,P,Q,R,G,D,F,I,T,NUSR,NSR,L,IA,KFLAG)
DO 3 J=1,NSR

DO 3 K=1,N3

CALL FOIDDFC(L,NUSR,CX,J,K,G,1A,E,IA,N,CR,CI)
HCJ,K)=DCMPLX(-CR,-CI)

N3
CHPLXCDREAL (CJ, K) )-DREAL(C(J,1)), 0. 0D0)

CALL FOIDDF(L,N3,CX,J,L,H,IA,G,IA,N,CR,CI)
UCJ,1)=-CRHUCJ,1)

UCJ,2)=-CI+UCJ,2)

I=I-1

IF(I-2)2,10,10

IFCKFLAG.EQ.1)GOTO 1

NFLAG=KFLAG-1

DO 113 IM=1,NFLAG

JF=IM+1

CALL AlCA,T,F,H,IM,NSR,IA)

CALL A1CA,T,F,P,JF,NSR,IA)

DO 112 J=1,NSR

5S 3502 =DEMPLXCDREAL (PCJ, J) )-DREAL CHC J, J)),DIMAGCPCJ, J) )-DIMAGCHCJ,

CONTINUE

CALL A5CE,C,CX,G,NUSR,N3,IM,IA,L)

DO 111 J=1,NSR

DO 111 K=1,NSR

CALL FOIDDFCL,NSR,CX,J,K,S,IA,P,IA,N,CR,CI)
QCJ,K)=DCMPLX(-CR, -CI)


Premultiplying by v3 and postmultiplying by Wi yields,

-1 -1
(14) Woy Way = “Yoo Voq-

Equetion (13) can be expressed as

(13) y(t) = Woy tw T(t) - v pele Oaprry 2(t)dt.

From equation (1)
x(t) = Ayq*x(t) + Ayoty(t) + Byz(t).

Substitute (13) in for y(t) and one obtains .-

. -1
(15) x(t )=(Ay Ay VooVo, x(t) + Byz(t)

1 ye eho (t-1)

“Aion t DEz(t)dt.

The compound term which multiplies x(t) can be simplified as follows.
From (2),

A = WAV. (where W=v71)

AqiaWyqAqVy4 + WyahaVay.

Aya=Wy1AqVq2 + WyahaVo2

-1 -1
Avi AraVa2 Var=Wy1 AV 11 4H 2haVay ~ Wy1AqVy aV22V01 - Wy yAQV,-


Then
(8) Ry Cb) = Ag Ega(t) + DEE 2(t).

The forward looking solution for equations (8) is
= Ags - f® eA (s-t) 2
(9) E,a(s) = Koe2 Sy ey DE,2(t)dt, s2t.

where Kp is an N-Ny vector of arbitrary constants. Provided that he
expectation of z(t) is bounded over the interval [t, + #), the second
term of equation (9) will exist. But the expression in (9) will not
converge unless Ko=0. Assuming that the elements of Ko are all set

equal to zero (9) becomes.

(10) Eyq(s) = - SS ef2(s-t) D¥E, 2(t)dt.

From the definition of q(t) given in (4) above.

(11) q(t) = Voq * x(t) + Vooty(t).

or

-1 -1
* - * *
Vv q(t) 7 V5 Voy x(t).

(2) y(t) 22

Evaluating (10) at s=t using the weak consistency assumption that

E¢q(t) = q(t) and substituting into (12) one obtains

(13) y(t) = ~ v5) * vay ex(t) - vy we ef2( Danae a (x)dc.

which is equation (14) from Buiter (1984).
Recall that by definition (3),

veW = I.
Thus,

Vv = 0.

ar May * Yoo Moy


-17-
Appendix
Presented here is the program "JAB" which implements the

results of the paper. This program is an outgrowth of "Saddlepoint";

see Austin and Buiter (1982).


et ywlt t -1
(20) x(t) Wiyedq(t PoMW, x(t, )+ Foti iedt (t S)W,, B,2z(s)ds
_ opt ~s)Woa. yt) « p®ano(8-t)
Fei yetr (t SW Ay Vo5 fe 2 DEgz(1t)dtds,

=1 71, ;
The expression WA Vos is then transformed using (2),

Aya = WiqAqV42 + WyaAgVoo.

Premultiplication by wi and postmultiplication by V povields,

“1 1 -1 ad
(21) Way AyaVan = Vy V5, + Wi Wy atos
and the solution for x(t) becomes

Ay(t-t_) -1- t A (t-s)=1
' =
(20)' x(t) Wie ° Wy x(t.) + Seols1e 1 W,,B,2(s)ds

_ jt Ay (t-s), mT * x7%,42(s-1)
Sel 18 CMVi2V55 + WiyMyoty] * *Soe DE,z(1)dtds.

These two equations, (20) and (20') are the expressions
developed by Buiter (1984),

The solution to x(t), the predetermined variable, reflects
three influences. First, the initial condition xX(to), the relative
influence of which diminishes as t increases. The second influence,
which is expressed in the second term of (20) or (20') above, is that
exerted by the elements of the forcing vector from the initial time, to
until time t. Finally the third influence can be expressed as, what was
believed about the future course of the forcing elements z(t) at each
point in the past from to to t. Let us turn now to the evolution of the
Solution components when the elements of the forcing vector z are

modelled as step functions,


16
17

19

20

al

22

23

24

25

886

887

28

26

27

-23-

C4(I,I)= DCMPLXC(E2(1,1),E3(I,1))

DO 17 _I=1,NUSR .

C5C(1,1)= DCMPLXCE2CI+NSR,1),E3(I+NSR,1))
CALL FOGADF(C1,IA,CC,IA,NSR,NSR,C6,IA,NKSPCE, IFAIL)
CALL FOGADF(C2,1A,CC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CI)
C10CI,J)= DCMPLX(-CR,-CI)


International Finance Discussion Papers
Number 275

February 1986

A METHOD FOR SOLVING SYSTEMS OF FIRST ORDER
LINEAR HOMOGENEOUS DIFFERENTIAL EQUATIONS WHEN
THE ELEMENTS OF THE FORCING VECTOR ARE MODELLED
AS STEP FUNCTIONS

by

Robert A. Johnson

NOTE: International Finance Discussion Papers are preliminary materials
circulated to stimulate discussion and critical comment. References in
publications to International Finance Discussion Papers (other than an
acknowledgment by a writer that he has had access to unpublished
material) should be cleared with the author or authors.


-10-

where IMAX = number of transitions of the z vector after point s.
Note that for s greater than the last transition time one obtains

eha(s-1)

f(s) =f + DE,(Z(1))dt.

Now we must evaluate the entire expression
t Ay (t-8)y ayy
(24) LeMay 1e M¥f(s)ds.
The difficulty arises because the function f(s) is continuous across

transition times but it is nondifferentiable at the transition times.

For instance at the first transition time, tt, for e€ small

-1 eho (s- tt,)
f(s) tett = Ay ‘bz, + Ane * D(z, -2,)
l-e
“1 A,(s-tt,) .
thy e2 2 D(Z, Za) + ase
~1,Ap(s-tty) y
f(s) tett;+_7 M2 Pot Ane 2 DIZ, Za] + ose

As one takes the limit as e>0, f(s)_ = f(s)4.

The function f(s) is continuous. But differentiating the two
expressions and evaluating as €>0,

af(s) _ af(s), _ .
3s a5 7D * (2572) | cette,

Which is only zero (i.e. the expression is differentiable) if zo = %

19

in other words, if this is not a transition point.


Where

J is the number of transitions of the forcing vector z from time

to to time t.

where

First

One then has to compute the third term of the solution,

*D E,2(t)dtds.

t Ay (tS) yy -@ ho(S-T)
FeoW ie M re 2

_ “1d
MeAWViVon + Way Wy ody.

of all one analyses the inside integral,

(22) f(s)= Behe Mane a¢x)ar.

The relationship between s and the transition times tty is crucial in

the development of this expression. Let us call tts the first

transition time after s. Thus our integral becomes.

f(s) = sy eh2(S ane a( addr

°
ttsti+1 Ao(s-t),y
+) Setsei e DE, 2(t)dt.
i

When evaluated this becomes

(23)

IMAX
f(s) = 450 Z ) eha(s tts+i)(

tts "fy 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,CI)
1 CC(J,1)=DCMPLX(-CR,-CI)
RETURN
END
SUBROUTINE A6(A,B,CX,T,D,E,F,G,H,P,Q,NSR,IA,N3,L)
IMPLICIT REAL%8(A-H,0-z)
COMPLEX%16 ACTA, IA), CX, DCIA, IA), ECIA, IA), FCIA,IA),
1 GCIA,IA),HCIA,IA),PCIA,IA),QCIA,IA)
REALX8 BCIA),T,CR,CI
DO 12 J=1,NSR
12 P(J,1)=(€0.,0.)
I=2

CALL A1CA,T,B,D,L,NSR,IA)
10 IF(T-B(I))1,1,2
2 CALL A1CA,T,B,E,I,NSR,IA)
DO 3 J=1,NSR
3 D(J,J)=DCJ,J)-EC, J)
9
5

GOTO 4
DO 5 J=1,NSR
DCJ, J)=ECJ, J)
I=I+1
GOTO 10
1 DO 6 J=1,NSR
6 DCJ, J)=DCJ,J)-DCMPLX(1.0D0,0.0D0)
4 DO 7 J=1,NSR
DO 7 K=1,N3
CALL FO1DDFCLE,NSR,CX,J,K,D,IA,F,IA,N,CR,CI)


-1
(16) = Wi,A,CV,, Vy VoVo,]

Recall again that

w=,
WaiViitWyaVaq = I.

“1 “1

Va yavoy = Ways

and W11V12 + Wy2V22 = 0.

Premultiplying by wi and post multiplying by V55 yields,
-1 -1
Way Mia = Vie Vaae

Putting this back into (17) creates

“1 _ywl

Yan 7 Yao Von Vor = 44°
and (16) becomes
(18) A-a wo, = wl aw!
11 avon, = My yay

As a result (15) can be reexpressed as

-1,0 Ao(t-
Vpegratt pg z(r)de.

° -1
(19) x(t) =Wy 1 AqWy x(t) +By z(t Ay Naot,

Given an Ny vector of initial conditions for each element of the vector

x(t) at time t=t ) one can express the solution to (19) as


86

87

88

QN0%
~

65

-20-

WRITE(18,99995) BLANK

DO 86 I=1,N2
WRITE(18,100)(E6(I,J),J=1,N1)
CONTINUE

WRITEC18,99995) BLANK

DO 87 I=1,N2
WRITE(18,100)CE7(1,J),J=1,N2)
CONTINUE

WRITE(18,99995) BLANK

DO 88 I=1,N2
WRITEC18,100)(E8(I,J),J=1,N3)
CONTINUE

WRITE(13,99995) BLANK

DO 89 I=1,N3
WRITEC18,100)(Z¢1,J),J=1,NZ)
CONTINUE

ECHO WHAT WE READ IN AS DATA

WRITE(18,99995) BLANK

CALL FOGAEFCE7,IA,B,IA,N2,N2,F1,IA,WKSPCE,F2,1A,F3,1A,IFAIL)
IOPT=

CALL FOICKFCE1,E3,F1,IA,IA,IA,WKSPCE,IA,IOPT,IFAIL)
IOPT=1

CALL FOICKFCF2,F1,E6,1A,IA,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOICKFCE7,E3,£6,1A,IA,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOLCEFCE2,E2,€7,1A,IA,IFAIL)

CALL FOGAEFCE2,IA,B,IA,N1,N1,F3,IA,WKSPCE,F4,1A,E6,1A,IFAIL)
CALL FOICKFCF4,E3,E5,IA,IA,IA,WKSPCE,IA,IOPT, IFAIL)
CALL FOICEFCE1,E1,F4,I1A,IA,IFAIL)

CALL FOICKFCE6,E3,E8,1A,IA,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOICEFCE4,E4,£6,1A,1IA,IFAIL)

IOPT=3

CALL FOICKF(E1,F1,E8,IA,IA,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOICKFCE1,F1,£5,1A,IA,IA,WKSPCE,IA,IOPT,IFAIL)
IOPT=1

CALL FOICKFCE6,F2,F3,IA,IA,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOICKFCE7,E6,E4,1A,1A,IA,WKSPCE,IA, 1OPT, IFAIL)
CALL FOICEFCE8,E7,E8,I1A,IA,IFAIL)

CALL FOICKFCE2,E6,E1,1A,1A,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOICEFCE7,E2,E5,1A,1A,IFAIL)

CALL FOICKFCE5,F3,E1,1A,IA,IA,WKSPCE,IA,IOPT,IFAIL)
CALL FOLCKFCEG, >F3,E4,1A,IA,1A,WKSPCE,IA,IOPT,IFAIL)

CONTINUE

CALL F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C13,C8,CC,C14,C15,C1,NSR,IA,N3,L)
DO 113 I=1,NSR
113 C15(1,1 CMPLXCEG(I,1),E4(1,2))+C14(1,1)+DCMPLX(E5(I,1),E5(1,2))
119 DO 115 I=1,NSR
CALL FOIDDFCL,NSR,CX,I,L,C3,IA,C15,1A,N,CR,CI)
115 E1(I,1)=-CR
GOTO 116
117 REWIND 18
REWIND 19
RETURN
END
SUBROUTINE A1CA,T,B,C,1,N,IA)
IMPLICIT REAL%8(A-H,0-Z)
COMPLEX¥16 ACIA,IA),CCIA,IA)
REALX8 BCIA),X,Y,T,1T
TT=T-BCI)
DO 1 J=1,N
DO 2 K=1,N
2 CCJ,K)= DCMPLX(0.0D0,0.0D0)
. X=DEXP(CDREALCACJ,J)) )*TT)
Y=TTXDIMAGCACJ,J))
1 CCJ,J)= DCMPLXCCXXDCOSCY)), CXXDSINCY)))
pane

SUBROUTINE A2(A,B,C,D,F,G,H,P,Q,R,S,CX,T,NZ»NUSR,N3, IAL)
IMPLICIT REAL%8(A-H,0-Z)
COMPLEX*16 ACIA,IA),BCIA,IA),CCIA,IA),FCIA,IA)
1,GC(IA,IA),
1 HCTA,IA),PCIA,IA),QCIA,IA),SCIA,IA),CX
Realxe DCIA),RCIA,IA),T,CR,CI

=N,



-2-

SECTION II. Background
In this section we will develop the notation and the basic
solution method that will be used below.

We begin with the linear first order differential system,

x(t) x(t)
o [gp ]ea[ sg] oe

where:
x(t) is an Nj vector of predetermined variables
y(t) is an N-Ny vector of nonpredeterminted variables
z(t) is a k vector of exogenous variables
A is a constant matrix of dimension N*N
B is a constant matrix of dimension N¥*K
E denotes the expectations operator
we denotes the derivative with respect to time d/dt

I will assume that the A matrix can be diagonalized as follows.

(2) A= V—'1AV or vavrl = an.

where:
v is the matrix of left eigenvectors of A of dimension
N*N.
A is a diagonal matrix whose elements are the

eigenvalues of matrix A.
I will further assume that there are Ny eigenvalues with nonpositive
real components and N-N1 eigenvalues with positive real components.
Following the exposition of Buiter (1984) I will partition the A,B,V,

v-l and A matrices to conform to the dimensions of x(t) and y(t).
Ay. A B
@oas [an 2 | o-[2 |,
A21 A22 Bo ,
= | Yu Vie “Thy Waa Wi =| 4,9
y [ys V2 . Wor Waa} “* Lo! ao]:


-13-

To solve this integral one forms a matrix 6 whose element in row 6

column o is equal to

erp - porte x pa8qrl
9 g,o7 Tha 7 My] Mg Q* CAS]
where 1S6SM,
and 1 So S$ N-Ny.

The Ny * (N-Ny) matrix @ is then used to formulate another Ny * (N-Ny)
matrix By, where the subscript i denotes the number of forcing element
“ransitions beyond the first transition occuring after the current time

te

0 6 On _
Ag (t-tt ) ely (t t,) AS(t -tt )

85 G* Ce Jtitt’- * e200 “J+itt’].

“he solution to (26) then becomes

W2-nt-1
(27) Y W, ,B,D*(z
L-o Wi

g+2ei 7 Zye1eid

A similar technique is employed for all terms r(s)i"! from 0 to K

where K in turn runs from 0 to J, the number of the transition time

preceding the current time t

For all e(s)}"t, i=0,K the term

-1 QA (s-t,)
A. e5 k

2 Diz

Ke 2)

will be a common element.


-15-

Conclusion:

The analysis in the preceding sections can be readily
implemented on the computer to permit one to conduct policy simulation
experiments which illustrate the effects of any combination of
anticipated or unanticipated, permanent or transitory changes in
exogenous variables. The program called "JAB" written by Johnson,
Austin and Buiter, which is the offspring of "Saddlepoint", has recently
been completed and is available from the author. A copy of the program

follows as an Appendix.


A Method for Solving Systems of First Order
Linear Homogeneous Differential Equations When
the Elements of the Forcing Vector are Modelled

as Step Functions
by

Robert A. Johnson*

This paper presents analytical expressions for the solution of
a system of first order linear differential equations with constant
coefficients when the elements of the vector of exogenous forcing
variables are restricted to being modelled as step functions. The
solution of such a system can then be programmed quite easily for use on
the computer. Asa result, simulation of deterministic continuous time
rational expectations models can be performed under a wide variety of
circumstances including any combination of anticipated or unanticipated
shocks, permanent or transitory shocks and future or present shocks.

The first section below develops the notation and presents the
discussion of the basic solution of first order linear differential
equation systems with constant coefficients. This section constitutes
the background for the focus of this paper and is essentially a review
of the material presented in Buiter (1984). Section three begins with
the general solution form developed in the previous section and derives
the specific solution when the elements of the forcing vector are
restricted to step functions. A brief conclusion is followed by an
appendix exhibiting the computer program which incorporates the analysis

contained in the body of the paper.

* The author is grateful to seminar participants at the Board of
Governors of the Federal Reserve and to William Buiter for helpful
comments. I would also like to thank Ruby Brooks for her patience
and skillful typing of this paper. This Paper represents the views
of the author and should not be interpreted as reflecting the views
of the Board of Governors of the Federal Reserve System or other
members of its staff.


~24-

MANIPULATE THE E-VECTOR MATRICES AND THE E-VALUE MATRICES Ti) GIVE
THE COEFFICIENTS IN EQUATIONS 12B AND 13.

DO 776 I=1,N3
DO 776 J=1,NZ
776 CCCI,J)= DCMPLX(ZC1,J),0.0D0)
X=0.0
WRITEC99,399)NSR
399 FORMAT(/' THE NUMBER OF STABLE ROOTS IS ',12)
50 WRITE(99,999)
999 FORMAT(/' HOW MANY INITIAL CONDITIONS?")
READ(98,*)NIC
M=NSR-NIC
IF(M_.GE. 0) GO TO 29
WRITEC99,998)
998 FORMAT CA" MORE INITIAL CONDITIONS THAN STABLE ROOTS")
GO TO 5
29 WRITEC99,99991)
99991 FORMAT(/*" ENTER -1 TO MAKE XBAR-BAR THE INITIAL SONDITIONS'7
x" OR O TO USE XBAR, ELSE 1 TO INPUT YOUR OWN : =
READ(98,%) Y
IFCY) 777,778,779
777 DO 41 I=1,NIC
41 E1(I,1)=E1CI,NZ)-E1(1,1)
GO TO 53
778 DO 781 I=1,NIC
781 ElCI,1)=-E1(1,1)
GO TO 53
779 WRITE(6,99992)
99992 FORMAT(/" WHAT ARE YOUR INITIAL CONDITIONS := ?'7)
READC98,%) CE1(I,1),1=1,NIC
53 IF(CM .EQ. 0) GO TO 52
51 DO 885 I=1,1A
29 885 Ja LATA

2000

885

=z
a

884

1

7)

997 FORMAT(/' WHAT ARE THE VALUES OF F1(I,J) (BY ROW)?")
READ(98,%)(CFICI,J),J=1,M),1=1,M)
WRITE(99,996)

"996 FORMAT(/" WHAT ARE THE VALUES OF F2(I,J) (BY ROW)?")
READC98,%)(CF2(1,J),J=1,NIC),I=1,M)
WRITEC99, 995)

995 FORMAT(/" WHAT ARE THE VALUES OF F3(I,J) (BY ROW)7")
READ(98,%)(CF3CI,J),J=1,NUSR),I=1,M)
WRITE(99, 994)

994 FORMAT(/* WHAT ARE THE VALUES OF FC(I,1) 27")
READ(98,%)(F4(1,1),1=1,M)

bad WRITE(18,88881)

88881 FORMATC' COEFFICIENT MATRIX F1')
WRITEC18,100)(CF1(I,J),1=1,M),J=1,M)
WRITEC18,99995) BLANK


Abstract

This paper presents a method for solving a system of first
order linear differential equations with constant coefficients
when the elements of the forcing vector are step functions. The
analysis presented in the text has been programmed for use in the
computer simulation of linear continous time rational
expectations models using any combination of anticipated and
unanticipated, permanent or temporary shocks. The program

entitled "JAB" is available from the author upon request.


IFDP
NUMBER
265

264

263

262

261

260

259

258

257

256

255

254

253

252

251

250

32

International Finance Discussion Papers

TITLES

Money Demand in Open Economies:
Substitution Model for Venezuela

A Currency

Comparing Costs of Note Issuance Facilities
and Eurocredits

Some Implications of the President's Tax
Proposals for U.S. Banks with Claims on
Developing Countries

Monetary Stabilization Policy in an Open
Economy

Anticipatory Capital Flows and the Behaviour
of the Dollar

Simulating Exchange Rate Shocks in the MPS
and MCM Models: An Evaluation

Trade Policy for the Multiple Product
Declining Industry

Long Memory Models of Interest Rates, the
Term Structure, and Variance Bounds Tests

Currency Substitution and the New Divisia
Monetary Aggregates: The U.S. Case

The International Transmission of Oil Price
Effects and OPEC's Pricing Policy

U.S. Banks' Lending to Developing Countries:
A Longer-Term View

Conditional Econometric Modelling:
An Application to New House Prices
in the United Kingdom

Low Pushing: Doctrine and Theory

1984
(partial listing)
Postwar Financial Policies in Taiwan, China

Foreign Exchange Constraints and Growth
Possibilities in LDCs

The Determination of Front~end Fees on
Syndicated Eurocurrency Credits

AUTHOR(s)

Jaime Marquez
Rodney H. Mills

Allen B. Frankel

Marcus H. Miller
Arnold Kling
Arnold K:.ing
Catherine Mann
Gary S. Shea
Jaime Mar quez
Jaime Marquez
Henry S. Terrell
Rod Mills

Neil R. Ericsson

David F. Hendry

William Darity, Jr.

Robert F. Emery

Jaime Mar quez

Rodney H. Milis
Henry S. Terrell


-27-

CALL A5(B,C,CX,Q,NUSR,N3,I,IA,L)
IFC(DCI)-T)2,2,3
DO 1 J=1,NUSR
PCJ,1)=QCJ,1)
GOTO 14
3 CALL A1(F,T,D,H,I,NUSR,IA)
DO 4 J=1,NUSR
CALL FOIDDFCL, NUSR,CX,J,L,H,IA,Q,IA,N,CR,CI)
4 Pld ,1)= DCMPLX(-CR»-CI)
10 CALL _A5(B,C,CX,Q,NUSR,N3,I,1A,L)
IF (DCI)-T)5,5,6

en

6 CALL A1CF,T,D,G,1I,NUSR,IA)
DO 7 J=1,NUSR
7 HCJ,J)=G0J,J)-HOJ, J)

DO 8 J=1,NUSR
CALL FOIDDF(L,NUSR,CX,J,L,H,IA,Q,IA,N,CR,CI)

8 PCJ,1)=PCJ,1)- DCMPLXCCR,CI)
DO 9 J=1,NUSR

9 HOJ,J)=60J, J)
I=I-1
GOTO 10

5 DO 11 J=1,NUSR

11. HCJ,J)=DCMPLX(1.0D0,0.0D0)-H(J,J)

DO 13 _J=1,NUSR

CALL FOIDDFC(L,NUSR,CX,J,L,H,IA,Q,IA,N,CR,CI)
13 PCJ, 1)=DCMPLX(-CR,-CI)+P(J,1)
14 DO 15 J=1,NUSR

CALL FOIDDF(L,NUSR,CX,J,L,A,IA,P,IA,N,CR,CI)
15 GCJ,1)=DCMPLX(-CR,-CI)

DO 16 J=1,NUSR

CALL FOIDDF(L,NUSR,CX,J,L,S,IA,G,IA,N,CR,CI)
16 RCJ,1)=-CR

RETURN

END

SUBROUTINE A3CA,B,C,D,E,F,G,H,1I,1,NUSR,NSR,L,IA,KFLAG)
IMPLICIT REAL%8(A-H,0-Z)
COMPLEX¥16 ACIA,IA),BCIA,IA),CCIA,IA),DCIA, IA), ECIA,IA),
1_FCIA,IA),GCIA,IA)
REAL¥8 HCIA),X,XX,TT,T,Y,ZR,Z1
TT=0.0
IFCI-KFLAG)4,4,5
4 CALL A1CA,T,H,C,I,NSR,IA)
GOTO 6
5 CALL A1l(B,T,H,C,I,NUSR,IA)
6 CALL A1CA,T,H,D,L,NSR,IA)
CALL Al(B,TT,H,E,I,NUSR,IA)
IFCI-KFLAG)14,14,15
14 DO 1 J=1,NSR
DO 1 N=1,NUSR
XX=1.0

X=DREALCBCN,N)-ACJ,J))

Y=DIMAGCBCN,N)-ACJ,J))

CALL AO2ACFCXX,TT,X,Y,ZR»Z

SEDREAL CCCI, J)3-CDREALCDCO, 39) )xCDREALCECN, N)))-CDIMAGC DCJ, J) *
% CDIMAGCECN,N)))
Y=DIMAG(C(J,J))-CDREAL( DCJ, J) ) *(DIMAGCECN,N)) )-(DIMAG(D(J,J)))%
% (DREALCECN,N)))

XX=DREAL (GC JN) )%XX-DIMAG(GCJ,N))®Y

Y=DIMAG(GCJ,N) )*X+DREAL (GC J,N) XY


-ll-

Thus, the expression (24) must be broken up into a number of

integrals.

t tied Ay(t-8)y yy itl
(25) FE fit Wye mu * £(s)i*las.

Where e(s)i"! is the appropriate function between ty and tia

tateatt:

and nt = the number of transitions of the z vector up to the current

time t.

Consider a representative time t which is between ttj and

tt j+ . One obtains,

shly ety (ts)

t2 A, (t-s)
to 11 W

1 2,.
Mf(s) ds + 464 1e1 Mf(s)\ds

ty, A, (t-s) J+1
wet fei? 1 f(s)5 ds.

Referring back to equation (23), we can recognize that a given

point t between tj and tie all terms of the form,

Ay 'deh2(S"t Ke) * Diz

Ko 2K)?

for JS Ks @ will be common to all subfunctions £(s)}"! between

to and t. One can then recombine terms and evaluate the expression

t A, (t-s) -ly JA, (s-t )
(26) Sects 1® 1 * M*A, *e2 jtiti Diz }.

J+2ei “U+1 44


-14-

The solution for x(t) in total is

efi(t-to),;

(31) x(t) = Wy,

Fyx(t,) - (C27) + (28) + (29) +

+ (30)] + (21).

One can then use x(t) in equation (13') and that leaves only

the second term in that expression to evaluate

1

© A,(t-t)

1 -1
(13") y(t) = Wy *W)) * x(t)-V55* Spe'2 * D¥EL2(t)dt.

The second term reflects the expectation of future forcing vectors as of
time t presuming once again that E,z(t) = z(t), (i.e. correct
expectations), one can evaluate

° eho(t-t)

t * D¥E_z(t)dt.

At a time t between ty and tj4, one obtains,

nt

(32) ap lep¥z, + 2 a5! *LeM2

(t-t Digg (t-ty.. dys
Jey

J+titt’-

D¥Lzyeie1 ~ Zy+i]

Where nt is the number of transitions of the forcing vector
between t and ® . Equation (32) and the first term of equation (13'),
which can be computed using the results obtained in equation (31), are

combined to solve for y(t).