Web pdp-10.trailing-edge.com

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0020/lessor.tuk
There are 2 other files named lessor.tuk in the archive. Click here to see a list.
```2 ' NAME--LESSOR
4 '
6 ' DESCRIPTION--LEASE ANALYSIS FROM THE POINT OF VIEW OF LESSOR
8 '
10 ' SOURCE--REVISED 9/19/69 BY D.DOWNES
12 '
14 ' INSTRUCTIONS
15 '     THIS PROGRAM CALCULATES THE LESSOR'S CASH FLOWS AND RATE
16 '         OF RETURN ON A LEASE WITH PERIOD-END PAYMENTS.
17 '
18 '     VALUES ARE REQUIRED FOR THE FOLLOWING VARIABLES:
19 '
20 ' 1. P = INVESTMENT
21 ' 2. L = LEASE PAYMENT, 0 IF THE LEASE RATE RATHER THAN THE
22 '        LEASE PAYMENT IS GIVEN,
23 ' 3. C1= NUMBER OF TIMES PER YEAR THAT LEASE PAYMENTS ARE MADE.
24 ' 4. R1= LEASE RATE, 0 IF THE LEASE PAYMENT RATHER THAN THE
25 '        LEASE RATE IS GIVEN, OTHERWISE A DECIMAL REPRESEN-
26 '        TATION OF AN ANNUAL RATE COMPOUNDED C1 TIMES A YEAR,
27 ' 5. M = LIFE OF LEASE IN YEARS,
28 ' 6. N1= DEPRECIABLE LIFE IN YEARS,
29 ' 7. S1= SALVAGE FOR TAX PURPOSES,
30 ' 8. S2= SALVAGE ACTUALLY EXPECTED,
31 ' 9. T = DISPOSITION OF THE INVESTMENT TAX CREDIT, 0 IF TO THE
32 '        LESSEE AND 1 IF TO THE LESSOR,
33 '10. T1= THE RATE AT WHICH THE LESSOR IS TAXED
34 '11. D = METHOD OF DEPRECIATION, 1 IF STRAIGHT LINE, 2 IF
35 '        DOUBLE DECLINING BALANCE, 3 IF SUM-OF-YEARS-DIGITS,
36 '12. T9= THE NUMBER OF THE VARIABLE FOR WHICH A SENSITIVITY ANALYSIS
37 '        IS TO BE DONE, 0 IF NO ANALYSIS, 1 IF INVESTMENT,
38 '        2 IF LEASE PAYMENT, 3 IF LEASE LIFE, 4 IF LEASE RATE,
39 '        5 IF DEPRECIABLE LIFE, 6 IF TAX SALVAGE, OR 7 IF ACTUAL
40 '        SALVAGE.
41 '13. R8= THE LOWEST VALUE FOR THE VARIABLE SPECIFIED IN 12.
42 '14. R9= THE HIGHEST VALUE FOR THE VARIABLE SPECIFIED IN 12.
43 '
44 ' THIS PROGRAM WAS WRITTEN FOR STUDENT USE AT AMOS TUCK SCHOOL
46 ' OF HANOVER, N.H., WHICH DOES NOT ASSUME RESPONSIBILITY FOR
48 ' ITS ACCURACY.
50 '
52 ' * * * * * * * * * * * * * *  MAIN PROGRAM  * * * * * * * * *
54 '
100 DIM A(500),B(500),C(500),D(500),E(500),L(500),P(500),T(500)
120 DATA 60000,900,12,0
121 DATA 8,10,5000,20000
122 DATA 1,.7,3
130 IF T9>8 THEN 230
140 IF T9<1 THEN 230
150 PRINT
160 PRINT "DO YOU WANT THE SENSITIVITY ANALYSIS ONLY";
170 INPUT N\$
180 PRINT
190 IF N\$="NO" THEN 230
200 IF N\$="YES" THEN 610
210 PRINT "'YES' OR 'NO'";
220 GOTO 170
230 PRINT " ","SUMMARY OF INPUT DATA"
240 PRINT
250 PRINT "INVESTMENT",P,"LEASE PAYMENT"," ",L
260 PRINT "PAYMENTS"TAB(10);
270 GOSUB 790
280 PRINT ,"LIFE OF LEASE",,M
290 IF D = 2 THEN 330
300 IF D = 3 THEN 350
310 PRINT "DEPRECIATION","STRAIGHT LINE","DEPRECIABLE LIFE",N1
320 GO TO 360
330 PRINT "DEPRECIATION","DBLE DECLIN BALANCE","DEPRECIABLE LIFE",N1
340 GO TO 360
350 PRINT "DEPRECIATION","SOYD","DEPRECIABLE LIFE",N1
360 PRINT "TAX SALVAGE",S1,"ACTUAL SALVAGE"," ",S2
370 IF T = 0 THEN 400
380 PRINT "INVESTMENT TAX CREDIT IS TO BE TAKEN BY THE LESSOR"
390 GO TO 450
400 PRINT "INVESTMENT TAX CREDIT IS TO BE TAKEN BY THE LESSEE"
410 IF R1 = 0 THEN 450
420 PRINT "LEASE RATE GIVEN:"R1*100"PER CENT PER YEAR, COMPOUNDED"
430 GOSUB 790
440 PRINT
450 IF T9>8 THEN 500
460 IF T9<1 THEN 500
470 PRINT "SENSITIVITY OF LEASE RATE AND LESSOR'S AFTER TAX RETURN TO"
480 GOSUB 810
490 PRINT " WILL BE ANALYZED ";" WITH A RANGE ";" OF"R8"TO"R9"."
500 GOSUB 750
510 PRINT "  ","RESULTS OF CALCULATION"
520 LET F9=-1
530 GOSUB 1190
540 GOSUB 750
550 PRINT "DO YOU WANT A LISTING OF THE FLOWS";
560 INPUT N\$
570 PRINT
580 IF N\$="NO" THEN 600
590 GOSUB 2240
600 GOSUB 730
610 IF T9>8 THEN 2620
620 IF T9<1 THEN 2620
630 PRINT "SENSITIVITY ANALYSIS ON ";
640 GOSUB 810
650 PRINT
660 GOSUB 810
670 PRINT TAB(25)"LEASE RATE"TAB(43)"LESSOR'S AFTER TAX RETURN"
680 FOR F9=0 TO 10
690    GOSUB 960
700    GOSUB 1190
710 NEXT F9
720 STOP
730 PRINT
740 PRINT
750 PRINT "-------------------------------------------------------------------------"
760 PRINT
770 PRINT
780 RETURN
790 PRINT C1"TIMES YEARLY";
800 RETURN
810 ON T9 GOTO 820,840,860,880,900,920,940
820 PRINT "INVESTMENT";
830 RETURN
840 PRINT "LEASE PAYMENT";
850 RETURN
860 PRINT "LEASE LIFE";
870 RETURN
880 PRINT "LEASE RATE";
890 RETURN
900 PRINT "DEPRECIABLE LIFE";
910 RETURN
920 PRINT "TAX SALVAGE";
930 RETURN
940 PRINT "ACTUAL SALVAGE";
950 RETURN
960 LET W=R8+(F9/10)*(R9-R8)
970 ON T9 GOTO 980,1010,1040,1070,1100,1130,1160
980 LET P=W
990 PRINT TAB(5);P;
1000 RETURN
1010 LET L=W
1020 PRINT TAB(5);L;
1030 RETURN
1040 LET M=W
1050 PRINT TAB(5);M;
1060 RETURN
1070 LET R1=W
1080 PRINT TAB(5);R1;
1090 RETURN
1100 LET N1=W
1110 PRINT TAB(5);N1;
1120 RETURN
1130 LET S1=W
1140 PRINT TAB(5);S1;
1150 RETURN
1160 LET S2=W
1170 PRINT TAB(5);S2;
1180 RETURN
1190 LET N=M*C1
1195 LET N=INT(N+.5)
1200 IF R1=0 THEN 1240
1210 LET X = P
1220 LET R=(1+R1)^(1/C1)-1
1230 GOSUB 2490
1240 FOR I = 1 TO N
1250    LET A(I)=L
1260    LET L(I)=L
1270 NEXT I
1280 LET X = P
1290 GO SUB 1670
1300 LET R=((1+R)^C1-1)*100
1310 IF F9=-1 THEN 1340
1320 PRINT TAB(25);R"%";
1330 GOTO1380
1340 PRINT "LEASE RATE:"R"PER CENT PER YEAR, COMPOUNDED ";
1350 GOSUB 790
1360 PRINT
1370 PRINT
1380 GOSUB 1840
1390 GOSUB 2150
1400 FOR I = 1 TO N
1410    LET E(I) = L(I) - D(I)
1420    LET T(I) = E(I)*T1
1430 NEXT I
1440 LET T(1) = T(1) - C
1450 LET T(N) = T(N) + (S2-P(N))*T1
1460 LET L(N) = L(N) + S2
1470 LET D(N) = D(N) + P(N)
1480 FOR I = 1 TO N
1490    LET A(I) = L(I) - T(I)
1500 NEXT I
1510 LET X = P
1520 GOSUB 1670
1530 LET L(0) = -P
1540 LET A(0) = -P
1550 LET D(0) = 0
1560 LET T(0) = 0
1570 LET E(0) = 0
1580 LET R=((1+R)^C1-1)*100
1590 IF F9=-1 THEN 1620
1600 PRINT TAB(45);R"%"
1610 RETURN
1620 PRINT "LESSOR'S AFTER-TAX RETURN:"R"PER CENT PER YEAR,COMPOUNDED"
1630 PRINT "     ";
1640 GOSUB 790
1650 PRINT
1660 RETURN
1670 LET R=0
1680 FOR J = 1 TO 5
1690    LET Z = .1^J
1700    LET R = R + Z
1710    LET Y = 0
1720    FOR I = 1 TO N
1730       IF Y>1E37 THEN 1760
1740       LET Y = Y + A(I)/(1+R)^I
1750    NEXT I
1760    IF Y - X > 0 THEN 1700
1770    LET R = R - Z
1780 NEXT J
1790 IF R > 0 THEN 1830
1800 IF R < 0 THEN 1830
1810 LET R = -1
1820 GO TO 1680
1830 RETURN
1840 LET P(0)=P'                STRAIGHT LINE
1850 IF D = 2 THEN 1910
1860 IF D = 3 THEN 2020
1870 FOR I = 1 TO N1
1880    LET A(I) = (P-S1)/N1
1890 NEXT I
1900 GO TO 2060
1910 FOR I=1 TO N1'               DOUBLE DECLINING BALANCE
1920    LET A(I) = P(I-1)*(2/N1)
1930    LET B(I) = (P(I-1)-S1)/(N1-I+1)
1940    IF A(I) > B(I) THEN 1960
1950    LET A(I) = B(I)
1960    LET P(I) = P(I-1) - A(I)
1970    IF P(I)>S1 THEN 2000
1980    LET P(I)=S1
1990    LET A(I)=P(I-1)-P(I)
2000 NEXT I
2010 GO TO 2060
2020 LET W=(N1*(N1+1))/2'         SUM OF YEARS DIGITS
2030 FOR I = 1 TO N1
2040    LET A(I) = (P-S1)*((N1-I+1)/W)
2050 NEXT I
2060 LET W=0
2070 FOR I=1 TO N1
2080    FOR K=1 TO C1
2090       LET W=W+1
2100       LET D(W)=A(I)/C1
2110       LET P(W)=P(W-1)-D(W)
2120    NEXT K
2130 NEXT I
2140 RETURN
2150 LET C=0'            INVESTMENT TAX CREDIT
2160 IF T = 0 THEN 2230
2170 IF N1 < 4 THEN 2230
2180 LET C = C + .02333*P
2190 IF N1 < 6 THEN 2230
2200 LET C = C + .02333*P
2210 IF N1 < 8 THEN 2230
2220 LET C = C + .02334*P
2230 RETURN
2240 PRINT TAB(20)"LISTING OF CASH FLOWS"
2250 PRINT TAB(20)"---------------------"
2260 PRINT
2270 PRINT " YEAR "," LEASE ","DEPRECIATION","  TAX  "," CASH "
2280 PRINT ,"RECEIPT",,"PAYMENT"," FLOW "
2290 LET K=1
2300 PRINT 0,L(0),D(0),T(0),A(0)
2310 FOR I=1 TO M
2320    LET L8=D8=T8=A8=0
2330    FOR J=1 TO C1
2340       LET L8=L8+L(K)
2350       LET D8=D8+D(K)
2360       LET T8=T8+T(K)
2370       LET A8=A8+A(K)
2380       LET K=K+1
2390    NEXT J
2400    PRINT I,L8,D8,T8,A8
2410    LET L(0)=L(0)+L8
2420    LET D(0)=D(0)+D8
2430    LET T(0)=T(0)+T8
2440    LET A(0)=A(0)+A8
2450 NEXT I
2460 PRINT "TOTAL",L(0),D(0),T(0),A(0)
2480 RETURN
2490 LET L=0
2500 FOR J = 1 TO 6
2510    LET Z = 10000*.1^J
2520    LET L=L+Z
2530    LET Y = 0
2540    FOR I = 1 TO N
2550       LET Y=Y+L/(1+R)^I
2560    NEXT I
2570    IF X-Y > 0 THEN 2520
2580    LET L=L-Z
2590 NEXT J
2600 RETURN
2610 DATA 3,5,10
2620 END
```
```
```