1 REM  Revised by Jim Woolley, FOG Disk Librarian, 10/82
5	PRINT CHR$(26)
6 INPUT"Turn on printer, then press <RETURN>",A$
7 PRINT
10	PRINT "FINANCIAL STATEMENT RATIO ANALYSIS"
15	LPRINT "FINANCIAL STATEMENT RATIO ANALYSIS"
20 REM
30	DIM D(20)
40 REM D(1)   = NET SALES
50 REM D(2)   = BEGINNING INVENTORY
60 REM D(3)   = ENDING INVENTORY
70 REM D(4)   = COST OF GOODS SOLD
80 REM D(5)   = INTEREST EXPENSE
90 REM D(6)   = PRETAX INCOME
100 REM D(7)  = TAXES
110 REM D(8)  = CASH
120 REM D(9)  = ACCOUNTS RECEIVABLE
130 REM D(10) = NOTES RECEIVABLE
140 REM D(11) = TOTAL ASSETS
150 REM D(12) = CURRENT LIABILITIES
160 REM D(13) = EQUITY
170 REM D(14) = SHARES OUTSTANDING
180 REM D(15) = MARKET PRICE PER SHARE
190 REM D(16) = DIVIDENDS PAID
200 REM
210	DATA "NET SALES","BEGINNING INVENTORY","ENDING INVENTORY"
220	DATA "COST OF GOODS SOLD","INTEREST EXPENSE"
230	DATA "PRE-TAX INCOME","INCOME TAXES","CASH"
240	DATA "ACCOUNTS RECEIVABLE","NOTES & MARKETABLE SECURITIES"
250	DATA "TOTAL ASSETS","CURRENT LIABILITIES"
260	DATA "STOCKHOLDERS' EQUITY","COMMON SHARES OUTSTANDING"
270	DATA "MARKET PRICE PER SHARE","DIVIDENDS PER SHARE"
280	LPRINT:LPRINT "   NAME OF FIRM:";
290	PRINT:PRINT   "   NAME OF FIRM:";
300	INPUT N$:LPRINT "  ";N$
310	LPRINT " MONTH/DAY/YEAR:  ";:PRINT " MONTH/DAY/YEAR";
320	INPUT D$:LPRINT D$
325	LPRINT CHR$(10)
330 REM ENTER INCOME STATEMENT ACCOUNTS
340	RESTORE
350 PRINT "------INCOME STATEMENT------":LPRINT "------INCOME STATEMENT------"
360	PRINT "ENTER AMOUNTS FOR:"
370	FOR I=1 TO 7
380	GOSUB 1620
390	NEXT I
400 REM ENTER BALANCE SHEET ACCOUNTS
410	PRINT "-------BALANCE SHEET-------":LPRINT:LPRINT "-------BALANCE SHEET-------"
420	PRINT "ENTER AMOUNTS FOR:"
430	FOR I=8 TO 13
440	GOSUB 1620
450	NEXT I
460	PRINT:LPRINT
470	PRINT "ALSO ENTER:"
480	FOR I=14 TO 16
490	GOSUB 1620
500	NEXT I
510	PRINT:LPRINT
520	PRINT "-----EVALUATION OF ";N$;" BY RATIO ANALYSIS-----":LPRINT "-----EVALUATION OF ";N$;" BY RATIO ANALYSIS-----"
530	PRINT "","PERIOD ENDING:";D$:LPRINT "","PERIOD ENDING:";D$
540	PRINT:LPRINT
550	PRINT "","-----PROFITABILITY-----":LPRINT "","-----PROFITABILITY-----"
560	T$="RETURN ON ASSETS"
570	X1=2
580	X0=(D(6)-D(7))/D(11)
590	GOSUB 1670
600	T$="RETURN ON EQUITY"
610	X0=(D(6)-D(7))/D(13)
620	GOSUB 1670
630	T$="RETURN ON INVESTED CAPITAL"
640	X1=2
650	X0=(D(6)-D(7))/(D(11)-D(12))
660	GOSUB 1670
670	T$="EARNINGS PER SHARE"
680	X1=3
690	X0=(D(6)-D(7))/D(14)
700	GOSUB 1670
710	T$="OPERATING RATIO"
720	X1=1
730	X0=(D(1)-D(6))/D(1)
740	GOSUB 1670
750	PRINT:LPRINT
760	PRINT "","-----LIQUIDITY-----":LPRINT "","-----LIQUIDITY-----"
770	T$="NET WORKING CAPITAL"
780	X1=3
790 REM CALCULATE CURRENT ASSETS
800	C1=D(8)+D(9)+D(10)+D(3)
810 REM CALCULATE LONG-TERM DEBT
820	L0=D(11)-D(12)-D(13)
830	X0=C1-D(12)
840	GOSUB 1670
850	T$="ACID TEST (QUICK) RATIO"
860	X1=1
870	X0=(C1-D(3))/D(12)
880	GOSUB 1670
890	T$="CURRENT RATIO"
900	X0=C1/D(12)
910	GOSUB 1670
920	PRINT:LPRINT
930	PRINT "","-----ACTIVITY-----":LPRINT "","-----ACTIVITY-----"
940	T$="SALES PER DAY"
950	X1=3
960	X0=D(1)/365
970	GOSUB 1670
980	T$="DAYS SALES OUTSTANDING"
990	X1=0
1000	X0=D(9)/(D(1)/365)
1010	GOSUB 1670
1020	PRINT "DAYS":LPRINT "DAYS"
1030 REM IF NO INVENTORY DATA, SKIP PRINTING
1040	IF D(2)+D(3)=0 THEN 1090
1050	T$= "INVENTORY TURNOVER"
1060	X0=D(4)/((D(2)+D(3))/2)
1070	GOSUB 1670
1080	PRINT "TIMES": LPRINT "TIMES"
1090	PRINT:LPRINT
1100	PRINT"","-----INDEBTEDNESS-----":LPRINT "","-----INDEBTEDNESS-----"
1110	T$="CREDITORS' INTEREST IN FIRM"
1120	X1=2
1130	X0=(D(11)-D(13))/D(11)
1140	GOSUB 1670
1150	T$="TIMES INTEREST EARNED"
1160	X1=0
1170	X0=(D(6)+D(7)+D(5))/D(5)
1180	GOSUB 1670
1190	T$="DEBT TO EQUITY"
1200	X1=1
1210	X0=(D(11)-D(13))/D(13)
1220	GOSUB 1670
1230	T$="LONG-TERM DEBT TO NET WORTH"
1240	X0=L0/D(13)
1250	GOSUB 1670
1260	T$="LONG-TERM DEBT TO CAPITAL"
1270	X0=LO/(L0+D(13))
1280	GOSUB 1670
1290	PRINT:LPRINT
1300	PRINT "","-----EQUITY-----":LPRINT "","-----EQUITY-----"
1310	T$="STOCKHOLDERS' INTEREST IN FIRM"
1320	X1=2
1330	X0=(D(13))/D(11)
1340	GOSUB 1670
1350	T$="PAYOUT RATIO"
1360	X1=1
1370	X0=D(16)/((D(6)-D(7))/D(14))
1380	GOSUB 1670
1390	T$="EARNINGS YIELD"
1400	X1=2
1410	X0=((D(6)-D(7))/D(14))/D(15)
1420	GOSUB 1670
1430	T$="BOOK VALUE/SHARE"
1440	X1=3
1450	X0=D(13)/D(14)
1460	GOSUB 1670
1470	T$="PRICE/EARNINGS RATIO"
1480	X1=1
1490	X0=D(15)/((D(6)-D(7))/D(14))
1500	GOSUB 1670
1510	T$="DIVIDEND YIELD"
1520	X1=2
1530	X0=D(16)/D(15)
1540	GOSUB 1670
1550	PRINT:LPRINT
1560	PRINT "DO YOU WANT ANOTHER ANALYSIS (Y/N)"
1570	INPUT T$
1580	IF T$="Y" THEN 280
1590	IF T$<>"N" THEN 1560
1600	GOTO 1840
1620	READ T$
1630	PRINT TAB(31-LEN(T$));T$;
1640	INPUT D(I)
1645	LPRINT TAB(31-LEN(T$));T$;":  ";D(I)
1650	RETURN
1660 REM SUBROUTINE TO PRINT RATIOS & TURNOVER DATA
1670	PRINT TAB(31-LEN(T$));T$;
1675	LPRINT TAB(31-LEN(T$));T$;
1680	X0=INT(X0*1000+.5)/1000
1690 REM RATIO FORMAT IF X1=1
1700	IF X1=1 THEN 1780
1710 REM RATE FORMAT IF X1=2
1720	IF X1=2 THEN 1800
1730 REM DOLLAR FORMAT IF X1=3
1740	IF X1=3 THEN 1820
1750 REM DEFAULT TO NO FORMAT IF X1=0
1760	PRINT X0;:LPRINT X0;
1770	RETURN
1780	PRINT X0;":1":LPRINT X0;":1"
1790	RETURN
1800	PRINT X0*100;"%":LPRINT X0*100;"%"
1810	RETURN
1820	PRINT " $";X0:LPRINT " $";X0
1830	RETURN
1840	END

1790	RETURN
1800	PRINT X0*100;"%":LPRINT X0*100;"%"
1810	RETURN
1820	PRINT " $";X0:LPRINT " $";X0
