Labels

Saturday, August 11, 2018

Statistical Mechanics of Algorithmic Day Trading SP500, Part III: Take Profit & White Swans in Algorithmic Day Trading

INTRODUCTION


The probability distribution of SP500 daily return was calculated and posted in Part I. The calculations showed that the Efficient Market Hypothesis is a good approximation, i.e. most of the time the daily return of SPX index is a variable with close to zero expectation which equates day trading to gambling against a house. The house has the statistical advantage due to the trading fees. In Part II, it was shown that both for longs and shorts a positive expectation can be achieved using  "cut your losses early and let your winners run" approach. 

On algorithmic level this approach was formulated as follows:

1. Every trading day: if no position open SPX position at the close of the trading session;
2. Next day: if return < StopLoss than close the position.


When the only parameter in this algorithm (StopLoss) is optimized the algorithm is expected to outperform the total return of SP500 (see Part II). Here we modified the algorithm by introducing the TakeProfit variable.

Friday, August 10, 2018

+$800, Algorithmic Day Trading SP500

Recently I posted the historical statistics of SP500 daily return.  It turned out that the Efficient Market Hypothesis is very close to reality in the case of SP500 day trading. Most of the time the probability of win is a randomly distributed variable and no chances for a  day trader to outperform the market. However, if optimized, "cut your losses early and let your winners run" algorithm has a theoretical chance to beat the market. Keep in mind that the real working algorithm needs more ingredients.
Below are the results (in /ES points) for the past two weeks of medved's proprietary day trading robot : 


8/2/2018 24
8/7/2018 0.5
8/8/2018 -4
8/9/2018 -4.25
Total: 16.25

Sunday, August 5, 2018

Statistical Mechanics of Algorithmic Day Trading SP500, Part II : Generic Algorithm of Day Trading

“Number rules the universe.”
― 
Pythagoras

INTRODUCTION
In Part I, the probability distribution (density) of SP500 daily return was calculated. It was shown that a directional day trade is not much different from a toss of a fair coin - 0.47 shorts, 0.53 longs. At best a directional daytrader has a close to zero expected value of return. It can be said that the ensemble of the directional daytraders exists only to generate trading fees while their wins and losses eventually cancel each other.

To make day trading profitable one needs to shift the probability distribution to have a positive expected value of return.  The figure below demonstrates how the proverbial "cut your losses early and let your winners run" can be tested in a quantitative fashion. I believe that this is how instead of fear of uncertainty one acquires a conviction.



Friday, August 3, 2018

short SP500 : entry #3

This is a continuation of the macro-trend trade. Rising rates and a bull market don't end up well together. The trading strategy is to sell out of the money naked call options. So far the trade produced  2 wins and 0 loss. Today I sold /ESU8 3000 Call which has 4% chance to end in the money.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
8/3/2018 14:24 SINGLE SELL -1 TO OPEN /ESU8 1/50 SEP 18 /ESU8 3000 CALL 1.3 1.3 LMT

#silver : utilizing SKEW

Theoretically, a naked Put with a certain delta can be replaced by the same delta covered Call. Unlike SP500 selling Calls is more profitable in silver. Sometime Premium in Calls is 2-3x of that in Puts. Yesterday I converted seven contracts to utilize this difference:


Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
8/1/2018 13:04 SINGLE BUY 7 TO OPEN SLV 17-Jan-20 10 PUT 0.02 0.02 LMT
8/1/2018 13:02 STOCK BUY 700 TO OPEN SLV ETF 14.51 14.51 LMT
8/1/2018 13:01 SINGLE SELL -7 TO OPEN SLV 17-Jan-20 16 CALL 1.03 1.03 LMT
8/1/2018 12:59 SINGLE BUY 7 TO CLOSE SLV 18-Jan-19 16 PUT 1.61 1.61 LMT

Breakeven for this tranch is @13.90 now; max return is 100% on risk.

Sunday, July 29, 2018

+ $700 after fees, #SP500 #daytrading #algotrading

In the past two weeks, Medved's day trading algorithm generated 6 trades. The result is 15.75  points of emini futures which is slightly more than $700 USD after fees.

7/16/2018 1.75
7/20/2018 -2
7/23/2018 11
7/24/2018 -6.5
7/26/2018 -5
7/27/2018 16.5
Total: 15.75

Friday, July 27, 2018

+$1200 #WTI #RBOB pair #trade : flat

Out @20.436. 
Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack
20.436
7/27/2018 13:29 FUTURE BUY 2 TO CLOSE /CLU8 18-Sep FUTURE 68.52 68.52 MKT
7/27/2018 13:29 FUTURE SELL -2 TO CLOSE /RBU8 18-Sep FUTURE 2.118 2.118 MKT



Wednesday, July 25, 2018

+$1500 #WTI bought back puts

Oil price is up today;  there is little of extrinsic value left in the puts.  Ergo tis time for a buyback.
Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/25/2018 12:33 SINGLE BUY 1 TO CLOSE /CLU8 1/1000 SEP 18 /LOU8 65.5 PUT 0.37 0.37 LMT
7/25/2018 12:33 SINGLE BUY 1 TO CLOSE /CLU8 1/1000 SEP 18 /LOU8 65.5 PUT 0.37 0.37 LMT

The trade entry was posted here. 


Saturday, July 21, 2018

Uranium portfolio update.

Today 15 Calls expired out of the money - profit $40 USD.
13 & 14 puts expired in the money - plus 200 shares of URA ETF.
Currently, I have 400 shares of URA @13.40.

Friday, July 20, 2018

SP500 $50 USD dollars, emini 2915 Call goes to heaven :1 point

I will try to renew the short position in SP500 around  Amazon's earnings.  The short SP500 macro-trend trade is based on the observation that in rising rate environment SP500 has a limited potential for a rapid price appreciation.  The trade profits from the theta decay.





Thursday, July 19, 2018

#Silver 80% on Risk , Commodity Investing for Interest Income

Commodity prices remain under pressure in 2018. That is a good opportunity to create a small-scale commodity portfolio with interest payment similar to that in real estate investing. Uranium and Silver were selected for my portfolio. These minerals at at lows of their mining cycles.  Today I bought 500 shares of SLV, sold calls and bought protective puts. Maximum return on the risk is about 80%.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/19/2018 10:57 SINGLE BUY 5 TO OPEN SLV 17-Jan-20 10 PUT 0.04 0.04 LMT
7/19/2018 10:50 STOCK BUY 500 TO OPEN SLV ETF 14.3783 14.3783 LMT
7/19/2018 10:49 SINGLE SELL -2 TO OPEN SLV 17-Jan-20 16 CALL 0.98 0.98 LMT
7/19/2018 10:49 SINGLE SELL -1 TO OPEN SLV 17-Jan-20 16 CALL 0.98 0.98 LMT
7/19/2018 10:49 SINGLE SELL -1 TO OPEN SLV 17-Jan-20 16 CALL 0.98 0.98 LMT
7/19/2018 10:49 SINGLE SELL -1 TO OPEN SLV 17-Jan-20 16 CALL 0.98 0.98 LMT


Monday, July 16, 2018

Statistical Mechanics of Algorithmic Day Trading SP500, Part I : Probability Distribution of The Daily Return

      “Number rules the universe.”― Pythagoras


SP500 market is characterized by both deep liquidity and high daily volumes. The popular instruments for trading SP500 index are SPY, SPX and Emini (/ES) futures.   At current prices of SP500 a daily move in Emini futures can easily exceed $1000 while, for example, ThinkOrSwim trading platform requires only ~ $6000 as the initial margin. Consequently, a SP500 daytrader is attracted by the idea to get rich fast like a moth to a flame; more than 90% of retail traders end up losing money. It is reasonable to ask thenWhy do people trade at all?- and is it possible to make money by day trading SP500. The answer to the first question is not an easy one as it involves many facets of our life. I believe that to a large degree it is related to being in a poor financial situation.

To answer the second question I used the statistics of one regular trading session of SP500 index. The probability distribution of the daily return of SP500 was presented in the first part of this publication. It was shown that day trading of SP500 is similar to a coin toss with even payout and with a small favor for betting from the long side. In the second part, a generic methodology of algorithmic day trading for a retail investor will be derived based on the calculated statistics. 

#silver $SLV : bought Puts

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/16/2018 11:48 SINGLE BUY 16 TO OPEN SLV 17-Jan-20 10 PUT 0.02 0.02 LMT
7/16/2018 11:39 SINGLE BUY 6 TO OPEN SLV 29-Mar-19 12 PUT 0.06 0.06 LMT
7/16/2018 11:37 SINGLE BUY 4 TO OPEN SLV 31-Dec-18 12 PUT 0.03 0.03 LMT

#soybean : bought Calls

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/16/2018 9:53 SINGLE BUY 2 TO OPEN /ZSU8 1/50 SEP 18 /OZSU8 900 CALL 9.5 9.5 LMT

Friday, July 13, 2018

#SP500 #daytrading #algotrading : 6 points after fees

In the past week, Medved's day trading algorithm generated 5 trades. The results ( in emini futures points) are as follows:

7/9/2018 8
7/10/2018 -5.25
7/11/2018 -7.5
7/12/2018 8.25
7/13/2018 3.25
Total: 6.75

The previous period was posted here.

There are rumors that Trump's administration manipulates commodity prices

Financial Times - "US cuts forecast for soybean exports to China". The forecast is that when tariff war would force to negotiate a compromise  “ ... you’re going to see a spike in soybean prices, not just a rise”. There are tin foil hat rumors that tariff wars are used by Trump's administration to manipulate commodity prices in favor of people running ICE exchange.

#soybean : trade update

 /ZSU8 soybean futures came close to the protective put @800.  Rolling into /ZSX8 gives some positive theta and keeps the trade alive; the rolling loss is 65 points per contract. As it was explained in the "Soybean Crash" post, the recovery of soybean price is a reasonable assumption here.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/13/2018 11:34 SINGLE SELL -1 TO OPEN /ZSX8 1/50 NOV 18 /OZSX8 900 CALL 19.25 19.25 LMT
7/13/2018 11:34 FUTURE BUY 2 TO OPEN /ZSX8 18-Nov FUTURE 835.5 835.5 LMT
7/13/2018 11:33 SINGLE SELL -1 TO OPEN /ZSX8 1/50 NOV 18 /OZSX8 900 CALL 19.25 19.25 LMT
7/13/2018 11:20 SINGLE SELL -2 TO CLOSE /ZSU8 1/50 SEP 18 /OZSU8 800 PUT 14.375 14.375 LMT
7/13/2018 11:20 FUTURE SELL -1 TO OPEN /ZSU8 18-Sep FUTURE 826 826 LMT
7/13/2018 11:20 FUTURE SELL -1 TO OPEN /ZSU8 18-Sep FUTURE 826 826 LMT

Thursday, July 12, 2018

#WTI #RBOB pair #trade : rolled and sold puts

Oil gasoline pair trade remains a problem child. I have rolled Simple Crack Spread from Q8 to U8 cycle.  Also, I have sold puts according to the plan outlined in the "When a pair trade goes wrong " post. As a reminder, the rolling P/L is at about -$6000; the realized profit from the closed hedges against this position is about $5300.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack
7/12/2018 11:42 FUT CALENDAR SELL -1 TO CLOSE /RBQ8 18-Aug FUTURE 2.0575 0.0255 MKT 16.685
BUY 1 TO OPEN /RBU8 18-Sep FUTURE 2.032 CREDIT 16.674
7/12/2018 11:42 FUT CALENDAR BUY 1 TO CLOSE /CLQ8 18-Aug FUTURE 69.73 1.06 MKT
SELL -1 TO OPEN /CLU8 18-Sep FUTURE 68.67 DEBIT
7/12/2018 11:40 SINGLE SELL -2 TO OPEN /CLU8 1/1000 SEP 18 /LOU8 65.5 PUT 1.02 1.02 LMT
The previous trades were posted live in this thread.

Tuesday, July 10, 2018

+$650 #WTI : bought back puts

For more than two years in a row selling  /CL puts was a 100% winning strategy.  I think that at some point rising rates will kill this bull market in oil. It is time to switch to a delta-neutral strategy like Iron Condor.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/10/2018 9:41
SINGLE BUY 1 TO CLOSE /CLZ8 1/1000 DEC 18 /LOZ8 50 PUT 0.16 0.16 LMT
7/10/2018 9:36 SINGLE BUY 1 TO CLOSE /CLQ8 1/1000 AUG 18 /LOQ8 70 PUT 0.09 0.07 LMT
7/10/2018 9:36 SINGLE BUY 1 TO CLOSE /CLQ8 1/1000 AUG 18 /LOQ8 70 PUT 0.09 0.07 LMT


   The trade entries were posted live here and here

Monday, July 9, 2018

#silver $SLV : long-term income #trade

I continue selling calls against SLV which makes the trade work like a rental income.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/9/2018 11:23 SINGLE BUY 6 TO OPEN SLV 17-Jan-20 9 PUT 0.01 0.01 LMT
7/9/2018 11:13 SINGLE SELL -6 TO OPEN SLV 17-Jan-20 17 CALL 1.09 1.09 LMT
7/9/2018 11:11 STOCK BUY 600 TO OPEN SLV ETF 15.1746 15.1746 LMT

+$800 #WTI #RBOB pair #trade : scaled out @15.58

I keep scalping  Simple Crack Spread - gasoline oil pair trade - using /CLQ8 and /RBQ8 futuresThe previous entries are here.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack
15.581
7/9/2018 9:26 FUTURE BUY 1 TO CLOSE /CLQ8 18-Aug FUTURE 73.9 73.9 MKT
7/9/2018 9:26 FUTURE SELL -1 TO CLOSE /RBQ8 18-Aug FUTURE 2.1305 2.1305 MKT

Friday, July 6, 2018

+$500 : #SP500 #daytrading #algotrading

Since  June 21st, medved's day trading algorithm generated 5 trades. The results ( in emini futures points) are as follows:

6/25/2018 2.75
6/27/2018 -15
6/28/2018 18
6/29/2018 -11.75
7/2/2018 16.5
Total: 10.5


The previous period was posted here.

Q8 #WTI #RBOB pair #trade : scaled in @14.77

The rollercoaster in Q8 Simple Crack Spread continues. The first hurricane is approaching.  The gasoline oil futures spread may spike anytime now.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack
14.7712
7/6/2018 14:32 FUTURE SELL -1 TO OPEN /CLQ8 18-Aug FUTURE 73.79 73.79 MKT
7/6/2018 14:32 FUTURE BUY 1 TO OPEN /RBQ8 18-Aug FUTURE 2.1086 2.1086 LMT

Wednesday, July 4, 2018

#WTI #RBOB pair #trade : sold puts again

When a pair trade goes wrong one can try to sell theta.


Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type
7/4/2018 9:27 SINGLE SELL -1 TO OPEN /CLQ8 1/1000 AUG 18 /LOQ8 70 PUT 0.3 0.3 LMT
7/4/2018 9:27 SINGLE SELL -1 TO OPEN /CLQ8 1/1000 AUG 18 /LOQ8 70 PUT 0.3 0.3 LMT

Tuesday, July 3, 2018

+$400 #WTI #RBOB pair #trade : scaled out @14.98

Gasoline Oil spread remains very volatile. I use this volatility to improve the basis while waiting for another summer spike in the price of gasoline.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack
14.9868
7/3/2018 11:49 FUTURE BUY 1 TO CLOSE /CLQ8 18-Aug FUTURE 73.44 73.44 MKT
7/3/2018 11:49 FUTURE SELL -1 TO CLOSE /RBQ8 18-Aug FUTURE 2.1054 2.1054 LMT