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ZZER$:ZZEFLG=ZZ1:? ZZBZ$:RETURN 
180 POSITION ZZ2,ZZ23:GOSUB 128:? "Type п to print, ретурн to continue";
181 OPEN #ZZ7,ZZ4,ZZ0,"K:ZZKK":GET #ZZ7,ZZDATA:CLOSE #ZZ7
182 IF ZZDATA=80 THEN TRAP 189:OPEN #ZZ5,ZZ8,ZZ0,"P:ZZPP":GOTO 186
183 IF ZZDATA<>155 THEN 180
184 GOSUB ZZ126:? ZZB$:RETURN 
186 FOR ZZJJ=ZZ1 TO 920:ZZJK=PEEK(ZZDIS+ZZJJ):IF ZZJK>127 THEN ZZJK=ZZJK-ZZ128
187 IF ZZJK>95 THEN ZZJK=ZZJK-32
188 ? #ZZ5;CHR$(ZZJK+32);:NEXT ZZJJ
189 CLOSE #ZZ5:TRAP 110:GOTO 180
190 IF ZZEFLG<>ZZ0 THEN POSITION ZZ1,ZZ21:? "°":ZZEFLG=ZZ0
191 RETURN 
7000 ? :? :? :? "  It is a modification of COMPORT":? :? "by Prof. D. Lessard, Amos Tuck":? 
7001 ? "School of Business.":? 
7002 ? "тхис═програм═макес═но═ассумптионс":? "ор═цалцулатионс═фор═таь═пурпосес╝":RETURN 
7003 RETURN 
9000 REM 
9050 ? ZZB$:? "   This program is used to evaluate":? :? "portfolios by means of a number of":? 
9051 ? "statistical measures. It calculates":? :? "the arithmetic mean and standard":? 
9052 ? "deviation, the mean and standard":? :? "deviation of the log returns, and":? 
9053 ? "the geometric mean of the period":? :? "returns for one or more portfolios":? :? "described by the user."
9054 GOSUB ZZ180:? :? "   It also provides annualized":? 
9055 ? "arithmetic and geometric means if":? :? "the returns are other than annual.":GOSUB 7000:GOSUB ZZ180
9900 GOSUB 9990:RUN "D:PORTFOL1"
9990 GOSUB 150:? ZZB$:GOSUB 126:POSITION 7,22:? "═лоадинг═тхе═неьт═сецтион═":RETURN 
