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. No
w 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!!!
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
- Insider purchases are good indicator of future prospects of the stock. That is the main reason for an insider to buy.
- 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.
- Another type of suggestion - look at how insiders fared with their past purchases. If they did well then they might do well again.
- 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.
- 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!
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!
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 -
- Strategic selection of Sectors to cash on Macro theme
- Tactical Switching between Sectors and Long term Treasury Bonds.
- 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.