The MASC BAO Trading Strategy

Finding MASC BAO strategies on randomly selected stocks

The MASC BAO trading strategy frequently shows up in the top ten backtests. It has the distinction of being the strategy used in the most profitable backtest SignalSolver has ever found--AAPL Monthly MASC BAO which would have generated over $400 Billion from $10,000 invested.

Here we look for MASC BAO strategies which beat Buy/Hold for stock symbols A through F (i.e. an arbitrary selection) using backtests run against daily, weekly and monthly data for each stock. The point of the exercise is simply to show that you can usually find a MASC BAO algorithm that beats buy or short-hold. Here are the results:

MASC BAO backtest results

Each table shows the difference between the buy-hold returns and the returns from the MASC BAO strategy. Strategy returns are shown in three parts, those for the long only, short only and combined long&short (L&S). Also of interest are the Reward/Risk numbers (higher is better).

You can see that for all 18 data sets, SignalSolver was able to find MASC BAO trading algorithms which beat buy-hold or short-hold. Many were significantly better, such as the 83% annualized return for E daily (vs 0% for buy-hold), however a few were only marginally better such as the 15.3% for D weekly (vs. 12.8% for buy-hold).

More about the MASC BAO strategy

MASC BAO roughly follows a "buy the dips but sell at the first sign of trouble" methodology. The MASC BAO strategy for the Percentage Band is this:

  1. A BUY signal occurs if, in a given period, the price fails to rise a fixed percentage above the last sale price.
  2. A SELL signal occurs if the price goes below a fixed percentage below the median price (i.e. half H+L) of the previous period.
  3. A sell signal turns a bullish position to bearish at the open of the subsequent period.
  4. A buy signal switches a bearish position bullish at the close of the period.
  5. You only respond to one signal per time period.

For example, if the last sale price was 100, a buy signal for [MASC 10% PB] would occur if the price in a given day, week or month failed to go above 110. This could be dangerous if you were trading short or long and short. If you were short and the price broke out to new highs, there would be no buy (cover) signals and you would lose all if the price went to double your short sale price. If you were just trading long, you would be simply be locked out of a bull run.

For other bands, the percentage value is calculated on the band in use and added into the reference (in this case last sale price on buys, median price on sells), as described here. Interestingly, only 4 bands emerged from this study: SMA (Simple moving average), TMTR (Trimmed mean of the true range), Bol1 (Bollinger band 1) and the PB (percentage band). Other bands often gave good results, but these four bands gave the best results.

As always, good backtest results don't necessarily translate into future profits for any trading strategy.


If you care to reproduce these results, here are the settings:

IBB Trading Strategy Details and Performance

IBB Trading System (Weekly)

This weekly trading strategy for IBB had 3 times better annualized returns than IBB and more than 10 times better return over the 10.1 years. For each 2.5 year period within the 10 years,  the annualized return was between 30 and 50%.

IBB Trading Strategy Details and Performance

IBB Trading Strategy Details and Performance

IBB Weekly Trading Strategy: Equity Curve

IBB Weekly Trading Strategy: Equity Curve

Berkshire Hathaway trading strategy

This is a Berkshire Hathaway trading strategy which would have given almost ten times the return performance of buy/hold over the last 10 years with half the drawdown. The strategy is detailed in the table below, it was straightforward, with 123 trades over the 10 year backtest period. All trading was done at the weekly close of business. This was a strategy where there was usually a buy and a sell signal every week (398 out of 528 weeks), but selling was initiated by the presence of a sell signal and an absence of a buy signal. There was a strong buy bias, appropriate for the underlying positive trend of the stock.

Equity curve, signals and positions are shown in the growth chart below. Notice the preponderance of white signals which indicate dual signal days.

If the sell point was set at zero percent, the algorithm gave positive results for all buy points greater than 0.25%. Below we show how return varies with buy and sell parameters.

The returns for every combination of buy and sell parameter are shown in the surface plot below.

Looking at the minimum annualized returns for each of the four 132 week periods, you can see that the algorithm was much better behaved than the underlying stock, worst case was 19.26% which happened in the most recent quartus. The long side of the algorithm showed a min return of 15% with a stddev of only 3.37%, which is quite tight.

As always, this is not a recommendation to trade using this algorithm, just an interesting backtest result. For a list of trades, see here: BRKA.W Trades.

Please note, the above result was corrected 12/28/2015 to address a bug fix in the short side calculations.

Update Oct 21st 2016


BRK-A Trading Strategy (Weekly) Update 10/21/16

BRK-A Trading Strategy (Weekly) Update 10/21/16

GOOGL Trading Strategy (Weekly)

Here is a Google Inc (GOOGL) trading strategy with once a week intervention which would have performed significantly better than buy-hold over the last 10 years. Annualized return was 31.5% vs. 16.5% (returning $149K for 10K outlay vs $36.7K, compounded), drawdown was 40.2% vs. 62.4%, so reward/risk was better.

The buy and cover signal (see table below) was present every week where the price dropped 0.03% below the last price the stock was sold at which happened 174 times over the course of the 528 weeks of the analysis, and usually happened the week following a sell/short.

The sell and short signal happened every week the stock price rose 8.13% or more above the open price of the current week. This happened only 29 times, so there is a strong buy-side bias to this strategy. All trading would have been done at the open of the week following the signal.

The equity curve for this GOOGL trading strategy shows that the stock was held short (the red bands in the background) for small periods, typically a week.

The scan below shows how the annualized return changed, had the buy and sell parameters changed. At 2.35% buy point, the algorithm gets stuck, resulting in a loss. This is characteristic of trading strategies which reference buy or sell prices. At 1.5% sell point and below, the algorithm made a loss, but returns for all buy points above that were positive, for the 0.03% buy point.

One nice characteristic this algorithm had was consistent returns for each of the 132 week  periods in the backtest. You can see from the table below that the annualized return was between 28% and 34.8% for every period. Compare that with buy-hold which ranged from -4.6% to 26%

You can also see this characteristic on the scans for each quartus:

You can download the list of trades in .xlsx format: GOOGL.W Trades.

As of Sept 16th 2015, the algorithm is long, awaiting a sell signal if the price hits 708.933. Last sell price was 654.34.

Please note, while this is an interesting backtest result, it is not a suggestion to trade this way. As always I don’t know how this strategy will fare in the future, but will track it from time to time.


This post was edited 12/28/15 to correct an error in the short-side returns.

Update Oct 21st 2016

This strategy has pretty much followed buy-hold long:

GOOGL Trading Strategy Update Oct 21 2016

GOOGL Trading Strategy Update Oct 21 2016

TQQQ Trading Strategy (Weekly)

Today I present two TQQQ trading strategy backtest results with weekly setup with similar reward-risk but very different characteristics. TQQQ is the ProShares UltraPro QQQ, a triple leveraged ETF tracking the Nasdaq. The backtests were for the 288 weeks 2/11/10 through 8/14/15.

The first trading strategy was found by optimizing the scanner for low drawdown, (per Prasad’s request):

Backtest results for weekly TQQQ trading strategy showing low (8%) drawdown. The backtest is for the period 2/11/10 to 8/14/15.

This strategy gave similar return to buy/hold with much lower drawdown (8% vs. 41%). It only spent 42% of the time in the market, so it was quite efficient. The user defined price is found by averaging the open price of the current week, the previous week’s low price and the previous week’s high price. Here is the equity curve:

Equity curve for the low drawdown TQQQ trading strategy backtest. Return is about the same as buy/hold.

These results were corrected 1-4-2016 to fix the short-hold return.

The second TQQQ trading strategy backtest was found by optimizing the SignalSolver scanner for returns:

This is a long & short strategy when you are were always in the market either long or short. The equity curve shows that this was not a frequent trader, in fact no trades since Dec 2011:

List of trades: TQQQ.W RR .


Please note: All trading strategies are backtested on a single security and will typically not give similar results on other securities. All returns are compounded. Trading costs are assumed to be $7.00 per trade with zero slippage.

The posting was corrected 12/29/2015 for an error in the short-side returns of the BMS ACO algorithm.

Update 10-20-2016

BMS ACO has continued to track buy-hold with no trades adding 7.45%.

TQQQ Trading Strategy Update Oct 20th 2016

TQQQ Trading Strategy Update Oct 20th 2016

This strategy peaked 11/30/2015.

GILD Trading Strategy (Weekly intervention)

This is a GILD trading strategy with weekly intervention required. I found algorithms with better returns, but they were less consistent over time and had more parameter sensitivity. I chose this one because of many favorable characteristics:-

  • Buy low, sell high type of algorithm, biased towards buying as befitting an upward trending stock like GILD.
  • Buy and sell at the weekly open was easy and convenient to implement
  • Buy and sell signals were well differentiated (only 4 dual signals) with good reinforcement on the buy side.
  • Good lifetime characteristics with each 2.5 year  period beating buy-hold.
  • 87% successful trades and a Sharpe Ratio of 2.03 vs 1.05 for buy-hold.
  • Gentle slopes on the parameter surface.

Note that charts were corrected 1-2-16 for an error in short-side return


Update 1-2-2016

GILD-W1 1-2-16 Update Table

Update 10/20/2016

GILD Weekly Trading Strategy Update Oct 20th 2016

GILD Weekly Trading Strategy Update Oct 20th 2016

MSFT Trading System (Weekly)

This graph shows the equity curve of the trading system for Microsoft (MSFT) over a ten year period, 1/3/05 to 2/6/15 for a $10K initial investment. The value increased to $262,144 vs. $19,521 for buy-hold. The background bands show if the stock was held long (green) or short (red). Note that most of the sell signals (shown at the bottom) are also dual signals as a buy signal generally occurs in the same time period. This is common with this kind of trading strategy.

The trading strategy works off weekly data, so it trades at most once a week and uses stop cover/buys and limit short/sells. The L&S column shows results for trading both Long and Short. Drawdown (20%) was much better than for buy-hold (57%).

Here we compare the returns over different time periods, as they change with buy and sell point. We look for algorithms which give consistent returns–this one has one period of high returns (the red lines) and a period of returns similar to buy-hold (the green lines). Overall the returns were good (the blue lines).

Plotting how returns change with buy and sell points gives us an idea how sensitive the algorithms are to changes in parameters. Here we see two broad peaks indicating that the algorithms are not overly sensitive to changes in parameters. In fact this buy point was profitable for all values of sell point from 2.5% to 10%.

In the surface plot of return vs. buypoint/sellpoint we are looking for high ground, not too close to cliffs or valleys. For this algorithm there is a distinct hill feature showing a fairly stable exploit region.

Looking at 100 week performance for the same algorithm shows an improvement over buy-hold and better drawdown, although the equity curve (below) is similar.

Update 10/19/2016

This strategy has lost around 22% since inception, the underlying stock has gained 48%.


LRN Trading Strategy (Weekly)

K12 Inc (LRN)

LRN.W Equity Corr

LRN.W Table Corr

LRN.W Surface Corr

LRN.W Scan Corr

LRN.W Life Corr

Update 12/27/2015

The above plots have been corrected for an error in the short side calculations. Below are updated equity curves and tables up until Dec 2015. The algorithm lost 13.6% over this time. The underlying stock dropped by 37.2%.

LRN.W Equity Update Dec15

LRN.W Table Update Dec15

LRN Table Update2 Dec15

LRN.W Equity Update2 Dec15

Update 10/19/2016

Since first publication in Feb 2015, this strategy has outperformed both buy-hold and short-hold. Here are the performance table and equity curve for the period since publication:

LRN Trading Strategy Update

LRN Trading Strategy Update


LRN Trading Strategy, Update 10/19/2016

LRN Trading Strategy Equity Since Inception

LRN Trading Strategy Equity Since Inception