Showing posts with label statistical analysis. Show all posts
Showing posts with label statistical analysis. Show all posts

Tuesday, April 25, 2017

Trend profile - SPDR S&P Metals & Mining ETF $XME

Stock prices tend to move in trending patterns. This is a simple idea that may, or may not be supported by evidence. It really depends on how you frame the question and what time frame is presented. That’s because prices also tend to revert to a mean or average price. This interplay of price trend and price reversion is a fundamental dynamic of the market. It’s also the window dressing for evidence of randomness that underpins market price patterns.

It’s easy to not recognize randomness when we focus so much on trend and reversion. A core mechanism for human understanding is our ability to identify patterns and formulate responses to them. Indeed, much of our learning is dependent upon pattern recognition. Why shouldn’t our understanding of the markets be based on the same formulations?

Many successful trading strategies are based on pattern recognition. Whether fundamental or technical in nature, these systems win when the precepts of their approach match what the market is delivering at any particular span of time. Market is trending: systems based on price trend patterns win. Market is reverting: systems based on price reversion patterns win. A truly intelligent trading system would know how to recognize the difference between the two and when to apply either a price trend system or a price reversion system. (Orpheus Risk Management Indices (RMI) is one such intelligent system http://www.orpheusindices.com/)

However, attempts to predict outcomes in a world of true randomness cannot be absolutely defended, by definition, no matter how intelligent. Looking for patterns in randomness brings us to Chaos theory and fractal mathematics, which explores the transitions between order and disorder in deterministic systems dependent of initial conditions.

This is heady and fascinating stuff that has a growing influence on financial markets analysis, but how does a stockpicker fit in all this? It’s no wonder that the era of the stockpicker is quickly transforming into algorithmic and machine learning systems increasingly favoured by capital markets money managers. That’s all well and good for highly capitalized institutional shops, but what about the little guy?

The Stock Trends Inference Model (STIM) is an attempt to reconcile randomness in the market with evidence of price patterns. It is a simple application of statistics to Stock Trends categorical indicators that answers some basic questions about certain trend characteristics. Examples of these questions include: If the price momentum of a stock is relatively high and it has been in a bullish trend for a relatively long period, will the price momentum continue, and for how long? If a price trend has changed from bearish to bullish, what are expectations for price momentum going forward? If a stock breaks out of a bearish trend, what are the probabilities it will it retreat?

All of these questions are asked with the assumption that the answers provided are independent of the present broad market condition. That is, we want to know return expectations regardless of whether the market is in a bull or bear trend. Why? Because we cannot know whether the present trend of the market will persist. If we make an assumption that it will, then our measurement of the expected returns of an individual market (stock, ETF) will be imprecise.

This is important. When we take a measurement of a particular market condition - as represented in the combination of Stock Trends indicators in each weekly Stock Trends Report for individual stocks and ETFs - the observations of similar market conditions will take place across time periods that span the entire population of observations. Each observation occurs in varying broad market trend phases. In this respect, the Stock Trends Inference Model is broad market agnostic.

For that reason, the base measurement of returns is relative to the historical random returns of stocks, which is about 8% annually, and specifically equate to the following expected returns for each of the relevant periods Stock Trends measures: 0% 4-week return, 2.19% 13-week return, and a 6.45% 40-week return. If a trend condition for a particular stock/ETF does not provide statistical evidence that it can beat these base return expectations, then we cannot say anything definitive about its return expectations. However, if there is a deviation from the base return expectations we can say that the current trend characteristics indicate either over-performance or under-performance projections. This is the objective of the Stock Trends Inference Model.

A good starting point for Stock Trends Weekly Reporter subscribers is a weekly review of the STIM Select stocks report. It shows the stocks and ETFs that have the best statistical trend characteristics. The report is ranked by the 13-week return expectations.


The current NYSE STIM Select report, as an example, includes the SPDR S&P Metals & Mining ETF (XME-N).  The Stock Trends Report for XME shows that the ETF is 7-weeks into a Weak Bullish trend; that it is underperforming the S&P 500 index by 12% over the past 13-weeks and underperformed the broad market index last week  (RSI 88 - ). It’s been in a Bullish category for 54-weeks but has been retreating since February.

SPDR S&P Metals & Mining ETF $XME -  Stock Trends Report


The statistical model shows that there have been about 277 observations of stocks and ETFs that have shared these characteristics or have had similar Stock Trends indicator combinations. From this sample we can make inferences about the expected returns of XME over the next 4-week, 13-week, and 40-week periods.

SPDR S&P Metals & Mining ETF $XME - estimated returns STIM


The green sample density plots show the distribution of returns for the three separate periods following the observation. Most generally, these distributions will be centered around the mean random return expected for each period ( 0% 4-week return, 2.19% 13-week return, 6.45% 40-week return). However, certain Stock Trends indicator combinations yield sample distributions that deviate from the expected mean random returns. The sample distribution of returns generated in the XME sample deviate in a positive way.

For the 4-week period 53.8% of returns in the sample are greater than 0%, the expected 4-week return. By employing statistical inference methods to estimate the population mean, we can estimate that the expected (or mean) 4-week return for XME is 1.8%. More importantly, with our assumption of a normal distribution of returns - a defining attribute of randomness - we also can estimate that XME has a 56.5% probability of having a return greater than the expected 4-week return of a randomly selected stock. This in comparison to the 50% probability we would expect from a random stock.

Similarly, the 13-week expected return for XME is 7.2%, with a 60.8% probability of besting the base period expected return of 2.19%, and the 40-week expected return for XME is 21%, with a 64% probability of beating the base period expected return of 6.45%. All better probabilities for beating the returns of a randomly selected stock.

While even a 64% probability is better than a 50% probability implicit in a random selection, it’s still only a 64% probability. There is a 36% probability that it will underperform the expected return of a randomly selected stock. If you know anything about chance, you must know that a 36% chance of being wrong is more than enough to lose your shirt.

However, the Stock Trends Inference Model does tell us that XME is currently in a trend and momentum position that historically has exhibited tendency toward positive returns in the subsequent period. This gives us some confidence in making a directional trade, and can be used as the foundation of a derivatives trade (options) that further improves a trader’s probability of making a profitable trade.   

Saturday, June 27, 2015

Are you a systematic investor?

To be a successful trader one should be part data scientist. Although there are some highly successful traders that hinge their plan on subjective analysis artforms, the road to long-term profits in active trading should be grounded in the laboratory of data. The simple reason for this: failure, as much as success, must be measured and understood because market outcomes are often inherently volatile and unpredictable. Scientific method allows us to test trading hypothesis, learn from mistakes, and quantify risk. Systematic traders understand that without the integrity of data science, they are simply ticker tape cowboys.

Having an analysis framework is an important departure point for the systematic investor. That framework could be fundamental / value analysis - translating measures of intrinsic value into trading signals. An example of this would be the Dogs of the Dow trading strategy. For market technicians core intrinsic value relationships are too complex to model completely. Instead, a technical analyst focuses on patterns of supply and demand for an investment instrument. Those patterns of subjective market valuations are revealed in the price and volume of every stock.

“It’s not good enough to be anecdotal or doctrinaire when it comes to trading.”

Market technicians believe in the market’s message. They construct price and volume charts to read the tea leaves, so to speak, about the future direction of a market price. But here’s where this backward-looking artform often fails: how can a technical analyst place any faith in the reading of these charts? It’s not good enough to be anecdotal or doctrinaire when it comes to trading. It’s not good enough to show a tidy chart that reveals, for example, a head and shoulders pattern, and assert a projection for future price movement if there is no data from which to develop a measure of confidence in the prognostication.

There should be some standard of evidence to support a particular chart reading. If there is no evidence, there’s no foundation for acceptance. A technical trader should quantify the probabilities of future outcomes. Data science allows the diligent systematic investor to develop a level of confidence in a market environment that is fundamentally uncertain. Risk must be quantified!

How does Stock Trends help us turn stock market data into actionable quantitative measures of confidence? First, the Stock Trends indicators are by definition categorical - they translate market price and volume data into factor variables, or independent variables. In a data science setting we can use these independent variables as inputs and measure a relevant outcome, or output. The significant outcome for investors, of course, is the future return. If a dependent relationship is established between the inputs and the output, the trader can measure a confidence level for a desired trading outcome. Let’s now look at each of the Stock Trends indicators and how they fit our Stock Trends Inference Model.

The Stock Trends trend categories are the result of a method of translating market price data (quantitative variables) into categorical variables. For instance, last week’s closing price of Apple (AAPL) was $126.60. The Stock Trends trend indicator categorizes that price by applying a framework for qualification and putting the current price into a long-term price context. Using 13-week and 40-week average prices as guideposts, the trend indicator - now Stock Trends Bullish () - gives us a factor variable for the $126.60 market price.
 
 
 
 
 
A base test, then, would be to measure how a market price performs when it is in this trend category. However, we would want a more granular categorization because within each trend category there are many ancillary variable qualifications. For instance, a Bullish trend category can be relatively new, or it can be quite entrenched.

That is why Stock Trends publishes trend counters. They give us a better understanding of the time frame of the trend category. In our Apple example we can see that the current Bullish trend category has been in place for 92-weeks, about twice the average length of a typical Bullish trend, and that the current strong Bullish indicator has been in place for 22-weeks. So now we can ask the following question: how have stocks performed when they have been in a Bullish trend category for about 92-weeks, and also in a strong Bullish indicator for the most recent 22-weeks?

But our granularity can be improved even more. We also recognize that within any trend there are varying levels of price momentum. Stocks rally and retreat. The Stock Trends Relative Strength Indicators provide us with a method for translating price performance into factor inputs. The 13-week RSI values are discrete variables that can be cut into bins of specific ranges of values. By qualifying each stock’s trend by its relative price momentum to the broad market we can now be more specific about the characteristics we are sampling. In the case of our Apple example, its 13-week RSI is 100. This indicates the stock is only performing at par with the S&P 500 over the past 13-weeks. Now we can sample for Bullish stocks that also share this condition.

The RSI +/- indicator is a binary signal of whether a stock has outperformed or underperformed the broad market in the past week. Again, this indicator can be used as another factor input. Apple underperformed the S&P 500 index last week, and therefore has a (-) indicator.

Finally, another factor variable that Stock Trends creates is derived from the weekly volume of shares traded. Three different factor levels characterize the weekly volume, so that we can differentiate stocks further by which level the trading volume fits. Last week Apple had neither high nor low volume of trading, so its volume can be characterised as normal.

With these composite factor variables, published in each Stock Trends Report, the Stock Trends Profile presents the results of the Stock Trends Inference Model. In the case of Apple, shown below, we can see that the current Stock Trends indicators are relatively positive: the future 4-week return of Apple has a 57% probability being higher than the expected mean random return of a stock, which is 0%. Remember, that a randomly chosen stock has a 50% chance of having a 4-week return greater than 0% (see The random outcome benchmark). AAPL has a 62.2% chance of besting the base mean 13-week random return, which is 2.19%, and a 56% probability of besting the mean 40-week random return (6.45%) .
 
 
These probabilities might not strike you as significantly positive. However, they do indicate that the trend and momentum conditions for AAPL are sufficiently supportive of a continued bullish stance for Apple investors. The analysis also tells us that AAPL is more appealing than stocks with lower return expectations. You can compare the returns expectations of industry stocks in the associated heatmap that ranks the expected future returns.

This is the analysis framework of Stock Trends: translating the weekly trading statistics of an issue into factor input variables. It is how we interpret these variables and their significance in predicting future price performance that makes Stock Trends a unique and effective data science application. The Stock Trends Inference Model statistically measures the change in stock price that follows from each market condition defined by the composite of the inputs of each Stock Trends indicator combination.

Stock Trends covers the North American stock market - thousands of issues every week are categorized by the Stock Trends indicators. Each of these observations since 1980 - now numbering over 9.2-million records - can be used as input variables in models that measure the subsequent price change in the categorized stock. We can ask the question: what kind of returns did a stock have after it was categorized by the Stock Trends indicators? Do stocks that have a Bullish trend indicator and high price momentum perform better, on average, than other stocks? Is there any statistical evidence that momentum trading is profitable? Does a Bullish Crossover offer a good trade entry signal? More broadly, does the data support many of the doctrinaire positions of technical analysis? The Stock Trends Inference Model attempts to answer these type of questions.

"Every technical analyst who presents a price chart as evidence of a buy signal must also present a distribution graph of the expected returns. If they don't, take their advice with a grain of salt."

Stock Trends analysis framework is simple, but specific. It looks at certain important aspects of technical analysis - trend and price momentum. Another analysis framework might be centered on other algorithms of price and volume, and on a different time frame. Every investor has to choose what analysis framework fits their own assumptions about the dependent relationships in the market. However, each analysis framework must be measureable. The litmus test of this measurement should be the the presentation of data, the display of returns distributions. Indeed, in my opinion every technical analyst who presents a price chart as evidence of a buy signal must also present a distribution graph of the expected returns. If they don’t, take their advice with a grain of salt. Your success as a systematic investor will reflect your diligence in making data science integral to your trading strategies.

Monday, May 04, 2015

Return expectations for Twitter $TWTR #notgood

There’s a new social media button: UnLike. Twitter’s stock (TWTR) might be the first click. It’s tumble last week erased much of the first quarter goodwill the market had buffed up, closing at $37.84 on Friday and leaving behind the previous $50 support level in splinters. With any market response of this profile there are hails of panic, as well as resolve. Does an investor see this correction as the beginning of an even nastier fall or an opportunity to take advantage of nervous Nellies?

Technical analysis is, by definition, the study of price and trading activity. It seeks to answer the basic question posed in any market - Do I buy, or do I sell? - by interpreting past market action and prognosticating about future market action. Sometimes the market characteristics of a particular stock (or any trading instrument) are not that distinguishable or distinguishing. And then there are stocks with market activity that is much more categorically defined. Hello, Twitter!

Stock Trends allows us to isolate market characteristics - and especially so when there is a selloff. The 25.5% drop of TWTR last week flushed out many investors, and the usually high volume of trading indicator tells us the scope of this sentiment change is substantial. When we see a change to a Stock Trends Weak Bullish indicator () on this kind of price and volume move the technical aspects of the stock are quite distinguishable.






TWTR’s Stock Trends Report shows a combination of indicators that make this event categorically interesting: the trend indicator is Weak Bullish (), with a minor trend counter of 1, and a major trend counter now at 6, an RSI of 95 - , and an unusually high volume indicator (). The market characteristic described by this Stock Trends indicator combination is of a stock that is relatively early in a Bullish trend but has tripped rather suddenly on significant bad market news. While the drop in price was substantial last week, TWTR is still only underperforming the S&P 500 by 5% measured over the past 13-weeks.

The Stock Trends Inference Model (STIM) analysis is designed to make a statistical evaluation of market conditions - especially those market conditions that are most clearly defined. The Stock Trends Report on TWTR is now a good example. What does the STIM analysis say now about this stock’s future price expectations? Remember that the STIM analysis samples 30-years of Stock Trends data looking for stocks with similar indicator combinations, measuring post-observation statistics of 4-week, 13-week, and 40-week returns. From the samples we infer population parameters of these returns and estimate the probability of the current stock (here TWTR) bettering the estimated future returns of a randomly selected stock.


Here is the current STIM analysis of TWTR:













STIM - returns expectations for Twitter TWTR

What does this analysis tell us? First, we see that the short-term price expectations are relatively neutral, with the mean return expectations near the expected return of a randomly selected stock (0%). There is a 51% probability that the 4-week return of TWTR will be positive (greater than 0%, the expected return of a broad market randomly selected stock). Not much better than the 50% probability that you would see a positive 4-week return in a randomly selected stock.
However, the 13-week and 40-week expected returns of TWTR are much more concerning. The probability of TWTR having a 13-week return better than the expected 13-week return of a randomly selected stock (2.19%) is only 45.2%. Looking further out on the time horizon is even more bleak. The probability of TWTR having a 40-week return greater than the expected 40-week return of a randomly selected stock (6.45%) is just 28.8%. Remember, a randomly selected stock has a 50% probability of having a 40-week return greater than 6.45%.

The STIM analysis tell us that TWTR, as defined by the current Stock Trends indicator combination, has a significantly low probability of delivering positive returns over the intermediate time periods ahead.

Thursday, March 05, 2015

Industry return expectations

Wondering which U.S. sectors and industry groups are signalling the best opportunities for returns in the period ahead? The Stock Trends Inference Model presents a quantitative look at period returns for individual stocks, and from those return expectations the sector and industry group average return expectations can be measured.

Recall that the Stock Trends Inference Model estimates the returns expectations for a stock, ETF or income trust given its current Stock Trends indicators. It does this by sampling for similar combinations of Stock Trends indicators over the past 30-years and measures post-observation price performance. From these samples statistical inference methodology is applied to estimate population mean and standard deviation parameters.

Every week over 6,000 issues have a Stock Trends indicator combination that has a minimum of 50 similar combinations in the data history, and you can find the resultant probability analysis in the Profile tab of these individual Stock Trends Reports. For instance, the current Stock Trends Profile of Solar Capital Ltd. (SLRC) shows that the expected 4-week return will be 5.6% and that the probability of a return greater than the base 4-week return expectation (which is 0%) is 62%. Our base expectation is that a stock has a 50% chance of a positive return in a 4-week period, so SLRC has a better chance of performing well, and is the top Nasdaq ST-IM Select stock this week.
The current week reports on 6,261 listings that have ST-IM returns estimations for 4-week, 13-week, and 40-week periods ahead. Breaking down those listings by sector and industry group gives us a better understanding of market timing trade opportunities. The heatmaps below rank sectors and industry groups by mean relative expectations over the three different time periods.

U.S sectors - ranking of return(%) expectations

 

Currently, the top returns expectations are found in utilities, healthcare, and technology sectors. Conglomerates, Financials, and Industrial sectors have the worst returns expectations.

Each sector breaks down into industry groups. The following heatmap shows how the returns expectations for these groups rank.

U.S industry groups - ranking of return(%) expectations

 

The industry groups with the best returns expectations, as averaged over the three periods, include utilities, consumer durables, and drug stocks. Financial services, conglomerates, and aerospace/defense stocks have the worst returns expectations.

The weekly Stock Trends ST-IM Select report shows the issues (stocks, ETFs, income units) with the best returns expectations over 13-weeks where the returns expectations are better than the base period returns expectations in all three periods (4-week, 13-week, and 40-week). [For rankings of return expectations within each period see the reports Top 4-week returns(%) expectations, Top 13-week returns(%) expectations, Top 40-week returns(%) expectations in the ST Filters reports section.]

Among the top ranked issues in the February 27th NYSE ST-IM report is the iShares U.S. Utilities ETF (IDU). Here Profile report shows that IDU has a 59% probability of beating the base period random return for each of the three periods. Recall that a stock chosen at random has a 50% chance of beating the broad market’s base period random return (i.e. a 0% return over 4-weeks, a 2.19% return over 13-weeks, and a 6.45% return over 40-weeks). With the given assumption of randomnessin market returns, a 59% probability of beating a random return constitutes an appreciable edge.


The heatmaps below rank the current returns expectations of large cap stocks represented in the Dow Jones Industrials index and the S&P/TSX 60 index. Microsoft (MSFT), Disney (DIS) and 3-M (MMM) top the DJI rankings, while Shaw Communications (SJR.B), Agnico Eagle Mines (AEM), and Blackberry (BB) have the best blue chip Canadian stocks return expectations. You can view the Profile report of each of these and all stocks on the Stock Trends Report page.

Dow Jones Industrials stocks - ranking of return(%) expectations

 

S&P/TSX 60 stocks - ranking of return(%) expectations

 



Wednesday, February 27, 2013

First steps toward quantitative trading


Finding the right combination of indicators is an important launching point for technical traders. Fine tuning different charting constructs, different momentum and trend indicators and back-testing results - that's the life of many market timers. Indeed, optimizing indicators and trading systems is a growing part of the investment business, as much with wealth management institutions as among the many retail traders who live by the success of their algorithms. In its own way, Stock Trends is part of this movement toward quantitative trading.

Most quantitative trading runs through finely tuned statistical models that guide both trading systems and portfolio management. The Stock Trends analysis is more static in terms of the indicators used, but seeks to optimize applied trading systems within the given parameters. The toolset used here is basic: a moving average study, a momentum indicator, and a volume trigger. But together these elements provide a powerful - and simple - means of engaging the market on a quantitative level. Each report Stock Trends publishes can be used within the framework of a trading system.

Optimizing results through statistical modelling is a multi-step process. The first thing that must be achieved is to understand your data. It is important to be able to describe its characteristics and to determine the independent and dependent variables. I have started that process in recent editorials by generating some statistical output of the Stock Trends data. The next step is to break down those descriptive statistics by category. Each subset of data that is pulled from the data history can be grouped and assessed for differences in results of the output variable - namely, the post-observation performance of individual stocks or ETFs, or the probable outcomes based on statistical predictive models.

With a given combination of Stock Trends variables, for instance, are there sub-groups that have different characteristics. We can seek to ask questions like: what are the differences in central tendencies and the distribution of results for low priced stocks compared to high priced stocks? Does price momentum propel small cap stocks higher compared to large cap stocks? Do certain sectors perform better for the momentum trader? There are many of similar questions we can evaluate, and all would be important ones to answer when developing a trading model.

Building on last week's editorial, let's take another sample of the Stock Trends data and see what it can tell us about different categories of stocks. Of particular interest is whether we can identify any divergence of performance statistics between stocks based on their share price and the Relative Strength indicator. The Stock Trends Picks of the Week report (available to subscribers of Stock Trends Weekly Reporter) provides an interesting sample of the data for discovery of important relationships between the variables. Last week we looked at statistics of the entire sample; here we group the data and compare results.

Again taking a sample of Picks of the Week selections since the beginning of 2012 until February 8,2013 we can create new categories for the share price and Relative Strength indicator and group by ranges.

Share price ranges
$2.00 - $4.99
$5.00 - $9.99
$10.00 - $19.99
$20.00 - $49.99
$50 - max($800)

Relative Strength Indicator (RSI) ranges:100-104
105-109
110-119
120-149
150-max(800)

These groupings are arbitrary, and not based on any statistical method to create bins (groups). Nevertheless, they help us categorize the data in terms or ranges that are easy to understand.
So how do the statistics for the percentage change in price (to the current end date, February 22, 2013) break out for these groupings?

Below is a table, ranked by median percentage change of the groups (median represents the middle value of observations). It gives us a breakdown of the number of observations, as well as some important metrics of central tendency and distribution of results.

price group($)RSI groupnumbermeanstandard deviationmediantrimmed meanminmaxrangeskewkurtosis
(20,50](150,800]2915.5740.6814.7014.50-69.60117.10186.700.27-0.22
(50,800](99,105]3808.4014.558.258.24-71.80102.20174.000.398.74
(20,50](110,120]6988.7022.407.408.05-70.10172.40242.500.976.46
(10,20](120,150]4049.4631.837.308.03-75.90138.20214.100.651.43
(50,800](105,110]2646.9916.826.907.51-49.6058.00107.60-0.290.69
(20,50](105,110]5617.8817.686.807.53-57.00110.30167.300.604.30
(20,50](99,105]7018.4015.956.507.59-50.00101.00151.000.673.85
(50,800](110,120]3117.9519.356.307.54-44.70106.80151.500.492.09
(10,20](110,120]4207.1526.356.106.55-98.30156.80255.100.593.68
(5,10](105,110]1186.3730.665.754.66-91.20150.00241.201.265.40
(50,800](120,150]1107.5325.555.757.38-55.9062.50118.400.00-0.07
(10,20](105,110]2876.9621.315.206.57-64.00104.10168.100.362.43
(10,20](99,105]3236.6520.784.805.97-98.3096.40194.700.144.63
(5,10](110,120]2699.2334.144.307.39-92.00127.10219.100.611.08
(5,10](99,105]1235.4118.464.104.83-58.0089.40147.400.844.67
(20,50](120,150]3906.6830.643.754.49-71.00168.10239.101.304.43
(5,10](120,150]3363.4633.311.201.38-89.40142.60232.001.022.96
(1.99,5](105,110]596.9634.590.003.97-65.10114.70179.801.011.21
(1.99,5](99,105]595.8532.02-1.101.87-41.70120.20161.901.603.13
(1.99,5](110,120]1474.3144.33-1.800.84-85.60277.70363.302.059.51
(5,10](150,800]775.6566.87-2.00-3.09-79.90352.40432.302.388.75
(1.99,5](120,150]2897.8953.54-3.001.69-88.80228.10316.901.332.46
(10,20](150,800]540.3161.09-4.50-3.51-95.10176.40271.500.680.30
(1.99,5](150,800]1706.1262.25-4.70-1.92-84.90501.80586.703.4322.18
(50,800](150,800]814.7558.73-14.0514.75-38.60109.20147.800.59-1.58

See full table and article at www.stocktrends.com

As with most tables, the first thing that jumps out is the extreme values. In particular, at the bottom half of the rankings are stock picks that had share prices between $2 and $5, across RSI values. The Picks of the Week report during the period was least populated by stocks in this price range. It is clearly the most variable price group, and also the poorest performing as shown by the low values for the median and trimmed mean (trimmed mean here excludes the top and bottom 10% of observations).

However, with variability also come the outliers - those observations we trim in statistical analysis. In the statistical world outliers are problematic. For some traders, it's their holy grail. It's the grand slam home run they celebrate. Here it would include the 500% gain on the November pick of Novogen Ltd. (NVGN), or the 277% gain of the January 2012 Santarus Inc. (SNTS) pick - among a number of other very profitable trades.

Nevertheless, when modeling a trading system it is always most important to understand the risk-reward balance. Attempting to capture higher returns on individual trades can be self-defeating. It is far better to model a system that keys on more predictable results, with low variability and a distribution that offers the best chance of long-term profits. The groupings in the top half of the table presented here would represent the more controlled parameters.

Below is a plot that compares the mean (average) percentage change in price for Picks of the Week in the sample (with a 95% confidence interval represented by the vertical bar). Also presented are Box Plots that give a visual representation of the distributions of the percentage change in price by Stock Trends RSI category range for each share price grouping.




Based on this sample of data we could focus on certain price and RSI ranges when evaluating the Picks of the Week report. For instance, we notice that relatively higher priced shares with high price momentum (high RSI values) performed better. More generally, though, it seems that stock picks with a share price above $20 provide the most consistent results. If we take a subset of the Picks of the Week sample with share price >= 20, we find the following distribution:

If we limit our analysis to Picks of the Week with a share price of $20 or greater, what kind of performance could we expect? Assuming that an investor could randomly select 5 different Picks of the Week over the period, the statistical breakdown is as follows:

This distribution is for 1000 random samples of 5 Picks of the Week, share price >= $20. Here we can see that the distribution is closer to a normal, bell-shaped distribution.




Minimum1st QuartileMedianMean3rd QuartileMaximum
-19.55.84512.7713.5220.7658.70



numbermeanstandard deviationmediantrimmed meanminimummaximumrangeskewkurtosis
100013.5212.0112.7713.11-19.5058.7078.200.390.75

 See full table and article at www.stocktrends.com


These descriptive statistics of categories are just a starting point. We should also take other samples of the Picks of the Week data. This simple analysis is presented to show that the RSI indicator can be modeled in different ways to optimize on specific variables. In order to develop a trading model we need to delve deeper into the variance and correlation of the Stock Trends indicators as well as other market data variables like trading volume.

This particular exercise, though, helps us look at the Picks of the Week report (which is a specific sample of stocks that exhibited a particular combination of Stock Trends indicators) more constructively in terms of quantitative trading. Although there are levels of charting analysis that help pinpoint technically attractive trades within the Picks of the Week report, systematic traders should understand the importance of discovering the variable constraints that correlate with minimizing variance in trading results. In particular, we can learn how the Stock Trends indicators can guide us toward developing effective trading systems.

Wednesday, February 20, 2013

Stock Trends Picks of the Week: a statistical look


The primary action matrix published here is the Stock Trends Picks of the Week report. These reports are groups of stocks, organized by exchange, that match a defined criteria or combination of variables. Each of these observations are results (roughly stated here) of the following query: select stocks and ETFs, valued over $2, that have a Stock Trends Weak Bearish () or Bullish Crossover () trend indicator, a minimum level of trading volume, and a Relative Strength indicator of at least 100. Those that are Weak Bearish must also have a high probability of being a Bullish Crossover within three weeks.

This weekly screen focuses on Weak Bearish and Bullish Crossover stocks and ETFs for a simple reason: this is the transitional trend moment where issues are theoretically primed to begin a new bullish trend. Although the parameters of Stock Trends are by definition lagging, the assumption is that the long-term trend has or will change category. Sometimes arriving late to the party, these selections still arrive in time to have the forces of trend work for the trade. That is the modus operandi for the Picks of the Week report.

However, the report does not filter down to deeper levels of categorizing observations, and as a result the list is too extensive to use without additional filtering. It is really up to the investor to match the trend qualities that are presented and the technical merit of each potential trade. That is an important question: how do you isolate the best trading opportunities from the Picks of the Week report?
 
The answer to that question does not come easy, and I won’t attempt to answer it in this editorial. Instead, let us just say for now that one way is to draw at random from the Picks of the Week report. Before we assign value to the report itself – never mind finding the optimal trade within the report – it is important to know how outcomes of the report stack up against random outcomes more generally. Will random selections from the Picks of the Week report yield better results than random selections from the broader population – namely, all stocks and ETFs? Surely, there should be a statistically significant difference in the two probable outcomes, otherwise the Picks of the Week report lacks credibility.
 
Before we look at comparisons between random sample performance of the Stock Trends Picks of the Week and from a broad sample of the data population, we can get an understanding of the central tendencies and distribution of random samples of the Picks of the Week report. For instance, if an investor simply bought 5 different random Picks of the Week selections – what would be the statistical representation of those choices? This kind of mean analysis of random samples is a common statistical method in probability models.
 
Let’s take a sample of the Picks of the Week report: all selections, across all exchanges, since the beginning of 2012. The sum of the weekly picks during this period is 6,599. That’s a big grouping and includes all picks right up to February 8, 2013. The inclusion of very recent Picks of the Week (those in the last month, for instance) is problematic in that it does affect central tendency and distribution of the positive returns, but not in a more significant fashion than the use of “end-of-period” returns.
 
There are obvious problems in measuring results for a given period. For instance, stocks may reach a high and subsequently retreat, thereby under-reporting possible results if a simple end-of-period statistic (based on the most recent closing price) is used. Also, in practical terms, stocks that have hit stop levels may have been sold before the end period, thereby reducing the amount lost on the trade. Nevertheless, we’ll simplify this analysis to make the evaluation on a very crude level. We are asking: if an investor blindly picked 5 different stocks/ETFs from the Picks of the Week reports at any point during the time frame and held them to the end-point (February 15, 2013), what is the mean return and what would the distribution of those average returns look like?
 
First, here is a summary table and histogram of these Picks of the Week returns (% change since selection):
 
 
 
 
Minimum value (PSN-T)1st QuartileMedianMean3rd QuartileMaximum value (SNTS-Q)
-98.3-4.06.48.67820.0274.3
 
 
 
 
 
numberstandard deviationmedian absolute deviationrangeskewkurtosis
659928.7517.64372.61.337.51
 
 
When we present the Stock Trends Picks of the Week, though, our expectation is not that every trade will be successful. However, we would like to see that the distribution of results is favourable. In practical terms, an appealing distribution will be asymmetrical, skewed positively with a fat tail to the right. While we can describe data with mathematical determinants that tell us of likely results, including simple measures of central tendency such as the mean and the median, in the end each pick represents a random sample of this subset of the larger population. We would want to see how these descriptive terms compare to the population itself.
 
We won’t make an attempt to calculate the population distribution now, but we can estimate that it would be close to a normal distribution, which would be symmetrical and possibly centered at the zero value, depending on the market’s overall direction. However, we can see that the distribution of the Picks of the Week sample is asymmetrical, that it is skewed positively – a long tail to the right. Half of the results fall with the 1st and 3rdquartile (the interquartile range)– between -4% and 20%. If an investor were to buy just one of the many selections in the Picks of the Week report since the beginning of 2011 their trade would have a greater than 95% chance of resulting in a return between -29 and 42%, which represents all those picks within 2 median absolute deviations (remember that the actual results obtained may be different in a real world scenario – profits booked at higher prices, losses capped at higher prices when a stock holding begins to retreat).
 
But putting all your eggs in one trade is not a trading plan sensible investors would endure. It is presumed that an investor would spread risk across trades. We should then be more interested in the distribution of average returns on samples of several picks. Let’s again assume that the investor makes a handful of trades in the period based on random selections from the reports (again, across all exchanges), and holds them until the end period. These mini-portfolio results should tell us something about the effectiveness of the Picks of the Week report.
 
A basic statistical method often used is sampling. By taking a random sample multiple times – actually many, many times over – we can estimate probable outcomes. Generally, this kind of resampling tends to prove a basic statistical truth: regardless of whether a statistic shows a non-normal distribution, as the sample sizes increase the statistic will tend toward a normal distribution. This is called the central limit theorem. However, let us take a first step and keep the sample size consistent with money management constraints and estimate that an investor’s portfolio would consist of at least 5 positions.
 
Bootstrapping 1,000 random samples (with replacement, since each of these samples is an independent portfolio) of those 5 selections from the Picks of the Week report generates the following histogram representation of the sample mean (average return of the 5 selected picks) distribution, as well as a summary table:
 
 
 
Minimum Value1st QuartileMedianMean3rd QuartileMaximum Value
-25.088.1117.7718.928.0690.4
 
 
 
 
 
numberstandard deviationmedian absolute deviationrangeskewkurtosis
100015.9114.83115.480.580.84
 
 
Now we see that the measures of central tendency have moved up – the mean (of the sample means) is 19% - and the distribution is closer to a normal distribution. More importantly, most of the sample means are above 3% (one absolute deviation below the median). The following box plots of the sample returns and the sample means returns give us a good graphical representation of the data.
 
 
Differences in the kernel density plots are also represented by the horizontal shape of the violin plots.
 
 
Overall, this analysis indicates the Picks of the Week reports have a good record of delivering trades with above average performance. This analysis does not go deeply enough in the data to indicate optimization and does not accurately compare against random sampling of the broad population of stocks. Nevertheless, it gives us an idea of the statistical metrics behind the performance of this particular subset of Picks of the Week selections.
 
I’ll be digging further into the Picks of the Week report and try to isolate various combinations of the Stock Trends variables and trading stats that change the returns distribution significantly from the sample’s distribution. There are some things we can learn about price momentum and how it delivers different results based on the sector, market capitalization or the price of the stock, and other variables. Applying more rigorous statistical analysis of the Stock Trends indicators will be the primary goal of editorials. Also, while there may be room for a return to market commentaries, I am the first to recognize there are many, many sources of “opinions” about the market direction. I’ll try to stick to quantitative trading analysis, and statistical meat here. In the end, the decision about trading is up to the investor. The best any information service can do is provide a framework for understanding the risk and rewards at hand. There is no certainty - but it’s a lot better to know your odds.