BABA Equity

BABA (Alibaba) Signals – Weekly

From Jul 2008 to Aug 2018, these trading signals for Alibaba (BABA) used as directed would have performed around 14 times better than buy-hold.

These trading signals for BABA were selected from 1,173,290 backtest results for their reward/risk and parameter sensitivity characteristics.While backtests don't always provide reliable signals which can be counted on moving forward, many swing traders find value in knowing what buy and sell signals could have been used in the past.

For the 205 week (3.9 year) period from Sep 15 2014 to Aug 17 2018, these signals for Alibaba Group Holding Limited A (BABA) traded long and short would have yielded $152,176 in profits from a $10,000 initial investment, an annualized return of 103.9%. The long-side profit (buy/sell only, no shorts) for the signals was $50,880, an annualized return of 58.7%. If you had bought and held the stock for the same period the profit would have been $8,902 (an annualized return of 17.7%). The trading style was Long & Short, meaning that you would be long or short the security at all times.

For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular BABA strategy there were 16 buy signals and 30 sell signals.These led to 12 long trades of which 9 were profitable, and 12 short trades of which 11 were profitable.

This is a weekly strategy; weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 20% vs. 50% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 4.16 vs. 0.32 for buy-hold, an improvement factor of around 13.0

GOOGL (Alphabet Inc.) Signals – Weekly

These Alphabet Inc. GOOGL signals were selected from 1,240,000 backtest results for their reward/risk and parameter sensitivity characteristics. While backtests don't typically provide reliable signals which can always be counted on moving forward, many swing traders find value in knowing what buy and sell signals would have worked over time.

GOOGL Signals Weekly

For the 528 week (10.1 year) period from Jul 7 2008 to Aug 17 2018, these signals for Alphabet Inc. (GOOGL) traded as directed would have yielded $525,656 in profits from a $10,000 initial investment, an annualized return of 48.3%. The long-side profit (buy/sell only, no shorts) for the signals was $175,257, an annualized return of 33.5%. If you had bought and held the stock for the same period the profit would have been $35,599 (an annualized return of 16.2%). The trading style was Long & Short, meaning that you would be long or short the security at all times.

For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular GOOGL strategy there were 471 buy signals and 101 sell signals.These led to 68 long trades of which 54 were profitable, and 67 short trades of which 41 were profitable.

This is a weekly strategy; weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 36% vs. 50% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 1.18 vs. 0.29 for buy-hold, an improvement factor of around 4.0

MSFT Signals Weekly Equity

MSFT (Microsoft) Signals – Weekly

These trading signals for MSFT were selected from 1,220,000 backtest results for their reward/risk and parameter sensitivity characteristics. While backtests don't typically provide reliable signals which can always be counted on moving forward, many swing traders find value in knowing what buy and sell signals would have worked over time.

MSFT Signals Weekly

For the 528 week (10.1 year) period from Jul 7 2008 to Aug 17 2018, these signals for Microsoft Corporation (MSFT) traded as directed would have yielded $396,274 in profits from a $10,000 initial investment, an annualized return of 44.3%. The long-side profit (buy/sell only, no shorts) for the signals was $141,145, an annualized return of 30.8%. If you had bought and held the stock for the same period the profit would have been $43,187 (an annualized return of 18.0%). The trading style was Long & Short, meaning that you would be long or short the security at all times.

For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular MSFT strategy there were 364 buy signals and 273 sell signals.These led to 148 long trades of which 107 were profitable, and 147 short trades of which 104 were profitable.

This is a weekly strategy; weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 27% vs. 44% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 1.40 vs. 0.36 for buy-hold, an improvement factor of around 3.8

FB Signals Weekly Equity

FB (Facebook) Signals – Weekly

These trading signals for FB were selected from 1,210,488 backtest results for their reward/risk and parameter sensitivity characteristics. While backtests don't typically provide reliable signals which can be counted on moving forward, many swing traders are curious as to what buy and sell signals would have worked up until now.

FB Signals Weekly

For the 327 week (6.2 year) period from May 14 2012 to Aug 17 2018, these signals for Facebook, Inc. (FB) traded as directed would have yielded $494,263 in profits from a $10,000 initial investment, an annualized return of 87.3%. The long-side profit (buy/sell only, no shorts) for the signals was $170,258, an annualized return of 58.9%. If you had bought and held the stock for the same period the profit would have been $31,389 (an annualized return of 25.5%). The trading style was Long & Short, meaning that you would be long or short the security at all times.

For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular FB strategy there were 320 buy signals and 31 sell signals.These led to 24 long trades of which 18 were profitable, and 24 short trades of which 19 were profitable.

This is a weekly strategy; weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 22% vs. 57% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 3.20 vs. 0.41 for buy-hold, an improvement factor of around 7.8 .

NFLX Signals Weekly Equity

NFLX (Netflix) Signals Weekly

NFLX Signals (Weekly)

NFLX Signals (Weekly)

For the 528 week (10.1 year) period from Jul 7 2008 to Aug 17 2018, these signals for Netflix, Inc. (NFLX) traded long and short would have yielded $38,786,358 in profits from a $10,000 initial investment, an annualized return of 126.6%. The long-side profit (buy/sell only, no shorts) for the signals was $7,434,281, an annualized return of 92.5%. If you had bought and held the stock for the same period the profit would have been $790,902 (an annualized return of 54.3%). The trading style was Long & Short, meaning that you would be long or short the security at all times.

For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular NFLX strategy there were 276 buy signals and 44 sell signals.These led to 27 long trades of which 18 were profitable, and 26 short trades of which 19 were profitable.

This is a weekly strategy; weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 45% vs. 82% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 2.53 vs. 0.63 for buy-hold, an improvement factor of around 4.0

AAPL Signals Weekly Equity

AAPL (Apple) Signals – Weekly

AAPL Signals (Weekly)

AAPL Signals (Weekly)

For the 528 week (10.1 year) period from Jul 7 2008 to Aug 17 2018, these signals for Apple Inc. (AAPL) traded long and short would have yielded $1,024,775 in profits from a $10,000 initial investment, an annualized return of 58.3%. The long-side profit (buy/sell only, no shorts) for the signals was $414,729, an annualized return of 44.9%. If you had bought and held the stock for the same period the profit would have been $119,789 (an annualized return of 28.9%). The trading style was Long & Short, meaning that you would be long or short the security at all times.

For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular AAPL strategy there were 325 buy signals and 22 sell signals.These led to 20 long trades of which 19 were profitable, and 19 short trades of which 11 were profitable.

This is a weekly strategy; weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 40% vs. 54% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 1.30 vs. 0.49 for buy-hold, an improvement factor of around 2.7. Prices have been adjusted to account for 1 split. Returns have been adjusted for the worst case effects of 25 dividends.

AMZN Signals Weekly Equity

AMZN (Amazon) Signals – Weekly

AMZN Signals (Weekly)

AMZN Signals (Weekly)

For the 528 week (10.1 year) period from Jul 7 2008 to Aug 17 2018, these trading signals for Amazon.com, Inc. (AMZN) would have yielded $1,951,107 in profits from a $10,000 initial investment, an annualized return of 68.6%. If you had bought and held the stock for the same period the profit would have been $251,237 (an annualized return of 38.1%).

The trading style was Long & Short, meaning that you would be long or short the security at all times. For this type of strategy, not every signal is acted upon and signals are often reinforced. If you are long in the security, buy signals can be ignored, for example. Similarly if you are short you can ignore sell signals. For this particular AMZN strategy there were 198 buy signals and 55 sell signals.These led to 42 long trades of which 34 were good, and 41 short trades of which 21 were good.

This is a weekly strategy, which means that weekly OHLC data is used to derive all signals and there is at most one buy and sell signal and one trade per week. Drawdown (the worst case loss for an single entry and exit into the strategy) was 29% vs. 55% for buy-hold. Using drawdown plus 5% as our risk metric, and annualized return as the reward metric, the reward/risk for the strategy was 2.01 vs. 0.64 for buy-hold, an improvement factor of around 3.2

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.

Settings

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

AMZN top 4 algorithms day by day

The out of sample multi-algorithm approach was quite successful for AMZN (see results) so lets do it live and see how it ends up. On Dec 21st, I did the optimization using the EMA band and Figure of merit optimization I have been talking about in the last few posts. For the next 25 trading days and maybe beyond, I will update the following trading guidelines for the top 4 algorithms. All these strategies were found using SignalSolver.

Update Feb 23rd 2017: Summary and Wrap Up: 10, 25 and 42 day

I'd like to wrap up this study by publishing the 25 day results as promised. Since yesterday was day 42, I've also added in the 42 day results although the algorithms were never expected to have a 42 day lifetime.  I'm happy to report that the algorithms were profitable. As predicted, the 10 day results gave the best average annualized return (121%) for the algorithms, with a noticeable fall-off in the 25 day (56.6%) and subsequent 42 day (39.3%) results:

This study was done over a time period of unusual gains in the stock market and AMZN, the algorithms for 25 day and 42 day failed to keep up with buy/hold. But if you focus on that, you would be missing the most important point--that following the algorithms eliminates all the buy/sell/short/cover decision making.

The Strategies

The following sections were updated daily during the course of the live study, so that readers could follow along with the four algorithms as they progressed day to day. The last day published this way was day 20 which is shown below.


 

Strategy 1: AOS 0.67% EMA AOC 1.37% EMA--Day 20

 


 

Strategy 2: AOS 0.16% EMA MAYC 0.12% EMA--Day 20


 

Strategy 3: ACS 0.91% EMA AYO 2.0% EMA--Day 20


 

Strategy 4: MBOC 0.31% EMA AUO 2.17% EMA--Day 20


 

The Strategies

Strategy 1:

Strategy 2

Strategy 3:

Strategy 4:


 

AMZN Top 4 Algorithms: performance update at day 10 (Jan 5th 2017)

Happy new year. If you had been following along for the last 10 trading days you would have seen me publish a daily description of each the trade before and after it was made, including the type of order to be placed and when, so there was no cheating--this was a live, real-time test.

At trading day 10 (yesterday Jan 5th 2017) I am pleased to report that all 4 algorithms are showing a profit: For $10K invested in each, alg 1 profit was $258, alg 2 $142, alg 3 $558, alg 4 $147. This includes all trading costs ($7 per trade) and was for Long and Short sides combined (see L&S columns below). Just the long side did almost as well (Long column below). Of 15 total trades, 13 were profitable. Average profit was $276 or around 95% annualized return. For the same period, buy-hold return was $161 or 50.6% annualized.

The point to note here is that the combined algorithms showed a profit. Not only that, they did a much better job of exploiting the price movements than either buy-hold or short-hold. The SignalSolver algorithms make buy-sell decisions based purely on numerical analysis of  past price movements. As a technical analysis methodology I must say it did a good job in this case.

I will continue to give daily trade instructions just after each NYSE open. I will report performance out again on day 25, the end of the test period, although I expect it to decline as the algorithms age. After that we need to re-optimize to new algorithms as I expect performance of these 4 to fall off.

 

AAPL $31,000,000 trading strategy, equity curve

AAPL $31,000,000 Algorithm

This AAPL trading strategy would have given a return of $31,712,009 for every dollar invested in December 1980. That's 123,000 times better than buy-hold, with nearly four times the annualized return (61.4% vs 16.7% for buy-hold) and roughly half the drawdown which  amounts to over six times better reward/risk than buy-hold.

AAPL $31,000,000 trading strategy: Table of results

AAPL $31,000,000 trading strategy: Table of results

This is a variation of the MASC BAO algorithm which I have published before,  except this time the buy point is related to a Bollinger Band instead of just the sell price. I found it using SignalSolver.

Here is the strategy:

Description of the AAPL $31,000,000 trading strategy

Description of the AAPL $31,000,000 trading strategy

Â

In this case the Bollinger band is the 7 period StdDev of median prices (monthly (H+L)/2), and the band is built around the last sell price, not the usual method of building it around a moving average. A little unconventional but it worked wonderfully. Algorithms with buy signals based on sell price often get stuck, but this one didn't. Sell signals were based on a raw Percentage Band built around the monthly median (H+L)/2 prices, just like the original version of this.

Here is the equity curve:

AAPL $31,000,000 trading strategy, equity curve

We are looking at quite a bit of reinforcement on buy signals, but sell signals tend to come in ones or twos. There are some dual signal months but not too many. Dual signals will trigger a trade for this algorithm.

Moving onto the scans, you can see that there is a single area of profitability:

Annualized return vs. buy and sell point for the AAPL $31,000,000 trading strategy

Getting the buy or especially the sell point wrong would have led to a complete loss, as this algorithm was run Long and Short (you were either long or short at all times). Here's the entire parameter surface, for completeness:

AAPL $31,000,000 trading strategy, parameter surface

A bit of a steep sided mesa, but a reasonably large plateau.

Since I found it in June, the algorithm has added about 3%, but it hasn't traded and is still long.

AAPL MASC BAO Update Aug 4th 2017

The algorithm has added around 40% since publication in Dec 2016, return on $10K would now be $432,155,847,777 . There have been no signals or trades and the position remains long.

AAPL Monthly Trading Algorithm MASC BAO $432,155,847,777 return for $10K initial investment, update 8/4/2017

AAPL Monthly Trading Algorithm MASC BAO $432,155,847,777 return for $10K initial investment, update 8/4/2017

 

AAPL MASC BAO Update 5/4/2021

Just to round this out, the algorithm finally hit the dust in Aug 2020 making a total loss. Here's how it performed since its original publication in 2016. A mixed bag really, It kept you on the right side and did around 30% better than the underlying until about 3 years after publication, then broke down.  Like all algorithms based on backtests, they work until they don't. And you can't predict when the end will come.

In case you are wondering, re-parameterizing would have helped. A sell point of 27.28% or greater would have given you the same result as buy-hold, but without trading, so not terribly meaningful. But that's the best possible outcome for this algorithm over the last 5 years, a 45% annual return.