Thursday, 19 October 2017

ODAX Dec 2017 Bear Put Spread

Summary

Today, early in the morning, I bought a ODAX Dec 2017 12650-12600 Bear Put Spread. By definition, this trade is a debit spread, which means that I had to pay 51,5€ to open it while it has a limited maximum profit of 199,5. Those 51,5€ also represent the maximum loss and there is also a low probability of success (the market actually needs to go in my favor before December 17 to make a profit).

DAX on Oct 19 2017 Source Investing
The idea here is betting on a pullback risking little capital. Volatility is too low to open a Credit Put Spread while I already have too much upside expose with the infamous November Iron Condor.

Wednesday, 18 October 2017

ODAX November 2017 Iron Condor adjustment (V)

Summary

30 days remain until November option expiration day and I keep struggling with the Iron Condor deployed at 12800-13200 (about 250 point ITM - In the money). As I collected half of the credit deployed for the 12450-12000 Put Spread, I deployed a new one at 12800-12400.

DAX on October 18th 2017. Source investig
Break-even points are 12932 on the upside and 12668 on the downside. I will happily close the whole thing if we approach to the mid 12900s as time value is getting smaller and smaller. If not, I will try to reduce the max loss figure, which is a scenario more likely to happen day after day.

Tuesday, 10 October 2017

ODAX November 2017 Iron Condor adjustment (IV)

Summary

Disaster mode, with the Call leg almost halfway to the point of reaching max losses. Unlike I said on the last adjustment, I could not pay attention to the markets last Monday, so I did not close the position when it reached the "in the money" level, and now it sits 150 points in the money.

As there is still time-value in the options, I am going to bet a pullback to the 12800 level (the previous resistance) while I rolled the Put leg further up (from 12000-11600 to 12450-12000). If I am wrong, the price to pay will be jeopardizing all the profits made this year and a couple of hundred of Euros more.
DAX on October 10th. Source Investing
The November 2017 12800 Call sits at 63 delta and the 13200 Call sits at 25 delta. Accounting the credit collected, break-even point is at 12910.

Thursday, 28 September 2017

ODAX November 2017 Iron Condor adjustment (III)

Summary

DAX keeps climbing and the Call leg of the trade is getting really close to the money, so I made the last adjustment before closing it. I rolled the put leg from 11500 to 12000.

There are still 50 days to go, so we are three weeks away from the usual 30 days mark when I like to close the trades. Let´s see if I can hold until then and I might break even for this month.

DAX on September 29th. Source Investing
Pretty nice climb during this month, all the way from 11950. Let´s see if the previous 12800 maximum value holds and we have a pullback that allows to close the position in a better condition. If not, I will close it for the bigger loss of 2017 (so far).

Monday, 25 September 2017

ODAX December 2017 Bull Call Spread

Summary

Last week, I bought a Dec 13600 Call at 50€ in order to act as a small hedge against a DAX climb and the threatened Nov 12800 - 13200 Call Spread. Thinking about this during the weekend, I realized that I could have made a better move by buying a bull call spread closer to the money.

Bull Call Spread. Source Wikipedia.
The setup that I could have used, could be this one:

ActionNameDeltaDTEPremium
BUYODAX Dec 2017 134001081-100€
SELLODAX Dec 2017 13600581+50€

I still would have had to pay 50€ and the maximum profits would have been capped to 200 points (950€ considering the paid 50€) but the hedge would have been bigger as the long position is closer to the money (13600 sits at 5 deltas while 13400 sits at 10 deltas).

Anyway, while the IV increased quite a bit, I guess due to the elections last weekend, and with a +0,30% increase in the spot value, I sold the 13650 Call at 51€ in order to enter in a bull call spread:

ActionNameDeltaDTEPremium
BUYODAX Dec 2017 13600581-50€
SELLODAX Dec 2017 1365048151€

This trade allows me to recover the invested premium while caps my profits to 50 points (250€)

Now, I am thinking about deploying a proper bull call spread in December, which should be closer to the money. Ideally IV should drop a bit to make the purchase cheaper.

See also

Tuesday, 19 September 2017

ODAX November 2017 Iron Condor adjustment (II)

Summary

DAX keeps climbing and the volatility is reaching year lows, so I bought a Dec 13600 Call option as a small hedge for further climbs. Also, if the market conditions are the proper ones, it will form the long leg of a possible December 13200-13600 call spread.

DAX on September 19th. Source Investing
By definition, there is very little chance for this option to gain value, but the low IV made it relatively cheap to buy and the November Iron Condor is being threatened on the call side.

Sunday, 17 September 2017

Adapting Hive partitions to different data sizes

Summary

Hive's table partitioning allows the user to have better querying performance as it avoids costly scans over data that is not relevant for the user. This partitioning is based on the data structure to be found in HDFS, as partitions match with directories.

One quite common usage for partitions is time series, which can be modeled like this:

Our TimeSeries entity

Note
: The time-stamp has been decomposed in several columns that will form the partitions. Month and day are TinyInt in order to save space (we might end up having millions of records).

This can be easily partitioned by using this folder structure in HDFS, if we take a look we will see these directories (data shown for our table being partitioned by year and month):


As per the Hive documentation, the most optimal partition size is 2 Gb. What does it happen if you have defined a partitioning system that ends up in production with too big or too small partitions? Here some examples on how can you adjust your partitions using Spark.