Helpers for CoveredCall (CC) and CashSecuredPut (CSP) trading

Discussion in 'Options' started by Quanto, Feb 6, 2024.

  1. Quanto

    Quanto

    Helpers for CoveredCall (CC) and CashSecuredPut (CSP) trading

    This is normally a program, but its output is informative and useful.
    Below are example outputs for "CC Opening", "CC Closing", "CSP Opening", "CSP Closing".

    This is a new idea & tool I just wrote; it's not field tested yet.
    If you spot an error, or have a suggestion for improving it, let me know. Thx.

    Legend: S.A means Stock.Ask, S.B means Stock.Bid (similar for C and P (Call and Put)), O means generic Option, K means Strike.

    Tip: One should begin reading the tables in the middle (center) where all 3 columns have an "I" ...
    The CSP tables (the last 2) are maybe hard to understand...

    This is useful when filling the CC or CSP order: ie. you have the quotes and need to calc your own NetDebit or NetCredit offer...

    The quotes used here are just made up, not real.

    Code:
    
    -------------------------------------------------------------------------------------------------------
    1)
    help_CC_CSP fCC=1 fOpening=1 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CC Opening:  "CostBase = -S.A + C.B  -->  NetDebit = S.A - C.B"
    
    CC Opening: Good if S.A rises, C.B falls [unintuitive!], or both.
       a) If S.A falls (= bad) then C.B should fall as well at least the same amount (the more the better).
       b) If C.B rises (= bad) then S.A should rise as well at least the same amount (the more the better).
    
    BaseSx = S.A = 11.0000
    BasePr = C.B = 1.5000
    Initial CostBase = -BaseSx + BasePr = -11.0000 + 1.5000 = -9.5000
    --> NetDebit = BaseSx - BasePr = 11.0000 - 1.5000 = 9.5000
    
    S.A=11.0200       C.B=1.5200     :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=11.0200       C.B=1.5100     :  CostBase=-9.5100   NetDebit=9.5100
    S.A=11.0200       C.B=1.5000  I  :  CostBase=-9.5200   NetDebit=9.5200
    S.A=11.0200       C.B=1.4900     :  CostBase=-9.5300   NetDebit=9.5300
    S.A=11.0200       C.B=1.4800     :  CostBase=-9.5400   NetDebit=9.5400
    
    S.A=11.0100       C.B=1.5200     :  CostBase=-9.4900   NetDebit=9.4900
    S.A=11.0100       C.B=1.5100     :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=11.0100       C.B=1.5000  I  :  CostBase=-9.5100   NetDebit=9.5100
    S.A=11.0100       C.B=1.4900     :  CostBase=-9.5200   NetDebit=9.5200
    S.A=11.0100       C.B=1.4800     :  CostBase=-9.5300   NetDebit=9.5300
    
    S.A=11.0000 I     C.B=1.5200     :  CostBase=-9.4800   NetDebit=9.4800
    S.A=11.0000 I     C.B=1.5100     :  CostBase=-9.4900   NetDebit=9.4900
    S.A=11.0000 I     C.B=1.5000  I  :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=11.0000 I     C.B=1.4900     :  CostBase=-9.5100   NetDebit=9.5100
    S.A=11.0000 I     C.B=1.4800     :  CostBase=-9.5200   NetDebit=9.5200
    
    S.A=10.9900       C.B=1.5200     :  CostBase=-9.4700   NetDebit=9.4700
    S.A=10.9900       C.B=1.5100     :  CostBase=-9.4800   NetDebit=9.4800
    S.A=10.9900       C.B=1.5000  I  :  CostBase=-9.4900   NetDebit=9.4900
    S.A=10.9900       C.B=1.4900     :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=10.9900       C.B=1.4800     :  CostBase=-9.5100   NetDebit=9.5100
    
    S.A=10.9800       C.B=1.5200     :  CostBase=-9.4600   NetDebit=9.4600
    S.A=10.9800       C.B=1.5100     :  CostBase=-9.4700   NetDebit=9.4700
    S.A=10.9800       C.B=1.5000  I  :  CostBase=-9.4800   NetDebit=9.4800
    S.A=10.9800       C.B=1.4900     :  CostBase=-9.4900   NetDebit=9.4900
    S.A=10.9800       C.B=1.4800     :  CostBase=-9.5000   NetDebit=9.5000  I
    
    
    
    -------------------------------------------------------------------------------------------------------
    2)
    help_CC_CSP fCC=1 fOpening=0 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CC Closing:  "CostBase = -S.B + C.A  -->  NetCredit = S.B - C.A"
    
    CC Closing: Good if S.B falls, C.A rises, or both.
       a) If S.B rises (= bad) then C.A should rise as well at least the same amount (the more the better).
       b) If C.A falls (= bad) then S.B should fall as well at least the same amount (the more the better).
    
    BaseSx = S.B = 10.0000
    BasePr = C.A = 2.0000
    Initial CostBase = -BaseSx + BasePr = -10.0000 + 2.0000 = -8.0000
    --> NetCredit = BaseSx - BasePr = 10.0000 - 2.0000 = 8.0000
    
    S.B=10.0200       C.A=2.0200     :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=10.0200       C.A=2.0100     :  CostBase=-8.0100   NetCredit=8.0100
    S.B=10.0200       C.A=2.0000  I  :  CostBase=-8.0200   NetCredit=8.0200
    S.B=10.0200       C.A=1.9900     :  CostBase=-8.0300   NetCredit=8.0300
    S.B=10.0200       C.A=1.9800     :  CostBase=-8.0400   NetCredit=8.0400
    
    S.B=10.0100       C.A=2.0200     :  CostBase=-7.9900   NetCredit=7.9900
    S.B=10.0100       C.A=2.0100     :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=10.0100       C.A=2.0000  I  :  CostBase=-8.0100   NetCredit=8.0100
    S.B=10.0100       C.A=1.9900     :  CostBase=-8.0200   NetCredit=8.0200
    S.B=10.0100       C.A=1.9800     :  CostBase=-8.0300   NetCredit=8.0300
    
    S.B=10.0000 I     C.A=2.0200     :  CostBase=-7.9800   NetCredit=7.9800
    S.B=10.0000 I     C.A=2.0100     :  CostBase=-7.9900   NetCredit=7.9900
    S.B=10.0000 I     C.A=2.0000  I  :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=10.0000 I     C.A=1.9900     :  CostBase=-8.0100   NetCredit=8.0100
    S.B=10.0000 I     C.A=1.9800     :  CostBase=-8.0200   NetCredit=8.0200
    
    S.B=9.9900        C.A=2.0200     :  CostBase=-7.9700   NetCredit=7.9700
    S.B=9.9900        C.A=2.0100     :  CostBase=-7.9800   NetCredit=7.9800
    S.B=9.9900        C.A=2.0000  I  :  CostBase=-7.9900   NetCredit=7.9900
    S.B=9.9900        C.A=1.9900     :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=9.9900        C.A=1.9800     :  CostBase=-8.0100   NetCredit=8.0100
    
    S.B=9.9800        C.A=2.0200     :  CostBase=-7.9600   NetCredit=7.9600
    S.B=9.9800        C.A=2.0100     :  CostBase=-7.9700   NetCredit=7.9700
    S.B=9.9800        C.A=2.0000  I  :  CostBase=-7.9800   NetCredit=7.9800
    S.B=9.9800        C.A=1.9900     :  CostBase=-7.9900   NetCredit=7.9900
    S.B=9.9800        C.A=1.9800     :  CostBase=-8.0000   NetCredit=8.0000  I
    
    
    
    -------------------------------------------------------------------------------------------------------
    3)
    help_CC_CSP fCC=0 fOpening=1 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CSP Opening:  "CostBase = -K + P.B  -->  NetDebit = K - P.B"
    
    CSP Opening: Good if P.B rises. S.* not used, K used.
    
    BaseSx = K = 5.0000
    BasePr = P.B = 1.5000
    Initial CostBase = -BaseSx + BasePr = -5.0000 + 1.5000 = -3.5000
    --> NetDebit = BaseSx - BasePr = 5.0000 - 1.5000 = 3.5000
    
    S.A=11.0200       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=11.0200       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=11.0200       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=11.0200       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=11.0200       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=11.0100       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=11.0100       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=11.0100       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=11.0100       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=11.0100       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=11.0000       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=11.0000       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=11.0000       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=11.0000       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=11.0000       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=10.9900       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=10.9900       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=10.9900       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=10.9900       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=10.9900       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=10.9800       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=10.9800       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=10.9800       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=10.9800       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=10.9800       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    
    
    -------------------------------------------------------------------------------------------------------
    4)
    help_CC_CSP fCC=0 fOpening=0 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CSP Closing:  "CostBase = -K + P.A  -->  NetCredit = K - P.A"
    
    CSP Closing: Good if P.A falls. S.* not used, K used.
    
    BaseSx = K = 5.0000
    BasePr = P.A = 2.0000
    Initial CostBase = -BaseSx + BasePr = -5.0000 + 2.0000 = -3.0000
    --> NetCredit = BaseSx - BasePr = 5.0000 - 2.0000 = 3.0000
    
    S.B=10.0200       P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=10.0200       P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=10.0200       P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=10.0200       P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=10.0200       P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=10.0100       P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=10.0100       P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=10.0100       P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=10.0100       P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=10.0100       P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=10.0000       P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=10.0000       P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=10.0000       P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=10.0000       P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=10.0000       P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=9.9900        P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=9.9900        P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=9.9900        P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=9.9900        P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=9.9900        P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=9.9800        P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=9.9800        P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=9.9800        P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=9.9800        P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=9.9800        P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    
    -------------------------------------------------------------------------------------------------------
    
     
    Last edited: Feb 6, 2024
  2. Quanto

    Quanto

    Table 1 and table 2 in the initial posting above are buggy (logic reversed). Here's the fixed version:

    Helpers for CoveredCall (CC) and CashSecuredPut (CSP) trading (fixed version 1)

    This is normally a program, but its output is informative and useful.
    Below are example outputs for "CC Opening", "CC Closing", "CSP Opening", "CSP Closing".

    This is a new idea & tool I just wrote; it's not field tested yet.
    If you spot an error, or have a suggestion for improving it, let me know. Thx.

    Legend: S.A means Stock.Ask, S.B means Stock.Bid (similar for C and P (Call and Put)), O means generic Option, K means Strike.

    Tip: One should begin reading the tables in the middle (center) where all 3 columns have an "I" ...
    The CSP tables (the last 2) are maybe hard to understand...

    This is useful when filling the CC or CSP order: ie. you have the quotes and need to calc your own NetDebit or NetCredit offer...

    The quotes used here are just made up, not real.

    Code:
    -------------------------------------------------------------------------------------------------------
    (fixed version 1)
    
    1)
    help_CC_CSP fCC=1 fOpening=1 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CC Opening:  "CostBase = -S.A + C.B  -->  NetDebit = S.A - C.B"
    
    CC Opening: Good if S.A falls, C.B rises, or both.
       a) If S.A rises (= bad) then C.B should rise as well at least the same amount (the more the better).
       b) If C.B falls (= bad) then S.A should fall as well at least the same amount (the more the better).
    
    BaseSx = S.A = 11.0000
    BasePr = C.B = 1.5000
    Initial CostBase = -BaseSx + BasePr = -11.0000 + 1.5000 = -9.5000
    --> NetDebit = BaseSx - BasePr = 11.0000 - 1.5000 = 9.5000
    
    S.A=11.0200       C.B=1.5200     :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=11.0200       C.B=1.5100     :  CostBase=-9.5100   NetDebit=9.5100
    S.A=11.0200       C.B=1.5000  I  :  CostBase=-9.5200   NetDebit=9.5200
    S.A=11.0200       C.B=1.4900     :  CostBase=-9.5300   NetDebit=9.5300
    S.A=11.0200       C.B=1.4800     :  CostBase=-9.5400   NetDebit=9.5400
    
    S.A=11.0100       C.B=1.5200     :  CostBase=-9.4900   NetDebit=9.4900
    S.A=11.0100       C.B=1.5100     :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=11.0100       C.B=1.5000  I  :  CostBase=-9.5100   NetDebit=9.5100
    S.A=11.0100       C.B=1.4900     :  CostBase=-9.5200   NetDebit=9.5200
    S.A=11.0100       C.B=1.4800     :  CostBase=-9.5300   NetDebit=9.5300
    
    S.A=11.0000 I     C.B=1.5200     :  CostBase=-9.4800   NetDebit=9.4800
    S.A=11.0000 I     C.B=1.5100     :  CostBase=-9.4900   NetDebit=9.4900
    S.A=11.0000 I     C.B=1.5000  I  :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=11.0000 I     C.B=1.4900     :  CostBase=-9.5100   NetDebit=9.5100
    S.A=11.0000 I     C.B=1.4800     :  CostBase=-9.5200   NetDebit=9.5200
    
    S.A=10.9900       C.B=1.5200     :  CostBase=-9.4700   NetDebit=9.4700
    S.A=10.9900       C.B=1.5100     :  CostBase=-9.4800   NetDebit=9.4800
    S.A=10.9900       C.B=1.5000  I  :  CostBase=-9.4900   NetDebit=9.4900
    S.A=10.9900       C.B=1.4900     :  CostBase=-9.5000   NetDebit=9.5000  I
    S.A=10.9900       C.B=1.4800     :  CostBase=-9.5100   NetDebit=9.5100
    
    S.A=10.9800       C.B=1.5200     :  CostBase=-9.4600   NetDebit=9.4600
    S.A=10.9800       C.B=1.5100     :  CostBase=-9.4700   NetDebit=9.4700
    S.A=10.9800       C.B=1.5000  I  :  CostBase=-9.4800   NetDebit=9.4800
    S.A=10.9800       C.B=1.4900     :  CostBase=-9.4900   NetDebit=9.4900
    S.A=10.9800       C.B=1.4800     :  CostBase=-9.5000   NetDebit=9.5000  I
    
    
    -------------------------------------------------------------------------------------------------------
    2)
    help_CC_CSP fCC=1 fOpening=0 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CC Closing:  "CostBase = -S.B + C.A  -->  NetCredit = S.B - C.A"
    
    CC Closing: Good if S.B rises, C.A falls, or both.
       a) If S.B falls (= bad) then C.A should fall as well at least the same amount (the more the better).
       b) If C.A rises (= bad) then S.B should rise as well at least the same amount (the more the better).
    
    BaseSx = S.B = 10.0000
    BasePr = C.A = 2.0000
    Initial CostBase = -BaseSx + BasePr = -10.0000 + 2.0000 = -8.0000
    --> NetCredit = BaseSx - BasePr = 10.0000 - 2.0000 = 8.0000
    
    S.B=10.0200       C.A=2.0200     :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=10.0200       C.A=2.0100     :  CostBase=-8.0100   NetCredit=8.0100
    S.B=10.0200       C.A=2.0000  I  :  CostBase=-8.0200   NetCredit=8.0200
    S.B=10.0200       C.A=1.9900     :  CostBase=-8.0300   NetCredit=8.0300
    S.B=10.0200       C.A=1.9800     :  CostBase=-8.0400   NetCredit=8.0400
    
    S.B=10.0100       C.A=2.0200     :  CostBase=-7.9900   NetCredit=7.9900
    S.B=10.0100       C.A=2.0100     :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=10.0100       C.A=2.0000  I  :  CostBase=-8.0100   NetCredit=8.0100
    S.B=10.0100       C.A=1.9900     :  CostBase=-8.0200   NetCredit=8.0200
    S.B=10.0100       C.A=1.9800     :  CostBase=-8.0300   NetCredit=8.0300
    
    S.B=10.0000 I     C.A=2.0200     :  CostBase=-7.9800   NetCredit=7.9800
    S.B=10.0000 I     C.A=2.0100     :  CostBase=-7.9900   NetCredit=7.9900
    S.B=10.0000 I     C.A=2.0000  I  :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=10.0000 I     C.A=1.9900     :  CostBase=-8.0100   NetCredit=8.0100
    S.B=10.0000 I     C.A=1.9800     :  CostBase=-8.0200   NetCredit=8.0200
    
    S.B=9.9900        C.A=2.0200     :  CostBase=-7.9700   NetCredit=7.9700
    S.B=9.9900        C.A=2.0100     :  CostBase=-7.9800   NetCredit=7.9800
    S.B=9.9900        C.A=2.0000  I  :  CostBase=-7.9900   NetCredit=7.9900
    S.B=9.9900        C.A=1.9900     :  CostBase=-8.0000   NetCredit=8.0000  I
    S.B=9.9900        C.A=1.9800     :  CostBase=-8.0100   NetCredit=8.0100
    
    S.B=9.9800        C.A=2.0200     :  CostBase=-7.9600   NetCredit=7.9600
    S.B=9.9800        C.A=2.0100     :  CostBase=-7.9700   NetCredit=7.9700
    S.B=9.9800        C.A=2.0000  I  :  CostBase=-7.9800   NetCredit=7.9800
    S.B=9.9800        C.A=1.9900     :  CostBase=-7.9900   NetCredit=7.9900
    S.B=9.9800        C.A=1.9800     :  CostBase=-8.0000   NetCredit=8.0000  I
    
    
    -------------------------------------------------------------------------------------------------------
    3)
    help_CC_CSP fCC=0 fOpening=1 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CSP Opening:  "CostBase = -K + P.B  -->  NetDebit = K - P.B"
    
    CSP Opening: Good if P.B rises. S.* not used, K used.
    
    BaseSx = K = 5.0000
    BasePr = P.B = 1.5000
    Initial CostBase = -BaseSx + BasePr = -5.0000 + 1.5000 = -3.5000
    --> NetDebit = BaseSx - BasePr = 5.0000 - 1.5000 = 3.5000
    
    S.A=11.0200       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=11.0200       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=11.0200       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=11.0200       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=11.0200       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=11.0100       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=11.0100       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=11.0100       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=11.0100       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=11.0100       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=11.0000       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=11.0000       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=11.0000       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=11.0000       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=11.0000       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=10.9900       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=10.9900       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=10.9900       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=10.9900       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=10.9900       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    S.A=10.9800       P.B=1.5200     :  CostBase=-3.4800   NetDebit=3.4800
    S.A=10.9800       P.B=1.5100     :  CostBase=-3.4900   NetDebit=3.4900
    S.A=10.9800       P.B=1.5000  I  :  CostBase=-3.5000   NetDebit=3.5000  I
    S.A=10.9800       P.B=1.4900     :  CostBase=-3.5100   NetDebit=3.5100
    S.A=10.9800       P.B=1.4800     :  CostBase=-3.5200   NetDebit=3.5200
    
    
    -------------------------------------------------------------------------------------------------------
    4)
    help_CC_CSP fCC=0 fOpening=0 S.B=10.0000 S.A=11.0000 K=5.00 O.B=1.50 O.A=2.00 n=2
    
    Formula for CSP Closing:  "CostBase = -K + P.A  -->  NetCredit = K - P.A"
    
    CSP Closing: Good if P.A falls. S.* not used, K used.
    
    BaseSx = K = 5.0000
    BasePr = P.A = 2.0000
    Initial CostBase = -BaseSx + BasePr = -5.0000 + 2.0000 = -3.0000
    --> NetCredit = BaseSx - BasePr = 5.0000 - 2.0000 = 3.0000
    
    S.B=10.0200       P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=10.0200       P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=10.0200       P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=10.0200       P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=10.0200       P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=10.0100       P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=10.0100       P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=10.0100       P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=10.0100       P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=10.0100       P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=10.0000       P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=10.0000       P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=10.0000       P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=10.0000       P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=10.0000       P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=9.9900        P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=9.9900        P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=9.9900        P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=9.9900        P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=9.9900        P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    S.B=9.9800        P.A=2.0200     :  CostBase=-2.9800   NetCredit=2.9800
    S.B=9.9800        P.A=2.0100     :  CostBase=-2.9900   NetCredit=2.9900
    S.B=9.9800        P.A=2.0000  I  :  CostBase=-3.0000   NetCredit=3.0000  I
    S.B=9.9800        P.A=1.9900     :  CostBase=-3.0100   NetCredit=3.0100
    S.B=9.9800        P.A=1.9800     :  CostBase=-3.0200   NetCredit=3.0200
    
    
    -------------------------------------------------------------------------------------------------------
    
     
    Last edited: Feb 6, 2024
  3. Quanto

    Quanto

    The tool in real trade action: trying to open a CC for ticker QBTS: current Stock.Ask=0.93.
    If it falls below 0.93 then the CC should get filled (if Call.Bid stays the same, or rises).
    B/c then NetDebit becomes < 0.33 (see table below), my NetDebit offer is 0.33, meaning a fill has to occur.

    This is the expectation, the reality could be different if broker does it "differently"... :)
    We'll see... :)

    Code:
    help_CC_CSP fCC=1 fOpening=1 S.B=0.9235 S.A=0.9300 K=1.00 C.B=0.60 C.A=0.65 n=2
    
    Formula for CC Opening:  "CostBase = -S.A + C.B  -->  NetDebit = S.A - C.B"
    
    CC Opening: Good if S.A falls, C.B rises, or both.
       a) If S.A rises (= bad) then C.B should rise as well at least the same amount (the more the better).
       b) If C.B falls (= bad) then S.A should fall as well at least the same amount (the more the better).
    
    BaseSx = S.A = 0.9300
    BasePr = C.B = 0.6000
    Initial CostBase = -BaseSx + BasePr = -0.9300 + 0.6000 = -0.3300
    --> NetDebit = BaseSx - BasePr = 0.9300 - 0.6000 = 0.3300
    
    S.A=0.9500        C.B=0.6200     :  CostBase=-0.3300   NetDebit=0.3300  I
    S.A=0.9500        C.B=0.6100     :  CostBase=-0.3400   NetDebit=0.3400
    S.A=0.9500        C.B=0.6000  I  :  CostBase=-0.3500   NetDebit=0.3500
    S.A=0.9500        C.B=0.5900     :  CostBase=-0.3600   NetDebit=0.3600
    S.A=0.9500        C.B=0.5800     :  CostBase=-0.3700   NetDebit=0.3700
    
    S.A=0.9400        C.B=0.6200     :  CostBase=-0.3200   NetDebit=0.3200
    S.A=0.9400        C.B=0.6100     :  CostBase=-0.3300   NetDebit=0.3300  I
    S.A=0.9400        C.B=0.6000  I  :  CostBase=-0.3400   NetDebit=0.3400
    S.A=0.9400        C.B=0.5900     :  CostBase=-0.3500   NetDebit=0.3500
    S.A=0.9400        C.B=0.5800     :  CostBase=-0.3600   NetDebit=0.3600
    
    S.A=0.9300  I     C.B=0.6200     :  CostBase=-0.3100   NetDebit=0.3100
    S.A=0.9300  I     C.B=0.6100     :  CostBase=-0.3200   NetDebit=0.3200
    S.A=0.9300  I     C.B=0.6000  I  :  CostBase=-0.3300   NetDebit=0.3300  I
    S.A=0.9300  I     C.B=0.5900     :  CostBase=-0.3400   NetDebit=0.3400
    S.A=0.9300  I     C.B=0.5800     :  CostBase=-0.3500   NetDebit=0.3500
    
    S.A=0.9200        C.B=0.6200     :  CostBase=-0.3000   NetDebit=0.3000
    S.A=0.9200        C.B=0.6100     :  CostBase=-0.3100   NetDebit=0.3100
    S.A=0.9200        C.B=0.6000  I  :  CostBase=-0.3200   NetDebit=0.3200
    S.A=0.9200        C.B=0.5900     :  CostBase=-0.3300   NetDebit=0.3300  I
    S.A=0.9200        C.B=0.5800     :  CostBase=-0.3400   NetDebit=0.3400
    
    S.A=0.9100        C.B=0.6200     :  CostBase=-0.2900   NetDebit=0.2900
    S.A=0.9100        C.B=0.6100     :  CostBase=-0.3000   NetDebit=0.3000
    S.A=0.9100        C.B=0.6000  I  :  CostBase=-0.3100   NetDebit=0.3100
    S.A=0.9100        C.B=0.5900     :  CostBase=-0.3200   NetDebit=0.3200
    S.A=0.9100        C.B=0.5800     :  CostBase=-0.3300   NetDebit=0.3300  I
    
    

    Right now the price matches, but it still has not got a fill ! Suspicious, IMO...:

    Code:
    help_CC_CSP fCC=1 fOpening=1 S.B=0.9225 S.A=0.9281 K=1.00 C.B=0.60 C.A=0.65 n=2
    
    Formula for CC Opening:  "CostBase = -S.A + C.B  -->  NetDebit = S.A - C.B"
    
    CC Opening: Good if S.A falls, C.B rises, or both.
       a) If S.A rises (= bad) then C.B should rise as well at least the same amount (the more the better).
       b) If C.B falls (= bad) then S.A should fall as well at least the same amount (the more the better).
    
    BaseSx = S.A = 0.9281
    BasePr = C.B = 0.6000
    Initial CostBase = -BaseSx + BasePr = -0.9281 + 0.6000 = -0.3281
    --> NetDebit = BaseSx - BasePr = 0.9281 - 0.6000 = 0.3281
    
    S.A=0.9481        C.B=0.6200     :  CostBase=-0.3281   NetDebit=0.3281  I
    S.A=0.9481        C.B=0.6100     :  CostBase=-0.3381   NetDebit=0.3381
    S.A=0.9481        C.B=0.6000  I  :  CostBase=-0.3481   NetDebit=0.3481
    S.A=0.9481        C.B=0.5900     :  CostBase=-0.3581   NetDebit=0.3581
    S.A=0.9481        C.B=0.5800     :  CostBase=-0.3681   NetDebit=0.3681
    
    S.A=0.9381        C.B=0.6200     :  CostBase=-0.3181   NetDebit=0.3181
    S.A=0.9381        C.B=0.6100     :  CostBase=-0.3281   NetDebit=0.3281  I
    S.A=0.9381        C.B=0.6000  I  :  CostBase=-0.3381   NetDebit=0.3381
    S.A=0.9381        C.B=0.5900     :  CostBase=-0.3481   NetDebit=0.3481
    S.A=0.9381        C.B=0.5800     :  CostBase=-0.3581   NetDebit=0.3581
    
    S.A=0.9281  I     C.B=0.6200     :  CostBase=-0.3081   NetDebit=0.3081
    S.A=0.9281  I     C.B=0.6100     :  CostBase=-0.3181   NetDebit=0.3181
    S.A=0.9281  I     C.B=0.6000  I  :  CostBase=-0.3281   NetDebit=0.3281  I
    S.A=0.9281  I     C.B=0.5900     :  CostBase=-0.3381   NetDebit=0.3381
    S.A=0.9281  I     C.B=0.5800     :  CostBase=-0.3481   NetDebit=0.3481
    
    S.A=0.9181        C.B=0.6200     :  CostBase=-0.2981   NetDebit=0.2981
    S.A=0.9181        C.B=0.6100     :  CostBase=-0.3081   NetDebit=0.3081
    S.A=0.9181        C.B=0.6000  I  :  CostBase=-0.3181   NetDebit=0.3181
    S.A=0.9181        C.B=0.5900     :  CostBase=-0.3281   NetDebit=0.3281  I
    S.A=0.9181        C.B=0.5800     :  CostBase=-0.3381   NetDebit=0.3381
    
    S.A=0.9081        C.B=0.6200     :  CostBase=-0.2881   NetDebit=0.2881
    S.A=0.9081        C.B=0.6100     :  CostBase=-0.2981   NetDebit=0.2981
    S.A=0.9081        C.B=0.6000  I  :  CostBase=-0.3081   NetDebit=0.3081
    S.A=0.9081        C.B=0.5900     :  CostBase=-0.3181   NetDebit=0.3181
    S.A=0.9081        C.B=0.5800     :  CostBase=-0.3281   NetDebit=0.3281  I
    
    
    
     
    Last edited: Feb 6, 2024
  4. Cabin1111

    Cabin1111

    Have you considered the issue with market makers??

    No one deals with a true "market" anymore...

    Things like MMs and dark pools come into play big time...
     
    Quanto likes this.
  5. Quanto

    Quanto

    Can you please elaborate the implications. Ie. what exactly does it mean, and how is it relevant for the said issue?
    FYI: I'm submitting my order via a very normal retail brokerage firm (TDA), not directly dealing with or routing to specific MMs or ECN market places etc.; just using the default "SMART" route (or whatever it's called by each brokerage firm).
    And: this is a true CoveredCall order. Don't know whether this counts as a Complex Order and therefore goes to the COB (the 'Complex Order Book') or not.
     
    Last edited: Feb 7, 2024
  6. Cabin1111

    Cabin1111

    Sorry, no I won't. Trying to explain the issues can not be summed up in a few paragraphs.

    Truly it can not be summed up in a book! You would need to read a couple of books to understand the issues.

    But to write any program without taking into consideration MMs is very very buggy...Since they control the bid/ask. There is a reason your stock/option trades are basically free...

    Spend the time and learn why.

    A good lesson...Explain why Citadel Securities made so much money.

    Company type Private
    Revenue US$7.5 billion (2022)
    Number of employees 1,600 (2023)
     
  7. Quanto

    Quanto

    @Cabin1111, it seems you know much less than me, even with your tons of books.... :)
     
  8. Quanto

    Quanto

    My above said order is still open.
    Yesterday I had placed also another such CC order (with DTE=710 ! :)) for a different ticker. That second order luckily just has got a fill.
     
  9. Cabin1111

    Cabin1111

    Here is a gold nugget...Run with it.

     
  10. Quanto

    Quanto

    @Cabin1111, please stay on-topic in my threads. Thx.
     
    #10     Feb 7, 2024