Ideas & Research

Trading Every Other Trading Day

Something odd that I found:

Test 1:

  • Buy SPY at close every other trading day
  • Sell the next day at close
  • 1/29/1993 – 3/25/2013

1-29-1993 - 3-25-2013 Trading Every Other Day

The 1990’s bull market, and the 2003-2007 market cycle are almost completely missing from the equity curve.

Test 2:

  • Buy SPY at close every other trading day
  • Sell the next day at close
  • 2/1/1993 – 3/25/2013

2-1-1993 - 3-25-2013 Trading Every Other Day

The popping of the tech bubble and the bull market since 2009 are almost completely missing from the equity curve.


It’s incredibly strange how trading every other trading day can wipe out the gains/losses of any one cycle (1993-2003, 2003-2007, 2007-2013). What does this mean? Absolutely no idea.

Short Selling

My mentor discouraged me from short selling completely until I become a more skilled trader due to its inherent disadvantages. Profitable trading, after all, is the accumulation of small statistical edges that, over time, will produce sustained profits. Here are the disadvantages inherent one faces when short selling:

  1. Asymmetric Returns
    • There is only a possibility of 100% returns, while the downside risk is theoretically unlimited. It is rare, but it is certainty not unheard of for stocks to increase over two-fold.
  2. Negative Edge
    • The markets have historically had an upward bias. This upward bias is not limited to US or European markets only.
  3. Psychology/Career Risk
    • It is easy to make money while others are losing it, but extremely difficult to lose money while everyone else is gaining, especially if you are a professional money manager.
  4. Recall Risk
    • Possibility of the lender requesting the stock back from the borrower before he/she is prepared to close-out. One study suggests that this occurs to roughly 2% of loans.
  5. Rebate Rates
    • These are the rates a borrower is paid for his cash collateral, which are determined by the supply/demand for borrowing a stock. Taken from Fabozzi’s Short Selling: “on less widely held securities or securities with large borrowing demand, rebate rates may be reduced, in which case, the securities are said to be “trading special” or just “special…… In rare cases, when a stock is in high demand, the rebate rate can be significantly negative…. Only well-placed investors (e.g., hedge funds) will be able to borrow specials and receive the reduced rebate. Generally, brokers will not borrow special shares on behalf of small investors..”

For further reading, read Fidelity’s “The hidden risks of short selling

Equity Curve Feedback

A concept that I thought of while showering a while back was treating an equity curve of a trading system as a tradeable security. It is analogous to using tactical asset allocation, except on trading systems instead of a portfolio of assets. Unfortunately for me, this is not a new idea. I also found this idea while going through the archives of my favourite blog, David Varadi’s CSS Analytics, and at Howard Bandy’s Quantitative Trading Systems in a post titled Equity Curve FeedbackSo far, I’ve been able to think of four ways to apply this idea to a trading system, based on two types of equity curve feedback that I call “soft” and “hard” equity curve feedback.

  • Soft equity curve feedback allows new trades to be entered when a certain equity condition is met.
  • Hard equity curve feedback allows new trades to be entered when a certain equity condition is met AND forces new trades to be undertaken on the second derivative level while mid-trade on the first derivative level.

For example, say you are using an equity curve feedback rule that states that you will only trade when the the equity curve of System XYZ > 15 Day SMA of the equity curve of System XYZ . Your first trade on System XYZ manages to push the equity curve of System XYZ above its 15 Day SMA mid-way through the trade:

  • With soft equity curve feedback entry, you are now allowed to trade System XYZ, but you do not enter the trade mid-way
  • With hard equity curve feedback entry, you are now only allowed to trade System XYZ, but you also immediately enter the mid-way trade

With these two variations, we can come up with four different kinds of equity curve feedback overlays:

  • Soft entry; Soft exit
  • Hard entry; Soft exit
  • Soft entry; Hard exit
  • Hard entry; Hard exit

There are also two (three, but I don’t count one of them) forms of soft exits, but they aren’t different enough for me to classify it as an entirely different form of equity curve feedback.

  • True soft exits – You cannot exit the system until the equity curve feedback condition is met. I do not consider this as a legitimate approach to equity curve feedback, since you are basically barred from exiting your system unless you are lucky.
  • False soft exits – You can exit the system regardless of whether or not the equity curve feedback condition is met. You are not forced to exit your position if the equity curve condition turns from true to false, and you are still allowed to exit your position if the equity curve condition is false.
  • Shorting soft exits – You can exit the system, but only based off of the inverse of your original trading system. For example, say System XYZ from above has the following rules
    • Buy: X > 10
    • Sell: X <10
    • Short: Y > 10
    • Cover: Y <10
    • X and Y are random indicators

    with the same 15-Day crossover equity curve feedback rules as before. You’re using hard entries and you entered in the first trade, but somewhere along the way the equity curve dipped below its 15 Day SMA. Now instead of exiting when X < 10, you exit when Y < 10. This only work if System XYZ has both long and short components, and you allow the shorting of the trading system itself.

From my experience (I’ve only played with it through back-testing, not live money. I’ve also only used simple SMA crossover trading strategies), equity curve feedback doesn’t really improve/detract from total CAGR (sometimes it improves/detracts but usually it maintains CAGR that is roughly similar), but it improves MDD and volatility.

Market Idenfitification: Theory-Crafting

The truth is that not all markets offer good opportunities to make money. A poor market will have: 1) low and sporadic liquidity 2) a high but unpredictable degree of noise 3) few if any discernible patters or anomalies.

– David Varadi in How Tradeable is a Market

For some data sets, there is simply no edge available.

– Jaffray Woodriff in Hedge Fund Market Wizards

It is a commonly accepted assumption that trading systems will perform differently in different markets, most likely due to the particular markets’ idiosyncratic behaviour. For example, as seen in this XIV trading strategy, even a simple trend-following system can produce extra-ordinary results within a highly trending market. It is for this reason that I believe that market selection is not only extremely important, but possibly more-so than regime detection or the trading system itself.

In order for us to select a group of markets to trade successfully, we should try to decide the characteristics of a market the particular trading system will excel in. For the two most popular trading systems, trend-following and mean-reversion, this seems to be straightforward. In theory, trend-following systems as a whole should perform better in markets with positive serial correlation and extremely few whipsaws, while mean-reversion trading systems should perform better in markets with negative serial correlation and extremely few trends. Here are a couple of indicator ideas I thought of that could measure market “tradeability”

The Y-Day rolling average of:

  • X-Day Auto-Correlation Function
  • X-Day Historical Standard Deviation
  • X-Day R-Squared
  • TSI
  • X-Day Signal-to-Noise Ratio (Not the engineering one. Will be defined in subsequent post).
  • Frequency of MA crossovers

For these indicators either a static numeric threshold can be used (ex: if Y-Day rolling average of TSI < 1.6, then market is tradeable for mean-reversion systems) or some kind of adaptive approach can be used (Ex: if Y-Day rolling averge of TSI < 15 day MA of Y-Day rolling average of TSI, then market is tradeable for mean-reversion systems).

There is another indicator I thought of, but it wouldn’t fit in with the rolling average category.

  • Equity curve of a daily follow through system

A static approach cannot be used with this indicator since there is no boundary that the indicator usually stays between. I can only think of an adaptive approach making this indicator useful (Ex: if equity curve < 15 day MA of equity curve, then market is tradeable for mean reversion systems).

I can only think of two potential problems with this:

1) Bad indicators of market tradeability

This is an obvious problem, which can be solved by finding better indicators. This is easier said than done.

2) Past performance isn’t indicative of future performance

Since technical indicators only measure historical tendencies, this may not work since the future differs from the past. Seen through MarketSci’s post The Simple Made Powerful with Adaptation, daily follow was an extremely successful strategy up until ~2000. If in 2000, we used the historical performance of daily follow through as an indicator, it would provide a signal for trend-following systems to succeed, which would be horribly incorrect for the next 12 years. This problem should be solved using a rolling screening approach rather than a “screen once and forget about it” approach.

Ensemble Methods with Jaffray Woodriff

I read about Jaffray Woodriff from Quantitative Investment Management in Jack Schwager’s Hedge Fund Market Wizards right when it came out, and I was reminded of him during one of my sessions studying data mining. I googled him to see if I could find more details on him and found 2 articles (1,2). He uses a method called “ensemble methods”, which means he uses an aggregate of multiple models in order to increase predictive ability. Also, since he states that he only uses OHLC data, I assume that all of his secondary variables are some kind of technical analysis.

The idea of using ensemble methods is kind of similar to using multiple trading indicators, or trading filters; however, it is more formal since it incorporates Bayesian thinking. I assume that when Woodriff states he uses ensemble methods to combine 800 trading models, the models themselves were built using data mining techniques since ensemble methods originate from the data mining field, and in Hedge Fund Market Wizards he states that he uses data mining techniques to look for historically profitable patterns.

Another thing he states is that his underlying approach to system design is different than that of major quant houses such as D.E. Shaw:

Rather than blindly searching through the data for patterns—an approach whose methodological dangers are widely appreciated within, for example, the natural science and medical research communities—we typically start by formulating a hypothesis based on some sort of structural theory or qualitative understanding of the market, and then test that hypothesis to see whether it is supported by the data.

– D. E. Shaw in Stock Market Wizards

I don’t do that. I read all of that just to get to the point that I do what I am not supposed to do, which is a really interesting observation because I am supposed to fail. According to almost everyone, you have to approach systematic trading (and predictive modelling in general) from the framework of ‘Here is a valid hypothesis that makes sense within the context of the markets.’ Instead, I blindly search through the data.

– Woodriff in Hedge Fund Market Wizards

The fact that he disregards commonly accepted principles makes me question whether his alpha is generated from his ensemble methods, or from his unique approach (or both). Of course there is always the possibility that he has found a way of mindlessly mining the data without burning it, but I wonder if his mindless mining approach possibly detracts from his system’s alpha. This is definitely a topic for future research.

Shorting Leverage

I came across the paper “Embedded Leverage” by Andrea Frazzini and Lasse Heje Pedersen. I didn’t have time to read it, but skimming over the abstract did spark some ideas from a previous paper I read. In the abstract, it states “we find that asset classes with embedded leverage offer low risk-adjusted returns and, in the cross-section, higher embedded leverage is  associated with lower returns. A portfolio which  is long low-embedded-leverage  securities and short high-embedded-leverage  securities  earns large abnormal returns, with t-statistics of  8.6 for equity options, 6.3 for index options, and 2.5 for ETFs.” This made me think of a previous paper I read, titled “Alpha Generation and Risk Smoothing using Volatility of Volatility” by Tony Cooper. In that paper, he talks about “Volatility Drag”, which is the deterioration of performance due to volatility, which can be seen by the following formula:

(1-x)(1+x) = 1-x^2

In leveraged ETFs, this volatility drag effect is amplified.

Thinking about both of those papers made me hypothesize that a portfolio consisting of shorting 3x leveraged ETFs could perform extremely well from two factors:

  1. The high “embedded leverage”
  2. The increased volatility drag

To test this hypothesis out, I backtested 3 systems shorting pairs of 3x leveraged ETFs. The pairs were chosen so that there was 1 inverse ETF and 1 regular, and that they were created by the same company. I chose inverse/non-inverse pairs so that the majority of the movements would cancel each other out and create a smoother equity curve, and I chose ETFs from the same company so that the pairs would have similar (but inverse) indexing methodologies. The positions were rebalanced daily using adjusted close prices from Yahoo! Finance. Commission and slippage were not accounted for. The ETF pairs are:


There was no reason these particular ETFs were chosen. I just went to and screened for 3x leveraged equity ETFs and ranked the ETFs by AUM. Then I chose a couple pairs.

FAS-FAZ Equity Curve

GASL-GASX Equity CurveRUSL-RUSS Equity Curve TECL-TECS Equity Curve SPXU-UPRO Equity Curve

While viewing these charts keep in mind that the testing period for some ETFs were longer than others, which will affect cumulative return.The returns for most of them are mediocre at best, but the equity curve is relatively stable. What worries me is the pair TECL/TECS. While such a drop has only occurred to 1/5 of these pairs, this kind of black swan event could ruin the strategy and is enough to warrant not implementing the strategy.

Next I will try to find evidence that the returns are derived increased volatility drag through by plotting the rolling 10-day return of the strategy with the rolling 10-day historical volatility of the strategy.

FAS-FAZ Volatility GASL-GASX Volatility RUSL-RUSS Volatility SPXU-UPRO Volatility TECL-TECS Volatility

From a cursory glance, volatility doesn’t seem to be a huge predictor of returns in any of the pairs except for FAS/FAZ.


This strategy doesn’t generate enough alpha to warrant trading IMO. Even though it has a stable equity curve (depending on the securities traded) black swan events such as the one that occurred in TECS/TECL can devastate the already small profits. This combined with the fact that the system trades extremely frequently (once per day) and thus has relatively large commissions should counter-act any benefits the strategy has. Other than researching if the volatility of 1 of the ETFs is a predictor of  future returns, I’m not sure where else to continue researching/developing this strategy. If anyone has any thoughts/ideas please feel free to share 🙂

Side Note: This is the first time I’m using R. Everything should be calculated correctly, but I’m posting the code for this strategy so someone can point out an error in case I calculated something incorrectly.

# Function
getInvRet <- function(x) #Gets Inverse Daily Return
    raw.close <- read.csv(x) # read from CSV
    close <- raw.close[,7] # get Adjusted Close
    close <- rev(close) # flip the data
    ret <- close[-1]/close[-1*length(close)] # convert to daily ret
    inverse.ret <- -1*(ret-1) + 1 # inverse it for shorting
getPairRet <- function(retA, retB) #Calculates Shorting Rebalance Return
    equity <- retA * .5 + retB * .5
    equity <- c(1,equity)
movsd <- function(equity,lag) #Rolling Standard Deviation
    movingsd <- vector(mode="numeric",length(equity)-lag+1)
    for(i in lag:length(equity)) {movingsd[i-lag+1] <-sd(equity[(i-lag+1):i])}
movRet <- function(equity,lag) #Rolling Returns
    #for(i in 1:lag){}
    #for(i in length(equity)-lag+1:length(equity){}
    equity <- cumprod(equity)
    movingRet <- vector(mode="numeric",length(equity)-lag+1)
    for(i in lag:length(equity)) {movingRet[i-lag+1] <-equity[i]/equity[(i-lag+1)]} # this should be vectorized

#Get Inverse Returns
ret.fas <- getInvRet("fas.csv")
ret.faz <- getInvRet("faz.csv")
ret.gasl <- getInvRet("gasl.csv")
ret.gasx <- getInvRet("gasx.csv")
ret.rusl <- getInvRet("rusl.csv")
ret.russ <- getInvRet("russ.csv")
ret.spxu <- getInvRet("spxu.csv")
ret.upro <- getInvRet("upro.csv")
ret.tecl <- getInvRet("tecl.csv")
ret.tecs <- getInvRet("tecs.csv")

#Get Short Leverage Equity Curve
fas.faz <- getPairRet(ret.fas,ret.faz)
gasl.gasx <- getPairRet(ret.gasl,ret.gasx)
rusl.russ <- getPairRet(ret.rusl,ret.russ)
spxu.upro <- getPairRet(ret.spxu,ret.upro)
tecl.tecs <- getPairRet(ret.tecl,ret.tecs)