Library: | finance |
See also: | american asset bitree bs1 european mcmillan optstart |
Quantlet: | callbull | |
Description: | calculates the results of a Bull Call Spread |
Usage: | summ=callbull() or summ=callbull(k1,C1,k2,C2,lq,hq,contracts {, step}) | |
Input: | ||
k1 | n x 1 vector, strike price of long call (C1) | |
C1 | n x 1 vector, price for call option C1 | |
k2 | n x 1 vector, strike price of short call (C2) | |
C2 | n x 1 vector, price for call option C2 | |
lq | scalar, lowest quotation | |
hq | scalar, highest quotation | |
contracts | scalar, number of contracts | |
step | optional scalar, length of the step in the spread (default is 10) | |
Output: | ||
summ | array containing n layers, each layer corresponds to one row of the input and consist of four columns (in case of callbull() only a matrix with four columns is displayed). The first column contains the prices from the lowest quotation to the highest growing with step (=10 if callbull() is used). The second and the third column represent the long or short prices respectively. The last column consists of the sum of the two previous columns. Text comments will be shown as well. |
library("finance") callbull()
An interactive menu is opened where you may specify the characteristics of your Bull Call spread.
library("finance") k1 = 550|560 C1 = 35 k2 = 600|590 C2 = 15 lq = 540 hq = 610 contracts = 100 o=callbull(k1, C1, k2, C2, lq, hq, contracts)
Contents of info [ 1,] "----------------------------------------------------" [ 2,] " k1 C1 k2 C2 " [ 3,] " 550.00 35.00 600.00 15.00 " [ 4,] "----------------------------------------------------" [ 5,] " Stock price long Call short Call gain/loss" [ 6,] "----------------------------------------------------" [ 7,] " 540.00 -3500.00 1500.00 -2000.00" [ 8,] " 550.00 -3500.00 1500.00 -2000.00" [ 9,] " 560.00 -2500.00 1500.00 -1000.00" [10,] " 570.00 -1500.00 1500.00 0.00" [11,] " 580.00 -500.00 1500.00 1000.00" [12,] " 590.00 500.00 1500.00 2000.00" [13,] " 600.00 1500.00 1500.00 3000.00" [14,] "----------------------------------------------------" Contents of info [ 1,] "----------------------------------------------------" [ 2,] " k1 C1 k2 C2 " [ 3,] " 560.00 35.00 590.00 15.00 " [ 4,] "----------------------------------------------------" [ 5,] " Stock price long Call short Call gain/loss" [ 6,] "----------------------------------------------------" [ 7,] " 540.00 -3500.00 1500.00 -2000.00" [ 8,] " 550.00 -3500.00 1500.00 -2000.00" [ 9,] " 560.00 -3500.00 1500.00 -2000.00" [10,] " 570.00 -2500.00 1500.00 -1000.00" [11,] " 580.00 -1500.00 1500.00 0.00" [12,] " 590.00 -500.00 1500.00 1000.00" [13,] " 600.00 500.00 500.00 1000.00" [14,] "----------------------------------------------------"