Sunday, August 19, 2018

Mathematics of "Why Day Traders Lose Money"

Mathematical statistics explains three major reasons behind the frustrating reality that nearly all day traders lose money.

1. Instead of "cut your losses early and let your winners run" a trader usually is inclined to "take the profit early and let the losers run". This type of behavior is dictated by emotions while statistical analysis showed that taking profit early leads to a negative expectation. Let the losers run in day trading is a recipe of "how to lose your deposit quick".

2. The second reason has to deal with the mathematical fact that for a trader who has a limited capital having a strategy with a positive expectation is a necessary condition to win but it is not a sufficient one. Proper position sizing is required to be a profitable trader.

Let us describe the problem in simple terms.  As I posted earlier, day trading can be approximated by a toss of a biased coin. Now imagine that a trader has $1000 and he/her knows a strategy equal to a coin biased as follows -  2/3  heads and 1/3 tails. If this trader every time goes all in on heads than, at some point, all wins and the initial $1000 will be lost.  There is a limit to how big fraction of the capital this trader can bet on a single toss to avoid the ruin and there is an optimal bet which allows this trader to grow the capital with the fastest rate. The mathematical solution to this problem is known as the Kelly criterion.  For the coin used in the example above, the Kelly gives  2/3-1/3=1/3 as the optimal fraction of the capital to bet. This solution involves a mathematical idealization that the capital can be dived as many times as it requires and an infinitesimally small bet is possible. Unfortunately, unless a trader has enough money to start with say 100 emini contracts, the Kelly criterion can't be used directly by a small-scale day trader.  However, this criterion still can be used to prevent a day trading strategy from running into a ruin.
To summarize, the problem of the optimal bet in the leveraged trading on time frames with the quasi-normal distribution of the return (day or shorter time frames) is still, at least to me, an open question.
I will try to look into this problem.



3. The third reason is the cost of trading which includes trading fees and a slippage. Due to the very nature of day trading many wins and losses eventually just cancel each other while as time passes by the cost of trading steadily adds to the loss.  For this reason, many quant strategies that look good on paper do not deliver in real life. Here one has to :
  a) daytrade using only liquid trading instruments;
  b) choose a broker with a better fee structure;
  c) use the realistic cost of trading in calculating the expected return of a trading model.

Friday, August 17, 2018

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

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.

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.



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. 

#WTI #RBOB Simple #Crack Spread Pair #Trade

 How to calculate and trade Simple Crack Spread using RBOB and WTI Futures. 

Friday, June 22, 2018
Scaled in @17.4; tis a berry painful trade. I Feel Like I'm Taking Crazy Pills


Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack
17.431
6/22/2018 11:31 FUTURE SELL -1 TO OPEN /CLQ8 18-Aug FUTURE 68.06 68.06 MKT
6/22/2018 11:31 FUTURE BUY 1 TO OPEN /RBQ8 18-Aug FUTURE 2.0355 2.0355 MKT


Wednesday, June 20, 2018

The U.S.  gasoline price decreased.  Let us wait for a summer spike in gasoline price and try to do some scalping at the same time.

Scaled in @18.71


Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack_Spread
18.7126
6/20/2018 12:18 FUTURE SELL -1 TO OPEN /CLQ8 18-Aug FUTURE 65.51 65.51 MKT
6/20/2018 12:18 FUTURE BUY 1 TO OPEN /RBQ8 18-Aug FUTURE 2.0053 2.0053 LMT

Monday, June 18, 2018

Scaled out @20.27 for $100 ;  the basis is @20.87 now.

Exec TimeSpreadSideQtyPos EffectSymbolExpStrikeTypePriceNet PriceOrder TypeCrack_spread
20.2728
6/18/2018 10:23
FUTUREBUY
1
TO CLOSE/CLQ8
18-Aug
FUTURE
64.92
64.92
MKT
6/18/2018 10:23
FUTURESELL
-1
TO CLOSE/RBQ8
18-Aug
FUTURE
2.0284
2.0284
LMT

Friday, June 15, 2018

Scaled in @20.17.

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack_Spread
20.1696
6/15/2018 10:46 FUTURE BUY 1 TO OPEN /RBQ8 18-Aug FUTURE 2.0338 2.0338 MKT
6/15/2018 10:46 FUTURE SELL -1 TO OPEN /CLQ8 18-Aug FUTURE 65.25 65.25 MKT


Thursday, June 14, 2018

In line with my expectation, Q8 Crack spread is cheaper today. Having a long position here is a good idea as at summer seasons this pair is prone to sudden spikes.


Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Crack_Spread
20.968
6/14/2018 11:05 FUTURE BUY 1 TO OPEN /RBQ8 18-Aug FUTURE 2.079 2.079 MKT
6/14/2018 11:05 FUTURE SELL -1 TO OPEN /CLQ8 18-Aug FUTURE 66.35 66.35 MKT

Why do I buy cheap OTM puts?

SLV credit puts spreads is the core of my Income Portfolio. A typical spread is -1 16 Put hedged with +1 13 Put.  Almost always  I have a feeling that cheap OTM puts are a useless waste of money. I have to suppress this emotion because back in 2008 SLV printed $8.5. If a financial crisis like in 2008 will happen again and the SLV price will drop say to $10 the baseline for me will shift $3 down but the income strategy will keep yielding interest. It turns out that Mark Spitznagel has a similar approach to risk hedging.

Small-scale Trading That Works Similar to Income from Real Estate Investing

Part I: Upstream against Currency Devaluation

For all practical purposes, 1964 marks the last year when regular quarters minted in the USA were suitable for value storing by a regular person. 54 years later, in 2018, 1964 Washington silver quarter costs about $3. Isn't it an interesting and dangerous question - to whom  11/12 of the original value was transferred? 
Another important observation is that those- before 1964- folks were paid interest without losing the real value. A modern investor has to operate in the monetary environment constructed to deplete the principal value of a cash account by virtue of the hidden currency devaluation. Let us estimate the rate of USD devaluation using the value of 1964 Washington silver quarter -  (1-x) ^54=1/12.  The answer is x = 0.045. It means that - 

No matter what they say in their official reports, the calculation showed that the value of $1 decreases with the rate of ~4.5% per year.


Now, the formula to calculate the real return on a cash account reads:


Real ROI = (1 - Tax Rate/100) x ROI - Currency Devaluation Rate,


where ROI stands for the return on investment. Say if your tax rate is 25% than Real ROI for the cash account becomes positive if you make > 6% per year.



Part II:  Residential Real Estate Investing. 


Middle-class individuals often choose to invest in real estate as a way to receive interest without losing the real value. For example, currently a 1400 square feet, 2 bedrooms, 2 1/2 bath condo in Miami-Dade, Florida costs ~$200,000. If rented out, such a property generates cash flow of  $1300 rent per month, minus management fee of about  $200-300 per month, and minus property tax which is about $2,000 per year. Altogether it is about 5% ROI per year.

Real ROI = (1 - Tax Rate/100) x (ROI - Depreciation Rate), 

Let us use IRS allowed number, 3.636%, for the depreciation rate. In this case, if your tax rate is 25% than Real ROI in the described above residential property is ~1% per year.  For investors in Miami-Dade residential properties, it means that in 2018 all future rental incomes are nearly priced in the current price. Well, at least the wealth is protected from the silent erosion by $ devaluation. Real Estate Investing in Miami-Dade was way more attractive back in 2010-4 when the same condo yielded between 6 and 4%.


Part III:  Small-scale Stock Investing.


 SP500, Historical data.
Real estate investing is a capital-intensive business while according to some recent publications in media outlets,  many people in the USA have no $500 of free cash. Now let us think of a person who wants to accumulate wealth by small-scale savings while collecting interest. Since this individual has to beat $ devaluation (see Part I), small-scale investing in stocks of a dividend-paying company looks like a natural choice here. This choice, however, creates an additional risk cause a lot of companies tend to lose business and at some point, nearly all of them will go bankrupt.
Thus it is better for our small investor to buy a dividend-paying index fund.  For example, in 2018 before tax SPY pays ~1.8% of interest.  Similar to real estate investing, the chronical problem here is the overstretched valuation of the attractive companies which typically goes hand in hand with debt expansion cycles. A debt expansion cycle is usually followed by a prolonged period of bad ROI. From 1970 to 1980 SP500 dropped from ~$700 to $300 while, for example, WTI oil skyrocketed from $20 to ~$120. It is difficult to predict when and at what price the next top in SP500 will happen, but the phenomenon of lost decades is amply demonstrated by the historical chart of SP500 index.

Part IV:  Small-scale commodity investing.


Commodity investing is another way to fight currency devaluation. Beware that the entry point has to be close enough to the lows of a commodity cycle. Typically a long period of oversupply and of depressed prices is followed by a period when the demand becomes larger than mining supply. The price will stay depressed until the overground stocks are depleted. Usually, there is enough time to gather information and make an investment decision. 

Silver
At the beginning of 21st century, the rise of digital photography had eliminated about half of the industrial demand for silver. After it, the investment demand was oversaturated in the bubble of 2011. The price of silver was depressed since then. With the widespread adoption of electronic gadgets the situation has changed and in 2017 for the first time in many years, the total demand for silver is larger than mining supply. Silver ETF, SLV, is an ideal choice for a small-scale commodity investing. Interest can be collected by selling out of the money calls against SLV stocks (SLV has liquid options). At the same time, this approach allows profiting from price appreciation in the rising phase of the mining cycle. That easily beats currency devaluation. Here is an example of value investing in SLV stocks using just $3600.

Uranium
"In 2018 Uranium supply is getting short, Uranium demand is growing while the number of the active mines is dropping worldwide. When the overground stocks of Uranium will go, the price will explode. Here one can get a solid return on the investment while participating in the liquid market.  Indeed, for the next several years, aggressive trading strategies like stock replacement by debit call spread may yield a spectacular return ...."

Stocks of Uranium ETF, URA, is suitable for small-scale value investing in Uranium market. Again, Call options can be used here to collect interest. Unlike SLV, URA is not a pure commodity ETF. As a collection of mining stocks, this ETF pays quite significant dividends.  
  

#Ponzi #Crypto vs #Uranium

The recent post, "#Uranium is going to beat #crypto returns", may sound a little bit provocative, but let us check the realities of these two very different mining worlds.

The blockchain technology is not that young anymore, but no economically significant applications were reported yet.
At present, it is not obvious how to get rid of the inherent slowness and expensiveness of a blockchain transaction. Meanwhile, people are experiencing crypto-mania and it is an acute form of mania. The reason is that the opportunity of an abnormal gain has a strong emotional response in the reptilian part of the human brain. This reptilian brain has all chemical means to stop commonsense. When a critical mass of free lunch believers is achieved, it becomes a self-propelling mania, because human beings have the basic instinct to act in a herd. No one is going to ask who is the patsy, that ultimate bagholder on the other side of the trade. While the answer is pretty obvious, people don't mind to buy some hilarious  #ICO.  For example, PonziCoin does exist in the crypto universe.  I dare to predict that the eventual return on this ICO will be minus 100%. Ponzi is a common trait of ICOs. Hence minus 100% return is going to be the universal constant in the ICO world.




















As for #Uranium, there is no reason to think that the uranium cycle is different from any other commodity cycle for that matter.  In 2018 U supply is getting short, demand is growing while the number of active mines is dropping worldwide. When the overground stocks will go, the price will explode. Here one can get a solid return on investment while participating in the liquid market.  Indeed, for the next several years, aggressive trading strategies like stock replacement by debit call spread may yield abnormal returns and beat the darlings of the crypto world.



Why do people trade at all?

 It is often repeated that more than 90% of retail traders end up losing money. However, at least in the USA, trading remains quite a popular occupation. So why do people trade at all? My experience of chatting on investment blogs says that a trader usually presents him/herself as a rather rich person who trades simply because it is entertaining except that sometimes it is boring to win all the times.

Real life encounters with traders tell quite a different story.


1. In our local park, my kids easily make tons of new friends. That's how I came to know a weekend daddy.  This old man first lost his business; next, his wife ran away with a significant chunk of his wealth and to a younger man. The guy told me that he trades his retirement account cause he doesn't feel secure about coming years and that his trading was inspired by "a bald guy on CNBC".  Shortly I learned that this nice person with huge black circles under the eyes trades FANG stocks and that he understands only simple trading from the long side. The year was 2016  and he was a happy trader who had recovered all his losses caused by the nosedive of Apple stocks back in 2015.


2. Every other Saturday at 7:30 AM I play beach volleyball with other people from our physics and chemistry departments.   Here I talked with a Ph.D. whose wife and kid stay in India while in the  USA he shares a room with another guy from India. This young person invested ~$1000 in shares of crypto-mining companies and now is reduced to HODL. In his 30's this man who already published ~20 papers is desperately looking for an additional income as his salary is not enough to fulfill basic needs.


I know in person several other guys who can be classified as 1 or 2 or something in between.


My conclusion is that people trade mainly because their financial situation is an unstable one. Indeed   "Almost half of US families can't afford basics like rent and food; some 66% of jobs in the US pay less than $20 an hour."


No wonder that a trader in financially weak position often buys a dream while giving up a part of his/her real wealth. For example, it can be  Facebook shares or bitcoins.  In this case, Wall Street works as a wealth transfer machine where > 90% of retail traders end up losing money.


I think before getting involved with risky trading styles one should try small-scale income trading that works similar to cash flow from real estate assets.


anatomy of silver gold pair trade

Gold is a monetary metal, i. e. gold is money. Gold can be used as a safe storage of value when fiat currencies are being devalued day by day. Also, rising gold price usually means that faith in banking and governmental institutions is falling and investors are looking for safe haven. Gold has few industrial uses.
Silver is used both as a monetary and industrial asset. Consequently, there is the strong silver-gold correlation.  However, because silver also has many industrial uses it is affected by the business cycle. 
A trader can try to profit form the interplay of monetary and industrial factors. From historical perspective Silver/Gold ratio is rather high,  i.e ~ 80 : 

































One /SI contract is a digital equivalent of 5,000 oz of silver. At the moment it can be hedged with ~ 62 oz of gold. 

One /GC contract is a digital equivalent of 100 oz of gold.  60 delta /GC call against  /SI contract gives a fully hedged position than.


Naturally, a contrarian wants to short gold and long silver here but let us think some fundamentals first. 


#WTI #RBOB simple crack spread #trade explained & trade example

In the oil industry cracking is the process whereby crude oil is separated into refined products.


In trading "Crack Spread" is the difference between the cost of the oil products such as heating oil, gasoline and the cost of oil from which these products were cracked.

"Crack Spread" is not really for retail trading because of liquidity and capital issues. However, a retail trader can trade "Simple Crack Spread” using pretty liquid /CL and /RB futures. 

/CL contract is for 1000 barrels of WTI oil and is priced in $USD/barrel; /RB contract is for 1000 barrels of RBOB gasoline and is priced in $USD/gallon. 

To price "Simple Crack Spread"  between 1000 barrels of RBOB and 1000 barrels of WTI in $USD/barrel one has to use the following   formula:

Commodity Investing : 10% #income #trade for elderly

My mother in law is an elementary school teacher in Taiwan. She is about to retire but suddenly the retirement in Taiwan became a problem. Recently the government employees were found to be "greedy people" and based on this discovery their pensions were decreased nearly by 50 %.  Now my mother in law is looking for sources of additional income and asked me to make a trial investment ($3600 USD) for her.

This is how I invested her money to get ~10%  of interest per year ( tastyworks trading platform was used to minimize trading fees) :
1. bought 200 SLV @15.6;   sold 2 Jan 18,2019 16 Calls @1.25; bought 2 Jan20, 2019 11Puts @0.04.
2. sold  1 Oct19, 2018 15.5 Put @0.83; bought 1 Jan19, 2019 11.5 Puts @0.04. That gives  ~ $400 of maximum profit in 300 days.

Since silver is at lows of the commodity cycle the income from this small-scale investment is going to work similar to real estate investing. 



Wednesday, August 15, 2018

+ $1000, flat platinum gold pair.

Instant gratification:

Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Spread
415
8/15/2018 13:00 FUTURE BUY 1 TO CLOSE /GCZ8 18-Dec FUTURE 1184.6 1184 LMT
8/15/2018 12:55 FUTURE SELL -2 TO CLOSE /PLV8 18-Oct FUTURE 769 769 LMT

Long Platinum Short Gold, futures pair trade

Probably it is early but here it is 2*/PL -/GC futures pair trade:
Exec Time Spread Side Qty Pos Effect Symbol Exp Strike Type Price Net Price Order Type Spread
425.5
8/15/2018 10:23 FUTURE SELL -1 TO OPEN /GCZ8 18-Dec FUTURE 1189.5 1189.5 MKT
8/15/2018 10:23 FUTURE BUY 1 TO OPEN /PLV8 18-Oct FUTURE 764 764 LMT
8/15/2018 10:23 FUTURE BUY 1 TO OPEN /PLV8 18-Oct FUTURE 764 764 LMT

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

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