ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
2.5 KiB

  1. 5 CLS
  2. 90 PRINT " OPTION WRITING"
  3. 100 PRINT "tHIS PROGRAM COMPUTES SOME USEFUL TOTALS FOR POTENTIAL
  4. 110 PRINT "OPTION WRITERS. tHE USER OF THIS PROGRAM WILL GENERALLY
  5. 120 PRINT "BE A RATIO WRITER AND WILL SELL A FIXED NUMBER OF OPTIONS
  6. 130 PRINT "AS WELL AS BUY OR SHORT A GIVEN NUMBER OF SHARES OF THE
  7. 140 PRINT "UNDERLYING STOCK. uSING THIS PROGRAM HE WILL BE ABLE TO
  8. 150 PRINT "COMPUTE THE MAXIMUM DOLLAR PROFIT HE MAY REALIZE, THE
  9. 160 PRINT "DOLLAR INVESTMENT REQUIRED FOR THE DEAL, THE MAXIMUM
  10. 170 PRINT "RETURN ON INVESTMENT, AND THE UPPER AND LOWER BREAK
  11. 180 PRINT "EVEN POINTS OF STOCK PRICE FOR THE DEAL.
  12. 190 PRINT :INPUT "PRESS ENTER TO BEGIN ";Z9
  13. 200 CLS
  14. 300 REM INPUT SECTION
  15. 310 INPUT "INPUT C IF OPTION IS CALL, P IF PUT ";TP$
  16. 315 IF TP$<>"C" AND TP$<>"P" THEN PRINT "INPUT ERROR!":GOTO 310
  17. 320 INPUT "ENTER NUMBER OF OPTION CONTRACTS SOLD ";N
  18. 330 INPUT "ENTER PRICE PER OPTION ";PO
  19. 340 INPUT "ENTER TOTAL COMMISSION PAID ON OPTIONS ";CO
  20. 350 INPUT "EXERCISE PRICE ";EX
  21. 360 INPUT "# OF SHARES BOUGHT OR SHORTED ";NS
  22. 365 INPUT "PRICE PER SHARE OF STOCK ";P
  23. 370 INPUT "AV. COMM. ON ST. SHARE AS % OF SHARE PRICE ";CA
  24. 380 INPUT "DIVIDENDS PER SHARE PAID BY STOCK ";D
  25. 390 INPUT "MAINTENANCE REQUIREMENT ";MN
  26. 400 IF TP$="P" THEN GOTO 500
  27. 405 REM CALL OPTION CALCULATION
  28. 410 MAXP = N*100*PO-CO+NS*(EX*(1-CA/100)-P*(1+CA/100)+D)
  29. 420 INV = NS*P*(1+CA/100)-(N*100*PO-CO)+MN
  30. 425 RMAX = MAXP/INV*100
  31. 430 U=(MAXP+(N*100-NS)*EX*(1-CA/100))/((100*N-NS)*(1+CA/100))
  32. 440 L=(MAXP-NS*EX*(1-CA/100))/(-NS*(1-CA/100))
  33. 450 GOTO 600
  34. 500 REM PUT OPTION CALCULATION
  35. 510 MAXP = N*100*PO-CO+NS*(P*(1-CA/100)-EX*(1+CA/100)-D)
  36. 520 INV = NS*P/2+NS*P*CA/100-(N*100*PO-CO)+MN
  37. 525 RMAX=MAXP/INV*100
  38. 530 U=(MAXP + NS*EX*(1+CA/100))/(NS*(1+CA/100))
  39. 540 L=(MAXP-(N*100-NS)*EX*(1+CA/100))/(-(N*100-NS)*(1-CA/100))
  40. 550 GOTO 600
  41. 600 REM PRINTOUT
  42. 610 CLS
  43. 620 PRINT USING "MAXIMUM PROFIT = $$#####.##";MAXP
  44. 630 PRINT USING "INITIAL INVESTMENT = $$#####.##";INV
  45. 640 PRINT USING "MAXIMUM RETURN = #####.## PER CENT";RMAX
  46. 650 PRINT USING "UPPER BREAK EVEN POINT = ###.## PER SHARE";U
  47. 660 PRINT USING "LOWER BREAK EVEN POINT = ###.## PER SHRE";L
  48. 670 PRINT :INPUT "PRESS ENTER TO CONTINUE";Z9
  49. 675 IF Z9 = -1 THEN END
  50. 680 CLS:GOTO 310