Saturday, June 29, 2013

aapl mini-puts under pressure but cost basis is reduced.


because of the beating aapl took recently my aapl mini-calendar manufacturing biz experienced some pressure.  previously, i had been rolling short mini-puts at the 435 strike every week for a credit. my records show that the previous calendar sale only reduced cost basis by 20 cents.  prior to friday, june 28, my cost basis in the 30 aapl shares represented by the short puts had been eased down to 425.35 (including commissions.) that means if i had been exercised early i would own 30 shares of aapl for a net cost of 425.85 (the $15 exercise fee adds 50cents/share.)

because of the decline my short puts at the 435 strike due to expire on july 5 were in danger of an early exercise. the danger signs were that the delta on those options had reached -1 and the extrinsic value had declined to 1.5 cents.

the corrective action i took was to buy back the 435 puts and sell the jul 405 puts for a debit of 24.75. this relieves the pressure of early exercise, adjusts the short strike into a sweeter area for premium sales and  reduces cost basis. this last bit is important to understand if you engage in these sorts of trades. i reduced the exercise price by $30 for a cost of $24.75 and the difference of $5.25 reduced my cost basis to $420.10. this came about because the jul 405 puts had about $5.25 of time-value. to be sure, my trade realized a loss $24.75/share but letting the options get exericised would have realized a larger loss of $29.32/share (=425.85-396.53) and now i can more quickly recover this smaller loss by further sales of near-the-money calendars. furthermore, aapl is now within sight of the july earnings date which tends to elevate premium and maybe price as well.

in any case, the cost basis keeps reducing!

Thursday, June 27, 2013

thinkscript included: sdi_gma - geometric moving average

the geometric average is an alternate way that mathematicians define average. it is defined as the nth root of the product of the data points or:
(x1*x2*x3...*xn)^(1/n)
this was mentioned by the tastytrade geek as his preferred method of calculating averages.

my interest in the geometric mean is mainly that it is a challenge to expand my knowledge of thinkscript because the calculation necessitates the use of the fold statement.

to compute this average for any number of data points it is necessary to transform the definition of the geometric average by use of algebra which i do by applying the associative rule for exponents:
(a*b)^n = a^n * b^n
 thus the working definition for the algorithm becomes:
x1^(1/n) * x2^(1/n) ... *xn^(1/n)
performing the calculation this way keeps the intermediate results of the product from overflowing the numerical limits of thinkScript variables.

here is the thinkscript:
########################################################
# sdi_gma: geometric moving average
#hint: Displays the geometric moving average. rev: 1.0
http://www.smallDogInvestor.com
# author: allen everhart
# date: 6/26/2013
# copylefts reserved. This is free software. That means you are free
# to use or modify it for your own usage but not for resale.
# Help me get the word out about my blog by keeping this header
# in place.
input price = close;
input length = 9;
plot gma = (fold n = 0 to length with s=1 do s*power(getValue(price, n),1/length));

###########################################################

the fold statement is the thinkscript equivalent of a for loop in other general purpose languages. in my use of the fold statement above, the loop repeats length times and the intermediate value of the loop counter is stored in the variable, n. the variable, s, is intermediate storage for the do expression which implicitly assigns the result of the expression to s on each iteration of the loop. it is necessary to use the getvalue function because thinkscript does not allow variables to be used in subscripting (the standard method of historical reference denoted by square brackets [].)

to demonstrate why this script is only a programming exercise just take a look at this chart which compares the 50 period simpleMovingAverage(green solid line) to a 50 period plot of sdi_gma(red dashed line):

the geometric average is always a smidgen less than the arithmetic average. there might be a larger difference for prices that dip below 1 because the geometric average overweights numbers between 0 and 1. in the extreme case where a price is zero the geometric moving average would plot as a horizontal line at value zero.

there are several uses of the fold statement i have in mind, one of which is a rewrite of my seapro study to allow the selection of the number of seasons to average.

best.
-allen    

Saturday, June 22, 2013

thinkscript included: percent change from open on watchlist

my daytrader friends asked me to write this custom column thinkscript:
################################
# sdi_pctChgFromOpen: plots the percentage change from the opening price in a way that is appropriate for a watchlist custom column.
#hint: plots the percentage change from the opening price in a way that is appropriate for a watchlist custom column. rev: 1.0 http://www.smallDogInvestor.com 
# author: allen everhart
# date: 22june2013
# copylefts reserved. This is free software. That means you are free
# to use or modify it for your own usage but not for resale. 
# Help me get the word out about my blog by keeping this header

# in place.
plot x=round(100*((close/open)-1),1);
x.assignValueColor( if x < 0 then color.RED else color.Dark_GREEN);

#################

here's what this custom column looks like on a watchlist:
percent change from open custom column

here's how to install a custom column:
  1. right click on the heading of the watchlist and select Customize
  2. scroll down the Available Items list and double left-click on the scroll icon of any Custom column
  3. in the Custom Quote Formula dialogue, select the ThinkScript Editor tab
  4. in the editor textbox replace SimpleMovingAvg() with a cut-n-paste of the thinkscript above. 
  5. in the Column Name entry box select a reasonable column name such as "%ochg" (not too many characters)
  6. click ok
  7. select the "%ochg" column from the Available Items list and click the Add Item button
  8. click ok
Best.
-Allen

Monday, June 3, 2013

should i wait or should i roll ... slw?

earlier i shorted a jun put on slw at the $22 strike, collecting a 70 cent credit. time and price have conspired to reduce the value of that put to 20 cents for a 50 cent gain. so the question is should i wait for more time to elapse, reducing the value of this put further or buy it back and sell the july 22 put? the thinkorswim analyze tab can help with this decision:

slw roll analysis
in this analysis the red line shows the credit of the roll wrt the underlying's price at june expiration and the white line shows how this credit will vary with today's price movement. in this view, more negative values represent greater roll-credit. as time elapses the white line will merge with the red line. if the current price of slw holds level through expiration then time decay will worsen the roll-credit so i have elected to roll now. my cost of manufacture of this calendar is merely the commissions i pay to my broker to buy and sell the options or 3 cents, wrt the option price. i got filled at 33 for a net gain of 30cents.  if i were assigned today my cost of ownership of 100 shares of slw would be $21.17(=22 -.70 - .33 + .045 + .15) including commissions and assignment fee.

after this positive experience with slw i have also decided that a business this good should be expanded. to that end, i bought three jan14 puts at the $15 strike for 50 cents and sold 2 more july puts at the $22 strike. the effect of this is to convert my cash covered put trade into a wide diagonal. the $15 strike was chosen because that is about 2/3 of 22 and this keeps the buying power allocated to this trade level with the initial position. there are 6 monthly rolls between july and and january with which to amortize the 50 cents paid for the $15 strike puts which adds 9 cents to the cost of rolling for a total of 12 cents of manufacturing cost for these monthly calendars.

Sunday, June 2, 2013

dow/gold is a tweener

the dow/gold has lifted above 10. economists look at this ratio to subtract inflation from chart comparisons over decades of history. during good economic times this ratio sits around 20. it is now 10.8 after recovering from 5.9 during the s&p downgrade:


this break into the tweener (10-12) range came on the first test courtesy of cypress.

is ben bernanke looking at this and thinking, "glass half full" ?