Sunday, February 25, 2018

No trade this week; looking for the next one(s)

I am working with QuantGo data to find my next trade ideas. I made progress on importing the data I'm evaluating into a database using this toolset:



Python comes with a terrific feature in its CSV module: it can "sniff" the format of the CSV file in question and automagically figure out how to parse it:

with open('example.csv', 'rb') as csvfile:
    dialect = csv.Sniffer().sniff(csvfile.read(1024))
    csvfile.seek(0)
    reader = csv.reader(csvfile, dialect)
    # ... process CSV file contents here ..

I found SQLAlchemy to be well documented and a pleasure to use ...

Next more database design for auxiliary tables I will need to store the underlying values and the delta of the options, etc.

Also I found on a StackExchange site for quants a post on backtesting so I am trying Orats, but I'm not sure it can do what I want to do ...

More next week ...

Sunday, February 18, 2018

NDX trade wins AGAIN ... unfortunately now only available once per month

I exaggerated in my post from a couple of weeks ago: Nasdaq hasn't completely killed the golden goose, just 3/4 or 4/5 of it ...

The a.m. settlelment is still available Expiration Weeks (for the monthly options only) and Tastyworks even has a lovely UI clue available on this now:


So I put this on just before 10a.m. Thursday as normal and got from $1.35 to $1.77 in credit,
which is 15.6% to 21.5% ... I have been refusing to watch the /NQ futures to keep from being agitated when there's nothing whatever to be done about this trade once the Thursday session closes. (Assuming you don't want to try and buy or sell enough /NQ futures to cover the potential loss ... I considered this in a previous post, but I decided the trade was profitable enough without messing with this.)

But I couldn't resist peeking as I had the biggest trade of this type I've had on since I started using the Kelly Criterion: 25% of the account was at risk. The /NQ futures were above the NDX short call strike all night and into the morning and I thought the trade was dead, dead, dead ... but not so. The NDS (settlement price) was 6779.91. Whew.

So that's it for snooping /NQ ... This is 14 for 15 that I watched this or traded it, which is a 93.33% win rate ...

I need to find another one of these for the other 3 or 4 weeks of the month, so with that in mind I signed up for 6 more months of Quantgo, the data provider that provides access to a reasonable timeframe of data access for a not-awful price ($150/month for the 1-minute trade data that should be all I need to do research on other trades.)

One top candidate I'm going to be looking at: UVXY, a leveraged volativity ETF.

The Dumb Way of using Volatility one came out during the little down move we had early this month:


                RIP XIV and SVXY


These two (XIV was an ETN and SVXY an ETF) were short the front month /VX futures while being long the back month, which in some situations (like early this month) ... can cause the front month to skyrocket while the back month stays put. This is what apparently happened, because XIV went completely under (plug pulled by Credit Suisse, its underwriter for this ETN) ... and SVXY stayed in supposedly just because they didn't "rebalance" when they were supposed to be instead waited for the market to calm down.

That's the dumb way; the reasonable way that would have worked fabulously the last few years would have been just to sell a limited-risk call spread on UVXY (or buy one of the short ones) ... this certainly won the majority of the time the last 5 years, but I want to see exactly how often and how it behaves through weird periods like early this month and January 2016 ... does it lose 2 weeks in a row or more?

I'll have answers on this shortly .... more next week!


Sunday, February 11, 2018

Volatility too much for the TSLA trade: now 3 for 5

The TSLA trade failed last week, making it now 3 for 5. It's out of Kelly Criterion range for sure, now and I'm looking for an alternative.

The one I have for this coming week is the old standby NDX trade, since it's monthly option expiration. But for the following three weeks I need to figure something else out.

One possibility:

Its leveraged ETF is VXX, and I'm going to try both of them by backtesting on a dataset I can get from QuantGo:

They resell options and futures data for a pretty reasonable price. I used their service early 2017 when I was trying to develop an algorithm. I gave up on that but now could use this again to more quickly sort through different underlyings to narrow down candidates to test via monte carlo simulation ...

More next week ...

Saturday, February 3, 2018

Nasdaq killed my goose!

Here I was, about to go 13 for 14 on the NDX trade:

But I got this email just before the close on Thursday:

NDX Weekly PM-settlement Reminder


They (Nasdaq) changed the weekly options from A.M. Friday settlement to P.M. Friday, making a 4-hour (or less) trade into a 10-hour one, which makes all the difference. Especially this past Friday.

What I should have done (at the very least) would be to get up at market open and close the NDX positions. Instead I waited a little later and closed most of the ones I had on and only let one in my personal account (fortunately just a one-lot) go to expiration.

The really annoying part is that this would have in fact been a winner if a.m. settled, as NDS (the NDX settlement value, which is calculated anyway even if NDX isn't using it):

6,871.33

And I'd sold the 6870 put, so this would have been a full winner, again. Rats!


The real carnage in the market started later in the morning:




Fortunately the monthly NDX options are still a.m. settled, so I can still get this trade in 1 of every 4 or 5 weeks. But my plan was to do it every week and I'll have to find one or more substitutes.

That brings us to TSLA, which was 3 for 3 coming into Thursday If I want to do the Kelly Criterion analysis for this one I need to start gathering data, so: 

$0.32   14.6%  (on a $2.50 wide iron condor)
$0.57   29.5%
$0.59   30.9% 
$0.73   41.2%

... but the last one failed ... If I average these 4 I get $0.5525, or 28.3%. 

The Kelly Criterion for this at a 75% win rate is negative (i.e. "no bet!") But if I change the rate to 80%, it suggests you bet 9% of your account ...

More next week ...





Saturday, January 27, 2018

Another winning week ... TSLA traitor notwithstanding ...

The NDX trade won again, now 12 for 13 (92.3%) winners. And for some reason volatility was up a bit this week (even though the market remained at record highs), so I received:

  • $2.54 (34.05%)
  • $2.51 (33.51%)
  • $2.00 (25%)
That's over $500 profit on 2 contracts of this trade ...

Now to TSLA:


This is the Gigafactory, where Tesla makes batteries at scale, hoping to bring the price per unit down.
But on Thursday from CNBC, some employees leaked:


Tesla employees say to expect more Model 3 delays, citing inexperienced workers, manual assembly of batteries


I had sold the 340 put and the 352.50 call, and so when I saw this:


... around 11a.m. Friday I went ahead and closed the put spread for a small loss.
But as you can see from the chart, if I'd held on I could have made full profit on this
trade as the price recovered over $340 just before the close.

Profit I would have made: $0.59 / $1.91 = 30.8%!

Another small mistake to get over with during the test phase for this one ... but officially the TSLA trade is now 3 for 3: 100%!

More next week ...

Sunday, January 21, 2018

A look at real returns over the period I've been trading NDX

I started testing the NDX trade with 1-lots (the minimum) on Thursday, October 26, 2017. Since then, the main account I've been testing with is up from $5126 to $6903. This is nearly 35%!

... for just those 13 weeks. And I was just testing, trading 1-lots ... if I'd been using the 1/2 Kelly Criterion I'd have lost more the first week but gained double or more for the following 10 weeks ... I calculate the gain would then have been in the range of 50%!

Getting back to the realm of speculation, but standing on the real test results of the past 13 weeks and assuming 91.7% wins on a firm footing, I think:  the one-year Monte Carlo mean result if I assume 15 percent gain on each winning trade and 100% loss on each losing one, risking 33% of the account always:


Finally, if I assume the same as the above run but with an average 20 percent gain: 334%!

And: that's assuming 100% loss on every losing trade, which almost certainly won't be that extreme ...

Wahoo!






Saturday, January 20, 2018

This week's results: another win for both trades!

We've reached the expected 91.7% win rate for the NDX trade; it's now 11 for 12.
There was for some reason more volatility this week, so NDX paid $1.75 to $1.80 (i.e. 21.212% to 21.951% on margin). If you (following around 1/2 of the Kelly criterion) risk 30% of your account on the trade, that's over 6% for the week!

The TSLA test trade also worked, returning 57 cents on a $2.50 wide iron condor, so $0.57 / $1.93 = 29.5%! It was looking a little scary end of day Thursday but recovered nicely into the groove on Friday:


We don't have enough data yet to project the Kelly Criterion for this one, but 30% of your account risked would yield 9% for the week!

More next week ...