A Trader Journal

Change yourself, change your trading.

Showing posts with label Quantitative System. Show all posts
Showing posts with label Quantitative System. Show all posts

Enhancing TA trading rules performance using filtered Price Bars

Volatility is an interesting subject. For some it is risk and for others it is opportunity. In a way I think it is both. For a trader, price volatility creates opportunity whereas portfolio volatility creates risk.

Typically in statistical sampling, extreme outliers are treated as spurious samples and left out. That way the sampled data can fit nicely with more elegant statistical distributions and can be explained well by models. On other hand the premise of technical analysis is "markets are inefficient and one can profit from these inefficiencies".

TA typically assumes the market price moves are a proxy for the information content and price inefficiencies. So technical trading rules typically have a price & time scale parameter like number of days for purpose of smoothing data, to reflect some cycle length and to identify market inefficiency to profit. So far good.

When it comes to markets, the days with large price moves are the ones that reflect most the inefficiencies and also trigger the most emotions. Now a rarely asked but important question is would your technical indicators yield better performance when you consider only information rich large price move days versus considering all days? 

I recently came across a paper that targets this question. What the author does is uses volatility as a filter to screen out noise (i.e., flat days) and include only days that are rich in information. Once these flat days are filtered out, then the author applies the same trading rules on non-filtered days and does before-n-after trading rules performance comparison.

So what are filtered days?
The paper first defines a threshold and then uses this threshold to filter out some of the days in the sample. The threshold is for example like a 25% of sample daily return's standard deviation of the full set. Now using this threshold, we filter out nearly all flat days (i.e., days with gain or loss less than threshold) from the full sample. The days of interest to us here is the retained set i.e., non-filtered days in the sample.

Trading Systems & Data
To validate whether this filtering helps, the paper picks three trading rules/systems and compares the performance of these three systems on full sample data vs performance on retained data (i.e., data where flat days were filtered out). The data is SPX daily index for last 23 years i.e., 1990-2012. I think this is long enough data.

Short Term System: 2 day run mean reversion
Rules:
  • Long 100% in SPX at the market close of a trading day when index has been down 2 days in a row.
  • Short 100% in SPX at the market close of a trading day when index has been up 2 day in a row.
  • Continue with current position (long or short) till a switching conditions has not been met. 
Filtering schemes:

  • Scheme 1 - Apply a fixed filter i.e., ignore days that have less than 25% of SPX daily return standard deviation. The standard deviation was calculated for the entire period.
  • Scheme 2 - Filter all days that have returns less than 20% of SPX daily return standard deviation. This standard deviation was calculated on last 60 days of rolling window.
  • Scheme 3 - Filter all days where threshold is 22% of current SPX index option implied volatility.

The concept applied for short term system is basically ignore nearly flat days and focus on market moving days to improve your short term trading rules performance. This is similar to volatility filtering systems that one hears about in TA.

I am not sure filtering schemes 1 & 3 would be robust. I generally prefer to stay away from thresholds that are absolutes. Also these two filtering schemes has a look ahead bias.

Intermediate Term System: Dual Moving Average Cross (DMAC) 
Rules:
  • Go Long when short term moving average crosses above long term moving average
  • Go Short when short term moving average crosses below long term moving average.
Filtering scheme:
  • Filter all days whose daily returns are less than 0.25% daily returns of SPX when computing SMA and LMA.

The concept that gets applied indirectly here for intermediate term system (i.e., MA system) is to increase the MA length when there are many flat days. So in other words the simple MA becomes an adaptive MA.

I am not fully convinced yet that filtering out nearly flat days is the way to apply this concept. Part of the reason is most bars effect (unless they were in key locations) will fizzle out in few days. Whereas the system we are talking here is intermediate term system. Another reason is the equity curve seems bad last 3-4 years. Don't know if it is due to change of market character since financial crisis and popularity of risk aversion.

Long Term System: Price Channel Trading
Rules:
  • Switch to long when  close is greater then m day price channel high.
  • Switch to short when close is below the m day price channel low.
Filtering schemes:
  • Filter all days in channel calculations whose daily returns are less that 0.25% of daily SPX return.

Here I am not sure why the filtering scheme is improving the performance. Basically what we are saying is when we have too many flat days, then increase the channel look back period. I would think the other way (i.e., decreasing the the channel look back period when too many flat days) would be more profitable. The rationale - volatility contraction.

Concluding thoughts:
I think on the whole the core concepts in this paper are good. But on other hand, I don't feel comfortable with absolute thresholds and especially if they were calculated by looking ahead.

My main take away from the paper is utilizing of this filtering concept but probably in a different way for a short term system. For intermediate and long term systems, probably I will skip this concept for now.

For any one interested in reading full paper, following are the details -
Source - "Filtered Market Statistics and Technical Trading Rules", George Yang, May 2013.

Wish you all good health and good trading!!!

Sector Rotation trading using Credit Markets

Recently I came across an interesting research paper on sector rotation. This paper won NAAIM 2013 Wagner award. First time when this came across my desk, I nearly skipped it. There are so many papers on momentum and most of them follow nearly same recipe. The primary difference typically is in the criteria being used to construct the rank. But given the paper got award, I felt curious and wanted to see what is different about this paper methodlogy to get an award.

Core idea:
The core principle of the paper is "equity values drop when credit risk rises and vice versa". This paper applies this relationship at index level. The method here is a long-only strategy and uses SPDR sector ETFs (XLE, XLY...) as the assets to rotate for the portfolio. Methodology:
  • Select a credit index or basket of credit instruments as proxy for credit risk to the portfolio. The credit index chosen here is Bank of America/Merrill Lynch's US High Yield B index i.e., HY/B.
  • Using 6 month time frame (i.e., 26 weeks, weekly frequency) calculate a fair value for each sector ETF utilizing HY/B index values. The model is calibrated via Ordinary Least Squares (OLS) linear regression. Look at the figure below for a better explanation.
    • ETF fair(HYB market) = A * HYB market + B 
  • Then estimate the disconnect for each sector ETF i.e., calculate how far, on a percentage basis each sector ETF is away from fair value using below formula. Given it is regression based, some ETF disconnect values will be positive and for other ETFs it would be negative values.
    • ETF disconnect = [ETF fair - ETF market] / ETF market
  • Now rank the ETFs in descending order of their disconnect values. The idea being the top ranked ETFs have the greatest disconnect and so should generate high returns relative to the bottom ranked ETFs.
  • Buy the top ranked N assets. Replace them in portfolio whenever the top ranked assets change. Assume an Equal-Weighting scheme for portfolio sizing.
Do the above steps each week. One can instead do monthly frequency also. Under monthly frequency model, the returns and number of trades will be lower.

Twist:
One problem with the above is, in times of market stress, the portfolio will have severe drawdowns. If you had noticed, in the above model, we ignored the sign of disconnect values and just ranked all of them. So one twist is to utilize the sign of disconnect values (postive or negative) and play the tactical asset allocation game i.e.,
  • Each week, choose the N top-ranked ETFs.
  • For each of the chosen ETFs:
    • If the fair value is greater than market value (i.e., plus sign), then invest the asset share in that ETF.
    • If not, then invest the asset share in 3-month Treasuries instead. Notes:
Some Notes:
  • The paper uses previous 26 weeks of data exclusive of the current trading day to build the regression. Similarly HY/B value is published the following day. So the model uses previous day's HY/B value to calculate fair value for each ETF.
  • 6 month (i.e., 26 week) time frame is chosen as the authors felt it is long enough to develop a meaningful relationship between credit index and market but short enough to detect regime changes quickly.
  • The HY/B index values are obtained from FRED database. The sector ETFs values are obtained from Yahoo finance. The model in paper assumes equal-weighting of the assets in the portfolio.
This pretty much sums the methodology of this paper.



Why credit markets as the proxy?
The basic idea is a firm's asset value, equity value and its debt are interconnected i.e., related to each other. This relation was proposed by Robert Merton and that model goes by the name "Merton Model". Now the same concept applies at index level as well.

Merton Model - Think of equity of a company as an European call option on the firm assets i.e., you pay the premium today and when the call option matures, you get to cash in by selling it. Similarly think of liabilities/debt as the option strike price. Now think of the firm's asset value as the instrinsic value of the option. So the profit you get on call option at maturity is whatever value of the option is on that day - the strike price of the option - the premium you paid. This model seems can be used to estimate the probablity the company will go belly up (i.e., default) as well as the credit spread on the debt. Anyway, this is what I understood from a quick google search.

This paper uses the corporate credit spreads as the proxy for the credit risk. So for implementation, the paper uses the option-adjusted spreads for Bank of America/Merrill Lynch's US High Yield B index i.e., HY/B as proxy. Note: the paper uses same credit index i.e., HY/B as proxy to judge relative value for all equity assets in the portfolio.

Model characteristics:
In declining markets, the strategy would help in limiting losses. On other hand, in bull markets the strategy will throttle gains. The reason being the strategy is generally invested atleast partially in Treasuries. Overall the tradeoff of lower gains in up markets is countered by limiting the portfolio drawdown. It is psychologically challenging to the investors.

If the investor takes a long view i.e., a lower volatility strategy that limits drawdowns can be far more desirable then a buy-n-hold strategy or one that exposes as portfolio to sharp market corrections. Unfortunately many feel satisfied more based on relative comparisons with joneses than with absolute comparisons.

It is more suitable for investors who take 2-3 year view for the strategy compared to the ones who focus more on short term results.

Source Paper: Equity sector rotation via credit relative value

Wrap up:
My guess is this paper got award due to the relative value concept i.e., using credit index as proxy to calculate the fair value of the underlying asset and use the disconnect from value as the criteria for ranking the assets. On the whole, it is a good paper and interesting concept.

Though the returns are good the volatility and drawdown numbers are bit high. I think it would be a good strategy to consider if one can figure a way to reduce the drawdowns and volatility of the strategy returns. Some areas to investigate would be like using volatility targeting instead of equal-weighting scheme. Another would be using strategy diversification. When I get more time, I want to test this strategy along with another momentum strategy and see how the correlations would look like.

Another area would be figuring out a better credit index proxy besides HY/B and is negatively correlated with equities. My knowledge about credit markets and financial engineering techniques is limited. I appreciate if any readers with deeper background in credit markets can suggest proxies alternative to HY/B that one can investigate.

Finally, nearly all the subscribers to this blog are by word of mouth. So my usual request - if you found this post useful then can you please share this blog with couple of your friends/colleagues. I appreciate it.

Wish you all good health & good trading!

Profiting from patterns in insider trades...

Few weeks back I came across an interesting paper on insider trading. This paper is about detecting patterns in trades made by insiders to identify suspicious trades for investigators and prosecutors. Another audience for the paper naturally is us i.e., traders/investors.

For example, can you tell from a set of insider trades which of the trades are made by an informed insider to take advantage of an information that is not yet public? Can you figure which of the trades of this informed insider are to capitalize on private information that is short lived in nature? How about figuring which of the insider trades are to capitalize on private information that is long term in nature i.e., it will be revealed to public few months months down the line? 


Before diving into the journal paper, couple of points - 
  • There are many ways insiders can take advantage of private information like through options/insider phone tree/sharing with others knowingly/unknowingly etc. This paper primarily focuses on the publicly available trading records of the insider. 
  • To me no one single concept makes up a system. Also when I investigate journals, I don't look for a system. What I look for is ideas that I can later on investigate myself and may be mix & match with other ideas. A select few of these ideas become additional qualifiers (at process level) to my existing methods and contribute to position timing/sizing decisions.
So what are some insider trading patterns?
Often when articles on the net talk about analyzing insider trading, the typical suggestions are like those below 
  1. Insider purchases are good indicator of future prospects of the stock. That is the main reason for an insider to buy. 
  2. No reliable information from insider sales about future prospects of the stock. An insider might sell stock for any number of reasons like diversification or a need to raise money for some thing etc.
  3. Another type of suggestion - look at how insiders fared with their past purchases. If they did well then they might do well again.
  4. Similarly another type of suggestion - See how many insiders are purchasing? Also see what is the trend of insider purchases and sales. The idea here being the more insiders purchase the better it is.
  5. Another type of suggestion - See the dollar amounts of insider purchases or see the change in total holdings. The idea here being the bigger the amount the higher the confidence of insiders in future prospects of the stock.
Now while the above suggestions sound logical and may have an edge (which I don't know), one problem is they treat all insider trades as equal. Ok, some go little farther by differentiating the trades from executives and others. But one thing missing is they don't take into consideration the trading patterns/behaviors of the insiders. 

Pattern-1: Sequenced Trading Pattern
Not all private information is equal. Some private information has advantage that is longer lived. While other types of information has advantage that is only short lived. 

Consider a hypothetical company where the CEO/another C staff member of that company was involved in private negotiation with a key supplier or customer. Assume the outcome of these negotiations have long-term earnings implications. Now say the negotiations are not going well.

Obviously the insider will know that. The thing is this information has no near term earnings implication. Also this information will not be revealed to the public for another 6 months or so. So how would the executive take advantage of this insider information?

Given the executive is not in a hurry, the typical pattern is for the executive to spread their trades over several months. Also given the luxury of time, the insider likely might execute trades (reported to the SEC) on Fridays. Why Friday? I will cover this in a future post. Gist is, of all days of the week, Friday's have least investor attention. So why not take advantage of that as the insider have flexibility and less immediacy. 

Just FYI...it is ok if you feel the above info does not lend easily to quantify. For now go with concept level. Later in the post, I will write the objective rules to identify a sequenced trading pattern. If that is not sufficient and don't mind putting up with equations and extraneous stuff, then you can read the source paper itself.

Pattern-2: Isolated Trading Pattern
Say at a firm an executive have been receiving internal field reports of lower than expected sales reports. The executive knows that the firm is likely to miss its earnings in the near term. 

Now this is a short lived information and the insider has to act quickly before the information is revealed to the public. The insider in this case is most likely to engage in isolated (often singular trades) concentrated in a particular month. The paper calls these trades isolated trading pattern.

The idea behind this pattern is when insiders have access to short lived information, they most likely make isolated and often singular trades or trades that fall within same month (or 30 days).

As I mentioned earlier, this paper is  also for investigators/prosecutors. Now for them, they don't need to know an insider made the trade on private information before the information becomes public and market reflects that info in the stock price. 

I mean say an insider made trades following this pattern. After that soon the stock tanks/zooms up when the information becomes public. For investigator, that is enough to determine the trade is likely based on private information. But as traders we need to know that trade is likely based on private information before the market reflects private information.

From what I understood, at least in the paper there is no way to detect trades of Isolated Trading Pattern before hand. Also this pattern is a sub pattern of "Sequenced Trading Pattern" and there is no way to distinguish between these two patterns till a month passes by after the trade. The results in paper are for that one month where we were supposed to be waiting to determine the trade belongs to an Isolated Trading Pattern.

On other hand, we can identify Sequenced Trading pattern objectively. Also over several thousand samples, the data in the paper indicates a good positive edge for this pattern over multiple months. So in rest of the post, I will focus only on Sequenced Trading pattern.

How to identify a Sequenced Trading Pattern?
The rules for identifying sequenced trading pattern are
  • For each insider, aggregate all the trades on a calendar month basis.
  • The trades of the insider should occur in consecutive calendar months. If there is a gap of more than one calendar month between trades in the sequence then it is not a Sequenced Trading Pattern. 
  • Finally the insider trades are not routine trades. A trade is considered as routine trade if the insider has traded in same calendar month in three consecutive years.
Observations:
When I understood the rules, I thought there won't be that many samples. It is surprising that there are so many samples available as the below figure indicates.


Portfolio Construction?

If insiders engage in sequence of trades solely for diversification and liquidity purposes, then any portfolio constructed over sequenced trading pattern should have typical returns. On other hand, if there is private information that is being taken advantage by executive insiders then there would be good returns following their end of sequences and portfolio based on this pattern should have abnormal returns.

Rules:
  • At the beginning of each month, look for stocks that have "sequenced trading pattern".  Note: The earliest date we can determine a sequenced trading pattern is one calendar month after the last trade of the sequence is complete.
  • Add the stocks that meet the pattern criteria to the portfolio. 
  • Added stocks will be kept in the portfolio for the month.
  • Re-balance the portfolio at the beginning of the next month based on new stocks that complete the insider sequence trading pattern.
Results & Observations?

Following image provides the results of the sequenced trading pattern portfolio along with my annotations. Please see the images for context to below paragraph.





While the concept and results are interesting, what piqued my interest also is that (a) while the sequence is underway, the stock goes against the direction of the insider trades and (b) there is no return significance while the sequence is underway. Now add to that a price action entry technique to control risk. May be it is my contrary antennae going up but it feels that is a worthwhile and possibly another profitable angle for any interested readers.

To all readers, thank you for visiting my blog. I hope the above post is interesting and informative to you. Most of this site visitors are by word of mouth reference. So if you found this and other posts on the blog interesting and useful then please suggest the site to couple of your friends/colleagues. I appreciate it.

Source Paper: Insider Trading Patterns.


Side note:
I have not verified myself whether the pattern has positive edge.  I don't have access to historical insider trade data in a tabular/csv format. To get that data either one needs to subscribe to an expensive data feed (but I rarely trade stocks now) or write a robot to traverse and scrape SEC filings/pages to generate the data set automatically. I don't have time for the later option. Few weeks back I joined a very small but rapidly growing and cash flow positive firm. So now a days I don't get much time beyond firm work, trading and family. So I guess for now these action items are going into my trading BOT book. (BOT - Book of ToDo).

Wish you all good health and good trading!

Large price changes...Stock subsequent returns.

I came across an interesting study that was published last month. The study is about large price changes/swings and subsequent returns of the stock when this price change is based on new information. The study claims one can earn abnormal monthly calendar-time returns following their strategy after large price changes.

The core idea of the study is when there are large price swings there are two possible outcomes:
  1. The large price change is simply an aberration caused by noise and liquidity trades. In that case, it is likely that the price move will be followed by corrections and price reversals. (or) 
  2. The large price change/swing is caused by new information. If that is the case, then it is likely that the price will drift in the same direction of price change in subsequent weeks.
Ok. So far good. But how do we determine if a price change is based on new information? 

The study considers a large price change is based on new information if within 5 days of the large price change, the analysts following that stock issues either a earnings forecast revision (or) price target revision. In other words, if there is an immediate reaction from analysts following this stock, then the price change is considered to be based on new information.

Side note: The study has some additional observations with respect to analyst revisions and large price changes that I found interesting -
  • Majority of analysts do not revise their earnings and target price forecasts immediately following large price moves. In other words, most large price changes are not associated with new information and hence likely to reverse.
  • When analysts revise, often the revisions are more likely to be in the same direction as the price swing i.e., positive large price swing trigger positive earnings forecast or target price revisions and vice versa.
  • Analyst revisions are more often when trading volume around the price swings are high signifying arrival of new information.
  • Short term reversals are far less likely for large negative-return days  (compared to large positive-return days) especially when not accompanied by analyst forecasts.
Now why analyst earnings forecast/price target revision and not something else like buy/sell recommendations revision?
  • The study observes that there are about 10 times more earning forecast recommendation revisions and over 3 times more target price revisions than recommendation revisions. So using these will not omit too many signals.
  • Another reason is, say there is a big price increase and analyst already has a "buy" or "strong buy" recommendation, then there is no reason to revise that recommendation. On other hand, this price increase may cause analyst to revise either earnings forecast or target price forecast. 
Time for some stats...
Please find below some of the tables from the study heavily annotated with my comments...



 
Summary:
Overall the gist of the above tables is - one can forecast better the subsequent stock price returns after large price shocks if one takes into consideration whether there are immediate analysts revisions and are the revisions in the direction or opposite of price shock direction.

In the next part, I will cover the rest of the paper i.e., the portfolios constructed based on these insights and those portfolios performance. If you cannot wait till my next post, you can find the link to full paper here.

Question to readers:
I find this study interesting. On other hand, I am just a retail trader and neither know any analyst nor paid any attention in past to their output etc. So I am curious to hear thoughts from people who are more experienced on couple things like (a) does your experience correlate with observations in this study (b) why & how do funds/professionals in general use analyst revisions?

Stock chart analysis with EPS trends (Updated)

Update: The post is updated with annotated charts. Also few changes to the content of the post.
 
The core idea of this post is to analyze fundamentals just like price action and see if that provides any additional value. Recently I added this functionality to my software for fun but now I think it might be worthwhile to investigate further for longer term trades.  

So which fundamental metrics do we use? Following are two fundamental metrics this post uses -
  • Rolling (4 Quarters) Earnings Per Share
  • Rolling (4 Quarters) Price/Sales Ratio.
Following are some observations from the below annotated charts -
  • When EPS trend is down, the price action is either down or side ways. So if EPS trend is down (like in AMZN) but price trend is up, something funny could be going on like the stock running on stories/perception.
  • At bottoms, the EPS trend seems to act as leading indicator. Near tops, the price is the leading indicator.
  • Inclusion of EPS trend in price action chart provides a better picture of the context.
  • Caveat - I have not yet verified quantitatively the above assertions are valid.



AMZN chart is interesting i.e., Rolling EPS trend is down (since ~ 2011 Q1) but the price trend is sideways to up. In AMZN past history (and other charts included in this post) there were no instances where EPS downtrend is down and price has sustained uptrend.
 

MSFT chart is also interesting i.e., its Rolling EPS trend was doing pretty well from 2006-2012 but its price trend is sideways. Market not recognizing its value? I can imagine reaction from TA folks to this question :-).
 

Note - Readers proficient in fundamental analysis are welcome to suggest other metrics for future posts. The requirement is I should be able to construct the metric from the data available in the Annual/Quarterly reports.
 
Question - What would be a good metric(s) to analyze markets (like SP500) from fundamental perspective? Any suggestions are welcome.


Wish you all good health and good trading!

Disclaimer: The above is not a recommendation. Please do your own due diligence. Also I change my trading opinions often as new information/insights roll in.

Capturing volatility premiums with ETFs...

Often interesting ideas pop up when we look at same data but with different lenses. Many readers of the blog probably might be aware of Low Volatility Anomaly in markets. If you are not familiar with it and interested on that topic, then do a Google search for "Low Volatility Anomaly". You will find many articles, academic journal papers and explanations on that anomaly.

The low-volatility anomaly basically says portfolios of low-volatility stocks have produced higher risk-adjusted returns than portfolios with high-volatility stocks in most markets studied. Now often most of these low-volatility anomaly studies take one of the following two approaches -

Ranking-Based Approach:
In rankings based approach, the market or target segment (like large cap, small cap, emerging etc) is divided into deciles/quintiles based on a volatility measure. The division is such that securities in the lowest decile/quintile will be of low volatility. The portfolio is then invested in these low volatility deciles (or weighted heavier) and re-balanced monthly.

Minimum Variance Approach:
Another scheme is constructing minimum variance portfolios with the understanding minimum variance portfolios will have lowest risk. Then a weighting algorithm is used to determine the weights and limits for the selected securities & sectors belonging to that minimum variance portfolio. Then the portfolio is re-balanced monthly.

While the idea is good, I am not sure either of the above approaches are practical for individual traders unless one has large account and time. Also my personal preference when it comes to academic papers on trading is to generally pick the concept, understand the authors viewpoints, discard rest and figure my own way to incorporate those concepts for profitable outcome.

Capturing Volatility Premium:
IMO often good ideas come from simple rearrangement of concepts picked in various contexts over time. Applying that here, what do we know when it comes to volatility and these approaches - 
  • Volatility in markets is mean reverting i.e., low volatility begets high volatility and vice-versa.
  • A big part of low volatility portfolio returns is due to periodic re-balancing of the portfolio.
Most would probably know above. Now combining the above two, it seems to me basically low volatility portfolio profits are more to do with volatility harvesting then the actual volatility level. In other words, following low-volatility anomaly, one buys low volatility stocks for portfolio and then sell those stocks when their volatility is high. The latter happens indirectly because of the periodic re-balancing of the portfolio.

If that is true, then why not simply pick few broad market (liquid) ETFs,  buy when their volatility is low and sell when their volatility is high? 

Let's put above hypothesis to test. The broad market ETFs chosen for the test are - Emerging Markets (EEM, Europe (EFA), Asia & Pacific (EPP), US Small cap (IJH) and US Mid cap (MDY).

Some Notes:
  • Average True Range is used to measure volatility here. There are other ways to measure volatility. The choice of ATR as volatility measure is mostly a matter of convenience.
  • The test results are frictionless i.e., no slippage and commissions. 
  • The test is done on weekly charts. Duration: 2000 - Current. 
  • The portfolio is weighted equally across the 5 major markets. 
Results:
Following annotated images provides various performance stats. One can glean several insights both at individual market level as well as at portfolio level. Some highlights:

In the below image, notice the horizontal areas in the equity curve (black line) and the behavior of benchmark (red line) in those periods. The system goes into sidelines or has position only for a short time when the volatility is high in the benchmark. That is what we want.

The following image provides various  performance stats and ratios both for individual markets and for portfolio. The pie-chart provides the color notation. Notice anything of interest in "Annualized Sharpe", "Sortino Ratio" and "Rolling Correlation" bar plots?


The below scatter plot shows where individual markets and equal weighted portfolio  fall in annualized Risk-Return spectrum.

The last image provides detailed performance stats, calendar returns and draw downs etc. Looks like US Small cap has better returns of all whereas on risk-adjusted basis, the account seems to do better.

Now one idea doesn't make a system. The purpose of the test is basically to check for myself whether the hypothesis (i.e., buying and selling based on volatility level and price action )has legs and worth investigating further. The results are better than I expected for first round. The hypothesis seems to be worth investigating further. Thoughts?

I have not seen any low volatility anomaly studies on net that approach it this way. If you know of any studies/articles that discuss low volatility anomaly using approaches (besides ranking into deciles or using minimum variance) then please let me know.

Side Note: Like other tests on the blog, formulation of test rules, back-testing, analysis and visualizations are done using a proprietary software I developed over time. The software was built using R language and C#.
 
Wish you all good health and happy holidays!

Sector Switching - Playing the Macro theme..

This study is NOT about Sector Rotation. Continuing our series on playing the macro themes, this research is about utilizing the "Risk On-Risk Off" (instead of business cycle) for timing the Sector investments and to tactically switch between Sectors and Long Term treasuries. I have not seen any studies on the net which approach this way when it comes to playing Sectors. 

Note: For interested readers, this study lends well for applying Sector Rotation concepts as an additional filter. If you do, please drop me an email with your observations.

Coming back, this system basically involves three parts - 
  1. Strategic selection of Sectors to cash on Macro theme
  2. Tactical Switching between Sectors and Long term Treasury Bonds.
  3. Timing the Sector Switches
For this study, the universe of available sectors to invest is S&P sector SPDRs. That doesn't mean one cannot use industry groups or a more granular sector groupings. I chose S&P Sector SPDRs primarily because of their longer price history.

Strategic Selection of Sectors - 

All sectors are NOT equally sensitive to interest rates. Same when it comes to inflationary conditions and future expectations about rates. So why not focus on those sectors that are particularly sensitive? So for this study, the shortlisted sectors are
  • Housing ............................... IYR
  • Energy  ................................ XLE
  • Basic Materials ................... XLB
  • Industrial ............................ XLI
  • Discretionary Spending ...... XLY
Now I have not done any quantitative study to actually measure the sectors sensitiveness. I chose Sectors mostly on conceptual basis. For example, low/decreasing interest rates is good for housing. On other hand, materials prices will have upward pressure in that environment.

Tactical Switching between Sectors & Treasuries -

The study uses TLT as a proxy for Long Term Treasuries. Similarly this research uses  "Equal Weighting" scheme for allocating account capital. 

Note: Interested readers might also want to explore variable weighting scheme (like volatility based weighting) for account allocation to see if that improves results further.

The switching rules between sectors and treasuries are fairly simple. Following are the rules:
  • Divide the account into 5 equal parts as per our Equal Weighting scheme. 
  • Allocate each part (i.e., 20% of the account) to one of the above selected sectors.
  • When timing rule to switch into a sector is triggered (rules given in next section), then invest the allocated part into that sector. 
  • When timing rule tells us to switch to treasuries from a sector, then move the invested amount from that sector to the treasuries. 
Timing the Sector Switches -

 For timing the sector switches, this research uses both "absolute momentum" and "relative momentum". I think we covered in one of the prior posts why it is better to consider both types of momentum. So no point in going over that again. Please drop me a comment or mail if you have any question.

Following are Timing rules to switch between a given Sector & Long term Treasuries. The rules are evaluated over the weekend: 

(Switch to Sector) 
  • Rule:1 -- Sector current week close is greater than the close 13 weeks ago AND the sector returns (percent gain) over last 13 weeks is greater than treasuries return  over the same 13 weeks. 
  •  Rule:2 -- If above rule is met, then close the Treasuries position and switch to cash in coming week. After that switch from cash to that sector in following week.
  • Note: One can theoretically switch position from Treasuries to Sector on same day but practically that is not likely. So this system assumes, there is a 1 week delay in between. Also that allows one to use discretion for getting better entries and exits. The test assumes all entry and exit prices are @ Monday Open price.
(Switch to Treasuries) 
  • Rule:1 -- TLT current week close is greater than the close 13 weeks ago AND the TLT returns (percent gain) over last 13 weeks is greater than matched sector return  over the same 13 weeks. 
  •  Rule:2 -- If above rule is met, then close the Sector position and switch to cash in coming week. After that switch from cash to TLT in following week.
Some Notes - 
  • Usual caveats...Results are frictionless i.e., no slippage or commissions. Calculations are based on closed equity. 
  • Duration: Jan 2002 - Current. (~ 11 years). Time Frame: Weekly.
  • Account Initial Capital - $100k  
  • Benchmark - SP500 Index.
Results -
Following annotated images provide various performance stats.  If the images don't convey information well then please let me know your suggestions/improvements.

My key takeaways from the results are -
  • The concept of utilizing macro theme for sector switching and timing shows promise.
  • The images provide performance stats at both account & individual sector level. Forensics on the latter provide some pretty interesting stats. See Housing, Discretionary and Material Sectors switches. I can guess logically housing sector switch out performance but have to think bit more about Discretionary and Material sectors out performance. Any comments?
  • Low correlation of the account (as well as individual sector switches) when compared to the benchmark i.e., SP500 index. Makes it a good candidate for strategy diversification.
  • Low drawdown. Makes it a good candidate to apply "Risk Parity" approach. 




Any Thoughts? Comments? Suggestions?


Wish you all good health and good trading!

Disclaimer - 
The above study (or for that matter any thing on this blog) is NOT a recommendation. The study is not for live trading. It will need additional improvements and lot more testing before any consideration for live trading.

Taming the Equity Curve for Better Returns

Just like markets, each trading strategy creates footprints for the discerning trade/investor to see and capitalize on it. The premise of this post is simple - Can we analyze and take advantage of our trading strategy footprints to improve the Returns, Sharpe and other performance metrics while reducing the draw downs?

The concept is not that complicated but generally many don't consider it. That included myself. I was using something similar but not same as what is covered in this post though  - a topic for a future post.

First we need a strategy before we can improve upon its performance. Any one of the numerous studies posted on this blog will fit the bill. But it is more fun doing a new strategy. So below is a strategy with rules to capitalize on a old concept - Turn around Tuesday

Risk Switching - Trading macro theme for bigger profits

I think by now most people might have heard of "Risk on - Risk off" terms in media. Thought it would be interesting to explore this macro theme from various angles. This will take more than one post. What I have currently in mind is to explore topics like
  • Risk switching to enhance popular portfolios like 60-40, Tobias, permanent folio.... 
  • Risk switching to enhance market timing for short term technical trading. 
  • Risk switching in Intra-Asset class instead of inter-asset class (like stocks & bonds). 
  • Risk switching with Forex etc.

Inflation Regime Shifts - Implications for Asset Allocation

Following is an analysis on inflation regime shifts and what it means for asset allocation. It is a bit long article. Below has some fragments I picked from the article. Also a couple of graphs from the article (with my annotations) on asset classes performance in  different inflation regimes.  If you are interested in reading further, the link to source article is at the end of the post.

Over the past thirty years, inflation in the U.S. has averaged just below 3% per year. For many investors, we fear this extended period of price stability has created a complacency about the impact inflation can have on the returns of different asset classes.

But the events that have unfolded since the credit crisis of 2008 should challenge this attitude. The crisis sowed the seeds for the possibility of rising inflation. Central banks have increasingly engaged in unconventional monetary policy, and debt levels among developed market governments have ballooned. Monetization of government debt through inflation could be a logical result.

Further, we believe asset prices are much more sensitive to inflation outcomes relative to expectations than actual inflation levels – i.e., investors can react strongly when outcomes differ from expectations. Historically, inflation regime shifts have occurred with little warning. And once a growth spark ignites the inflation gasoline left everywhere by central banks (most recently the Fed with QE3), it may be too late to hedge the effects of inflation.


Therefore, now may be the time for investors who are concerned about inflationary risks to focus on increasing their exposure to asset classes that tend to provide a positive beta to changes in inflation.


While stocks and bonds have generally performed poorly during periods of high and rising inflation, a number of other asset classes have performed relatively well – including commodities, foreign currencies, gold and TIPS.
 



 
Currently there is little in the way on inflation pressures with core inflation running in line with its average of the last 20 years. While it is hard to say with certainty when inflation will move higher, we can identify some of the potential catalysts
  • A commodity supply shock, such as the closure of the Straits of Hormuz or widespread regional unrest in the Middle East, is one near-term catalyst that could move inflation materially higher. Recall that in the inflationary episode of the 1970s, it was the Arab Oil Embargo in 1973 that caused inflation to double from 5% to 10%. 
  • Increased demand and decreased level of unemployment. As this happens, the Fed will be faced with making a tradeoff between the two components of their dual mandate, price stability and full employment. It is in making this tradeoff during the coming economic recovery that we see the catalyst for inflation. The Fed may err on the side of seeking greater employment and a stronger recovery, believing that temporarily higher inflation can be reversed.  
  • Central banks globally have been engaged in a series of unconventional policy measures and competitive currency devaluation.   
Source Article: Inflation Regime Shifts

Harvesting asset risk premiums for profits...

One of my daily morning rituals is to pour myself a nice hot cup of tea, sit in warm morning sun rays and flip through WallStreetCurrents headlines. In recent months, I pretty much stopped looking at other sources besides WSC. For me WallStreetCurrents kind of became a fast and efficient way to keep tabs on markets, viewpoints and more important a continual source of new trade/research ideas. 

Anyway, so I was flipping through WSC  and when I came to Quant Currents, the first headline that caught my attention was "Dual Momentum". Basically it is a post from Gary Antonacci about his new paper - "Risk Premia Harvesting Through Dual Momentum".

I became a fan of Gary Antonacci work when I read his prior paper "Risk Premia Harvesting Through Momentum".  I think the Risk Premia papers methodology will be more robust when compared to some of the other popular TAA and AAA papers.

One problem in general with popular papers on TAA and AAA is the reliance on volatility as a proxy for risk. To me, Volatility is NOT same as Risk. Volatility is just an up and down movement and is a good source of profits. Similarly I find volatility targeting though good, the performance differences seems to me is less to do with targeting and more to do with volatility harvesting. I feel there are other ways to do volatility harvesting while treating risk in absolute terms like draw down etc, % capital etc.  How many customers decide to stay/leave a fund based on sharpe, volatility etc compared to absolute metrics like % of their capital loss or gain?
 
Coming back, following is an abstract of Gary Antonacci new paper. I will post my analysis and thoughts on the paper methodology in coming days. If you cannot wait,  the link to full paper is at the end of the abstract.


Momentum is the premier market anomaly. It is nearly universal in its applicability. Rather than focus on momentum applied to particular assets or asset classes, this paper explores momentum with respect to what makes it most effective. We find absolute momentum to be more effective than relative momentum, but that combining the two gives the best results. We also explore the factor most rewarded by momentum - extreme past returns, i.e., price volatility. We identify high volatility through the risk premiums in foreign/U.S. equities, high yield/credit bonds, equity/mortgage REITs, and gold/Treasury bonds. Using modules of asset pairs as building blocks lets us isolate volatility related risk factors and benefit from cross-asset portfolio diversification while using a combination of relative and absolute momentum to capture risk premium profits.

Link: Risk Premia Harvesting Through Dual Momentum

One of the first things traders learn (often hard way) is there is no absolute right and wrong approaches when it comes to profiting in markets. Please feel free to let me know your views. We learn more when our view differ. So the more our views differ the better.

Wish you all good health and good trading!


ETFs and Asset return correlations...

We hear often about high correlations in stock market but not much about ETFs as a driver of high correlations. One would probably come across more media/blog bytes on Risk On-Risk Off etc than ETFs impact on correlations. 

ETFs had $1.2 trillion in assets under management in early 2012 and is one of the fastest growing segments. So it is likely that ETFs continue to accumulate more assets under management and along with that increased impact on underlying asset prices as well. 


When shifts happen, some adapt while others fight it . I think one way to check whether a methodology is fighting or floating with this ETF tide is to check for things like - (a) are the new opportunities sparse/decreasing relative to past? (b) does the methodology require lot more complexity to accomplish same thing that in past was simple? and (c) are the profits more harder to come by relative to past? If answer is Yes then I would imagine the   methodology and trader are fighting the tide. Please feel free to disagree/comment.
 
Recently I came across an interesting paper on ETFs and Asset return correlations. Following are some highlights from the paper. 

Why ETF's drive the asset correlations?
  • ETFs have a greater potential to affect asset correlations than mutual funds for several reasons. First, traditional mutual funds have some leeway on where to invest their money, and must typically keep some cash on hand for redemption. ETFs, on the other hand, are created in units which must contain the appropriate portfolio. Each time a unit is created or destroyed, the stocks in that ETF portfolio potentially trade together.
  • The second reason that ETFs can drive correlations is the arbitrage that they make possible between the price of the ETF and the price of the underlying basket of shares. Arbitrageurs are likely to favor ETFs because, unlike mutual funds, they are easy to short and quick to trade. Now when the basket of shares is bought or sold together for arbitrage purposes, this places demand on all of the stocks together, which in turn increases correlations.
  • ETFs, by making it easier to trade stocks with similar characteristics for investors, they acerbate co-movement among stocks that share similar characteristics. By similar characteristics, I mean like size based (small cap, large cap...) or style based etc.
Findings:
  • The paper finds that the more an ETF owns the market capitalization of stocks in its portfolio, the more the stocks in that ETF portfolio tend to move together in the subsequent month. 
  • An ETF's turnover is another strong determining factor in driving the correlated movement of stocks that make up its portfolio.
  • Another finding from the paper is the more a stocks market cap is owned by ETF's, the more that stock co-moves with the market in the subsequent month.
  •  Similarly the weighted average turnover of ETF's that owns the stock is a strong factor in driving the co-moves of the stock with the market.
I would imagine some would agree with above views and others won't. We learn more when our views differ. So please feel free to let me know your views. I have not yet figured on how to create a quant test as well as capitalize on these findings. My one gripe is the paper could have chosen better metrics for results and also presented in a more reader friendly manner.

If you are interested in reading the full paper, following is the link to the academic paper - ETFs and Asset Return Correlations

Wish you all good health and good trading!
Share