﻿c 
  

  

  C 
  READ 
  CARO 
  10» 
  PRICES 
  

   DO 
  191 
  M=1*MX 
  

   191 
  READ(6o*1200> 
  (PR 
  (K 
  »M) 
  »CPR 
  (K»M> 
  *K*1 
  *KX) 
  

   1200 
  FORMAT 
  (6F9. 
  3) 
  

  

  IF(NZ-1)195»195»193 
  

  

  C 
  

  

  C 
  READ 
  CARD 
  11* 
  FINAL 
  VALUE 
  

  

  193 
  READ(60»12) 
  (FVAL 
  (N) 
  *N*1 
  »NX> 
  

  

  195 
  DO 
  39o 
  J=1*JX 
  

   DO 
  390 
  M=1»MX 
  

   LLLX=NX 
  

  

  IF 
  (NX. 
  EQ.O) 
  196*198 
  

  

  196 
  LLLX=1 
  

  

  198 
  DO 
  390 
  N«1»LLLX 
  

  

  WRITE 
  (61 
  *34>ANC 
  (J) 
  *CANC 
  (J) 
  

  

  34 
  FORMAT 
  (37Ho 
  ANNUAL 
  COST 
  St 
  F7.2* 
  46H 
  

  

  1 
  CHANGE 
  IN 
  ANNUAL 
  COST 
  , 
  F13.4* 
  17H 
  PERCENT 
  PER 
  

  

  2YEAR) 
  

  

  DO 
  199 
  K=1*KX 
  

  

  JJ1=(K*K*K-1*0) 
  

  

  JJ2=JJl*l 
  

  

  JJ3=JJ1*2 
  

  

  JJ4=JJ1*3 
  

  

  199 
  WRITE 
  (61*35) 
  (A(JJD 
  »A(JJ2) 
  *A(JJ3) 
  *A(JJ4) 
  »PR 
  (K,M) 
  t 
  A 
  ( 
  JJ1 
  > 
  tA(JJ2) 
  * 
  

   1A(JJ3) 
  »A(JJ4) 
  tCPR(KtM) 
  ) 
  

  

  35 
  FORMAT 
  (12H0 
  PRICE 
  OF 
  ♦ 
  4A5* 
  5H 
  $, 
  F7.2» 
  26H 
  CHANGE 
  IN 
  

   1PRICE 
  OF 
  » 
  4A5* 
  F13.4* 
  17H 
  PERCENT 
  PER 
  YEAR) 
  

  

  IF(NZ-l)204f204»205 
  

  

  204 
  WRITE<61»36) 
  

  

  36 
  FORMAT 
  (30Ho 
  PERPETUAL 
  INVESTMENT 
  SERIES) 
  

   GO 
  TO 
  210 
  

  

  205 
  WRITE(61»37) 
  FVAL(N) 
  

  

  37 
  FORMAT 
  (37H0 
  VALUE 
  AT 
  END 
  OF 
  ONE 
  INVESTMENT 
  St 
  F7.2> 
  

   210 
  DO 
  345 
  L=ltLX 
  

  

  KCXA=KCX 
  (L) 
  

  

  K1XA=K1X(L) 
  

  

  K2XA=K2X 
  (L) 
  

  

  K3XA=K3X 
  (L) 
  

  

  NZERO»l 
  

   DO 
  340 
  1=1 
  *LENGTH 
  

  

  GO 
  TO 
  (220*330) 
  tNZERO 
  

   220 
  DANC=0.0 
  

  

  DCANC=0.0 
  

  

  DKC=0.0 
  

  

  DKl=0.0 
  

  

  DK2=0.0 
  

  

  DK3=0.0 
  

  

  DFVAL=0.0 
  

  

  RTLOI=RTLOG(I) 
  

  

  DISCO=RTLOG(I) 
  LY(L) 
  

  

  IF(ANC(J)) 
  225t230»225 
  

   225 
  DANC= 
  (ANC 
  (J) 
  * 
  (DlSCO-1 
  . 
  ) 
  ) 
  / 
  (RATE 
  ( 
  I 
  ) 
  »DISCO) 
  

   230 
  IF 
  (CANC(J)) 
  235*240*235 
  

  

  235 
  DCANC=(CANC(J)«ANC(J)*DISCO-LY(L)*(RATE(I)-l.)/(RATE(I)*«2*DISCO) 
  ) 
  

   ?40 
  IF(«rxA) 
  250*?50»241 
  

  

  JV 
  2^5 
  KCTTUKCXA 
  

  

  KXLY=NC(L*KC) 
  

  

  DISC=RTLOI 
  •* 
  KXLY 
  

   245 
  DKC=DKC*PECO(L»KC)/DISC 
  

  

  250 
  IF 
  (K1XA) 
  260.260*251 
  

  

  251 
  DO 
  255 
  K1=1,K1XA 
  

   KXLY=N1 
  (L*K1) 
  

   OISC=RTLOI 
  ** 
  KXLY 
  

   QUAL1=JUAL1 
  (L*K1) 
  * 
  .01 
  

   YLD1=JLD1 
  (L 
  *K1 
  ) 
  * 
  .1 
  

  

  255 
  DKl=DKi«-(YLDl*PR<l*M)*QUALl*(l.*CPR(l*M)«Nl 
  (L»Kl 
  ) 
  ) 
  /DISC) 
  

  

  260 
  IF 
  (K2XA)270»270»261 
  

  

  261 
  DO 
  265 
  K2=1*K2XA 
  

   KXLY=N2<L»K2) 
  

   DISC=RTLOI 
  •* 
  KXLY 
  

   QUAL2=JUAL2(L»K2) 
  * 
  «01 
  

   YLD2=JLD2(L.K2) 
  • 
  .1 
  

  

  265 
  DK2=DK2* 
  ( 
  YLD2»PR 
  (2 
  »M 
  ) 
  *QUAL2« 
  ( 
  1 
  . 
  *CPR 
  ( 
  2 
  *M) 
  »N2 
  (L 
  »K2 
  ) 
  ) 
  /DISC) 
  

   270 
  IF(K3XA)280*280»271 
  

  

  36 
  

  

  