Sunday, August 11, 2013

Deconstructing 10 Years of Apple Trades


Earlier this week, I read over my Apple post from last weekend and decided that just about all of the information was basically useless.
   
And my first thought as I started writing this post was to explain in detail what I thought was wrong with it.

But on second thought, I don't really want to write a post like that, and I'm pretty sure nobody wants to read a post like that. 

What's the point?

Instead, let's take the small amount of information that actually is valuable, deconstruct it a little bit, add a few new things, and see if we can make it more useful.  


1). Total # of weeks (5 trades): 432
  • What number/percentage of those weeks resulted in either positive or negative returns?
  • # of weeks with positive returns: 248 (57.41%)
  • # of weeks with negative returns: 184 (42.59%)
  • One thing to keep in mind: I'm using a minimum required rate of return of +12% annually (+0.22% weekly), so positive returns are defined as >0.22% weekly, and negative returns as <0.22% weekly.

2). Average Weekly Trade Returns: +1.08% 
  • +465.73% total return / 432 weeks = +1.08%

3). Average Weekly S&P 500 Returns: +0.20% 
  • +86.10% total return / 432 weeks = +0.20%

4). Average Weekly Excess Returns: +0.88%
  • +1.08% - +0.20% = +0.88%
  • As you can see, I subtract the weekly S&P 500 Index returns from my trade returns to determine my weekly excess returns. I could certainly use the risk-free rate as a benchmark instead of the index, but this is not a decision between buying Apple stock or a 10-year US bond. On top of that, I think using the index raises the bar considerably.

5). Cumulative Gains %: +894.47% 
  • What the huh? This is the useless information I was talking about at the start. But actually, it just needs a little bit of work.
  • Our average positive weekly excess return is +894.47% / 248 = +3.61%
  • Adjusting for the probability of a positive weekly return vs. a negative weekly return: 57.41% * +3.61% = +2.07%

6). Cumulative Losses %: -514.16%
  • Average weekly excess negative return: -514.16% / 184 = -2.80% 
  • Adjusting for probabilities: 42.59% * -2.80% = -1.19%

7). Average Weekly Excess Returns: +0.88%
  • +2.07% + -1.19% = +0.88%
  • I could call this 4a since we're back at the results calculated in step 4 above, but I think we've found some additional information that is very useful by adding steps 5 and 6

Before we get to the Omega Ratio, let's take a quick look at risk. I evaluate the risk to a position with 3 numbers (the following numbers, without digging into the equations, are my current calculations):
  • Value at Risk (VaR): -10.10%
  • Maximum Actual/Historical Drawdown: -19.43% (the week of 1.22.08)
  • my Volatility-Based Trailing Stop: -12.95% (Apple closed Friday at $454.45, and my new stop for the coming week is $395.62, so ($454.45 - $395.62) / $454.45 = 12.95%.
I'll generally take the middle number of the 3 as the best estimate of my risk. 

In Apple's case, that would be my stop. 

But for a stock with a limited history/limited data set like TripAdvisor (TRIP), which has the following set of calculations:
  • Value at Risk (VaR): -10.71%
  • Maximum Actual/Historical Drawdown: -6.93% (the week of 4.1.2013)
  • my Volatility-Based Trailing Stop: -19.79% (($80.94 - $64.92) / $80.94)
I'd pay more attention to the VaR calculation.

Okay, so back to the... 

8). Omega Ratio: 1.74 
  • +2.07% / -1.19% (absolute value) = 1.74
  • Is that good or bad? It's good, but we obviously need some context here.
I rank all of the stocks in the S&P 500 by several ratios (Omega, Sharpe, Sortino, Upside Potential, etc.), and I like the Omega Ratio in particular because it factors all of the specific returns into it's calculations. It does not assume anything. 

So how does Apple rank?

This is my current Top 10 (by Omega Ratio):

1. TripAdvisor (TRIP): 2.74
2. LyondellBasell (LYB): 1.88
3. Apple (AAPL): 1.74
4. Marathon Petroleum (MPC): 1.70
5. Mastercard (MA): 1.63
6. NetFlix (NFLX): 1.63
7. Intuitive Surgical (ISRG): 1.59
8. Precision Castparts (PCP): 1.57
9. Priceline.com (PCLN): 1.52
10. Discover Financial Services (DFS): 1.51

FYI - I planned to include a table with all of the Average Weekly Positive and Negative Returns, Probabilities, and resulting Omega Ratios... but it wouldn't fit.

Alright, so if the idea was to make this information more useful, then how are we going to use it?

My first thought, with 20 weeks left in 2013, is to project, based on the numbers we've calculated above, how much a share of Apple will cost at the end of 2013. 

I never do this kind of thing (until right now apparently), and I generally don't like predictions of any kind, so I'm going to call this a falsifiable hypothesis:
  • The closing price Friday was $454.45, and ((1+0.0088)^20)-1) = +19.12%, so $454.45 plus an additional 19.12% = $541.35.

Yes, I realize that new information will render that number useless a week from now. The irony is not lost on me. But this is still fun.

Where do you think Apple will be at the end of 2013? 

Or at the end of August for that matter?

Disclaimer: I currently own shares of LyondellBasell, Apple, Mastercard, NetFlix, and Precision Castparts.   

Sunday, August 4, 2013

Apple (AAPL)

New BUY signal the week of 7.29.13 (Friday) at $462.54. My initial stop is $393.59, so my risk (R)/share is $68.95 (14.91%).

That probably seems like a very wide stop, but my Value at Risk (VaR) calculation (at a 99% confidence level) is -10.10% ($46.74), and my Worst Actual/Historical Weekly Drawdown is -19.43% ($89.87), so 14.91% ($68.95) actually sounds about right.

At least to me it does.

History (beginning in 2003):
Winning Trades: 3 | 75.0% | +$203.20/share avg.
Losing Trades: 1 | 25.0% | -$12.10/share avg.
Average Trade: +274.8% | +$149.38/share | Reward-to-Risk (R): +11.14
Compound Annual Growth Rate (CAGR): +55.0%
Sortino Ratio (annualized): +2.36
Omega Ratio: 1.74 

Sortino and Omega Ratio calculations:
Total # of weeks (4 trades): 431 
Mean Trade Returns (weekly): +1.08%
Mean S&P 500 Returns (weekly): +0.20%
Excess Trade Returns (weekly): +0.88%
Downside Deviation (weekly): +2.70%
Sortino Ratio (calculation): +2.36
Cumulative Gains %: +894.47%
Cumulative Losses %: -514.16%
Omega Ratio (calculation): 1.74

The Best Bang For Your Buck

In the General Merchandise Stores industry of the Consumer Goods sector is...

...either Dollar General (DG) or Dollar Tree (DLTR).

You see, if we rank the stocks using the Sortino Ratio...

RankSymbolCompanyAverage Weekly Excess Return %Downside Deviation %Sortino Ratio
1 DG Dollar General+0.28%1.73%+0.1603
2 DLTR Dollar Tree+0.34%2.80%+0.1218
3 FDO Family Dollar Stores+0.15%2.74%+0.0538
4 TGT Target Corp.-0.07%1.66%-0.0408
5 KSS Kohl's Corp.-0.34%2.12%-0.1606

...Dollar General comes out on top.


But if we rank them by Omega Ratio...

RankSymbolCompanyCumulative Gains %Cumulative Losses %Omega Ratio
1 DLTR Dollar Tree607.38%-470.63%1.29
2 DG Dollar General198.56%-158.59%1.25
3 FDO Family Dollar Stores439.77%-395.86%1.11
4 TGT Target Corp.325.82%-350.26%0.93
5 KSS Kohl's Corp.275.55%-370.33%0.74

...then Dollar Tree is the winner.


How are we going to break the tie?

Let's see what happens when we rank them by Upside Potential Ratio:

RankSymbolCompanyUpside Deviation %Downside Deviation %Upside Potential Ratio
1 DG Dollar General1.38%1.98%0.6979
2 DLTR Dollar Tree1.51%2.59%0.5852
3 FDO Family Dollar Stores1.48%2.69%0.5476
4 TGT Target Corp.0.90%1.80%0.5026
5 KSS Kohl's Corp.0.99%2.38%0.4167

It looks like Dollar General is the best bang for your buck in the General Merchandise Stores industry after all.

Just as a side note: my Downside Deviation % calculations differ between the Sortino and Upside Potential Ratios because the Upside Potential Ratio takes the Upside (>0.22% required weekly return) and Downside (<0.22% required weekly return) Deviation %'s and multiplies them by their respective probabilities.

Sortino uses the full Downside Deviation % (all returns below the required +0.22% weekly return).

Disclaimer: I do not own any of the stocks mentioned in this post nor do I intend to open any positions in any of these stocks in the next 72 hours.

Sunday, July 28, 2013

The Stock That Pays You Back

In the Consumer Finance sub-industry of the Financials sector is... you guessed it:

Discover Financial Services (DFS).

Otherwise, I'd probably be saying "Don't Leave Home Without This Stock" or "What's In Your Portfolio?" or... I don't know what H&R Block's slogan is!?!

Moving on.

All of the ratios that I use to rank the stocks within the S&P 500 Index and then their respective sectors and sub-industries are saying the same thing for this group, so I'm only going to publish one of the ratios today.

The Sortino Ratio

RankSymbolCompanyAverage Weekly Excess Return %Downside Deviation %Sortino Ratio
1 DFS Discover Financial Services+0.49%2.22%+0.2216
2 HRB Block H&R+0.32%2.55%+0.1240
3 AXP American Express Co+0.15%1.53%+0.1008
4 COF Capital One Financial-0.02%2.34%-0.0082


And just so we're clear, when I say that Discover Financial Services is "The Stock That Pays You Back," I am not talking about dividends.

I'm talking about increasing stock prices.

To that end, let's take a look at my current trading signals for each of these 4 stocks:

SymbolCompanyBuy Signal DateBuy Signal PriceClosing Price 7/26/2013Current Trade Return %
DFS Discover Financial Services4/19/2010$15.75 $49.45 213.97%
HRB Block H&R7/9/2012$15.91 $30.49 91.64%
AXP American Express Co1/30/2012$51.38 $75.34 46.63%
COF Capital One Financial5/6/2013$59.51 $68.76 15.54%
 

That's right, you would have had to buy DFS 3+ years ago to get all of that that roughly 214% gain...

Does anybody (besides Warren Buffett) actually hold stocks that long anymore?

I do.

Personally, I think less trading is better trading.

I like long-term capital gains.

I don't like transaction costs and I really don't like paying taxes.

But that's just me. 

Disclaimer: I do not own any of the stocks mentioned in this post nor do I plan to open any positions in any of these stocks in the next 72 hours.

Sunday, July 21, 2013

The Best Oil & Gas Exploration & Production Stock in the S&P 500

Is Range Resources (RRC).

And if it's all the same to everyone, I think I'm just going to let the numbers do the talking from now on.

Let's start with the Omega Ratio, which is a risk measure that divides the Cumulative Weekly Gain % over the past 10 years of trades by the Cumulative Weekly Loss %.

RankSymbolCompanyCumulative Weekly Gains %Cumulative Weekly Losses %Omega Ratio
1 RRC Range Resources Corp.+1201.52%-864.68%1.39
2 EOG EOG Resources+959.53%-691.68%1.39
3 SWN Southwestern Energy+971.12%-708.67%1.37
4 PXD Pioneer Natural Resources+1058.07%-777.25%1.36
5 OXY Occidental Petroleum+872.22%-658.58%1.32
6 BTU Peabody Energy+733.28%-564.31%1.30
7 CNX CONSOL Energy Inc.+796.07%-633.13%1.26
8 APC Anadarko Petroleum Corp+775.38%-627.05%1.24
9 COG Cabot Oil & Gas+993.40%-805.69%1.23
10 WMB Williams Cos.+343.27%-279.55%1.23
11 MRO Marathon Oil Corp.+587.00%-478.99%1.23
12 NBL Noble Energy Inc+608.82%-504.71%1.21
13 DNR Denbury Resources Inc.+802.69%-678.90%1.18
14 APA Apache Corporation+308.12%-266.46%1.16
15 DVN Devon Energy Corp.+784.40%-708.89%1.11
16 NFX Newfield Exploration Co+724.32%-695.67%1.04


Next up is the Sortino Ratio. It divides the Average Excess Return % by Downside Deviation % (<0.22% weekly).

RankSymbolCompanyAverage Weekly Excess Return %Downside Deviation %Sortino Ratio
1 RRC Range Resources Corp.+0.66%2.94%+0.2226
2 SWN Southwestern Energy+0.64%3.11%+0.2053
3 EOG EOG Resources+0.54%2.67%+0.2034
4 PXD Pioneer Natural Resources+0.54%2.85%+0.1906
5 OXY Occidental Petroleum+0.37%2.27%+0.1635
6 BTU Peabody Energy+0.53%3.58%+0.1489
7 CNX CONSOL Energy Inc.+0.49%3.69%+0.1324
8 APC Anadarko Petroleum Corp+0.32%2.54%+0.1263
9 COG Cabot Oil & Gas+0.39%3.14%+0.1252
10 MRO Marathon Oil Corp.+0.25%2.22%+0.1141
11 NBL Noble Energy Inc+0.24%2.24%+0.1092
12 WMB Williams Cos.+0.22%2.09%+0.1073
13 DNR Denbury Resources Inc.+0.31%3.26%+0.0944
14 APA Apache Corporation+0.20%2.65%+0.0750
15 DVN Devon Energy Corp.+0.15%2.45%+0.0631
16 NFX Newfield Exploration Co+0.07%3.22%+0.0224
 

This is obviously a closer race than the Biotechnology sub-industry, where Gilead Sciences was (and still is) clearly the best stock in the group.

Range Resources is neck and neck with EOG Resources based on their Omega Ratios, but EOG Resources slides to third behind Southwestern Energy when it comes to the Sortino Ratio, so I think we can safely call Range Resources as the winner.

Disclaimer: I do not own any of the stocks mentioned in this post nor do I intend to open any positions in any of these stocks in the next 72 hours.

Sunday, July 14, 2013

What's the best Biotechnology stock to trade in the S&P 500?

I'll just go ahead and get my disclaimer out of the way up front and say that I do not have any open positions in any of the stocks mentioned in this blog, nor do I intend to open any positions.in any of these stocks in the next 72 hours.

Glad that's out of the way.

So, until about 3 months ago, I never asked myself which Biotechnology stock in the S&P 500 would be the best to trade.

The universe was just too big. So many stocks to research and trade, so little time.

But now I know how to write code.

And the universe just got a lot smaller.

Or my head got a lot bigger...

Either way, I wrote a program in Python that ranks (at the push of one button) all of the stocks in the S&P 500, plus all of the sectors and sub-industries within the S&P 500, from top to bottom using historical return/risk ratios.

Sure, I probably could have bought a program to do what I wanted, but where's the fun in that? I like to re-invent the wheel whenever I get the chance.

My program uses the long-term trend-following algorithm for which this blog is named to generate buy and sell signals, and I've been trading for 10 years, so I run my tests back to the beginning of 2003. That seems like enough time/data to create some statistical significance. 

It will compute 10+ ratios so far, and for this post I planned to include tables for Sharpe, Sortino, and Omega Ratios, thinking the comparisons would be interesting.

But on second thought, that's probably too much information.

For now, let's just look at the results using the Omega Ratio.

To be honest, the Omega Ratio is kind of new to me, but I think it's interesting because the calculation (Cumulative Weekly Gains above the required rate of return / Cumulative Weekly Losses below the required rate of return) includes all of the returns in the distribution, which means it can account for the high risk/low probability fat tails that are not part of a normal distribution.

FYI - I'm using a 12% annual (0.22% weekly) required rate of return.

In any case, if anyone wants to see the results in Sharpe, Sortino, or any other ratio that you can think of, just let me know. I'll be happy to run and send that along.

Okay, so which Biotechnology stock in the S&P 500 is the best trade?

RankSymbolCompanyCumulative Weekly Gains %Cumulative Weekly Losses %Omega Ratio
1 GILD Gilead Sciences+615.26%-485.39%1.27
2 ALXN Alexion Pharmaceuticals+768.97%-621.65%1.24
3 CELG Celgene Corp.+242.25%-196.02%1.24
4 AMGN Amgen Inc+193.75%-157.01%1.23
5 LIFE Life Technologies+335.65%-312.81%1.07
6 BIIB Biogen IDEC Inc.+514.90%-486.40%1.06

Gilead Sciences?

That surprised me too. 

But there's a reason I research and trade with algorithms and quantitative data and not my gut.

My gut is not very smart.

So... anybody out there trading Gilead Sciences?  

Sunday, June 30, 2013

Portfolio Optimization

Can you consistently beat the S&P 500 by ranking all of the stocks in the index from 1-500, then trading only those stocks that are ranked in the top 50?

That question has been on my mind for a long time...

So I went ahead and wrote a program that ranks all of the stocks in the index from 1-500, using the same algorithmic trend-following system that I've been using for 10+ years to generate my buy and sell signals.

I ran the system on all of the stocks in the index over that same 10-year time period, and then ranked them by Sortino Ratios. That ratio is calculated as the average weekly return divided by the standard deviation of returns below the minimum required rate of return (I chose 12% as my rate).

I like Sortino over Sharpe (the average weekly return divided by the standard deviation of all returns) because it views risk as being asymmetrical. In other words, downside risk is very important. Upside risk? Not really a problem.

In all honesty, my rankings didn't change much (one or two places here and there) whether I used Sharpe or Sortino or even Drawdown Analysis, so it's just a question of personal preference.

I use weekly data inputs in my (long-term) system, so the rankings update automatically at the end of every week.

And of course, if I'm going to rank everything in the index, it also makes sense to rank the stocks within their sectors and sub-industries, so I did that too.

But before we talk about ranking the 6 stocks in the Oil & Gas Equipment & Services sub-industry of the Energy sector, I have some house-cleaning to do.

On Friday I closed out 5 positions that do not meet my criteria for trading going forward:

Salesforce.com (CRM)
With an average weekly return of +0.72% and a standard deviation of 5.04% across 372 totals weeks (5 trades) since 2004, CRM has a very respectable Sortino Ratio of +0.1423. That's easily good enough to crack my top 50. But... it's only good enough for 5th place within the Internet Software & Services sub-industry of the Information Technology sector. NetFlix (NFLX), Mastercard (MA), Visa (V), and Akamai Technologies (AKAM) all rank higher. So I closed out this trade at $38.18 (+6.3%).

Crocs (CROX)
It's simple: this stock isn't in the S&P 500. Too bad. An average weekly return of +1.64% with a standard deviation of 7.44% over 208 totals weeks (4 trades) give CROX a Sortino Ratio of +0.2202. That would solidly rank in my top 10... if it were in the S&P 500. So I sold this position for $16.50 (+6.9%).

Deckers Outdoor (DECK)
Again, not a part of the S&P 500. And again, this would be a top 50 stock based on the average weekly returns of +0.97% and standard deviation of 5.58% across 284 total weeks (4 trades). That's a Sortino Ratio of +0.1731. But these boots are made for walkin', so I sold this position at $50.51 (+16.0%).

LinkedIn (LNKD)
Same story. And I really did not want to close out this trade. Average weekly returns of +1.90% to go with a standard deviation of only 4.37%... a +0.4338 Sortino Ratio... I was just 24 weeks into this trade, and it would have been ranked in my top 5... instead I sold it for $178.30 (+51.1%).

Zynga (ZNGA)
At the other of the spectrum, I'm very happy to get rid of this one. No matter how you slice it, this has been just a lousy trade. Through 20 weeks, average weekly returns of -0.89% paired up with a standard deviation of 5.55% yields a Sortino Ratio of -0.1608. Game over. I closed this trade out at $2.78 (-19.0%).

But I did keep 2 other trades open (this can serve as my official Disclaimer).

Mastercard (MA)
My current trade has been open since October 2010 (+136.8%), and over 275 total weeks (5 trades) since 2006, MA has an average weekly return of +0.81% and standard deviation of just 4.33%. That Sortino Ratio of +0.1863 is in my top 20 overall, and is 2nd only to NetFlix (NFLX) in the Internet Software & Services sub-industry of the Information Technology sector.

Precision Castparts (PCP)
Is this the best stock in the Industrial Conglomerates sub-industry of the Industrials sector? We'll get into that another time. Truth be told, it doesn't boast great average weekly returns. Only +0.72% per week through 432 total weeks (3 trades). But what it does have is a very low standard deviation. Just 3.58%. That Sortino Ratio of +0.2013 is just good enough to crack my top 10. By the way, my current open trade stands at +78.4%.

To be completely honest, I actually do have 9 other long trades open, but at this point I'm only covering the trades that have already made their way into this blog. I'll provide disclaimers for each of those trades as they are covered in future posts. For example, when we're talking about LyondellBasell (LYB) and the other stocks that make up the Diversified Chemicals sub-industry of the Materials sector.  

Sunday, June 2, 2013

Zynga (ZNGA)

BUY signal the week of 2.4.13 at $3.43. My first stop was $2.20, so my risk (R)/share was $1.23. 

Closed Friday at $3.40 with a $2.56 stop. My new stop for this week is $2.63.  

The percentage loss on this trade is -0.9%, and the reward-to-risk ratio is -$0.03/$1.23 = -0.02.

History (beginning in 2013):
Winning Trades: 0 | 0.0% | +$0.00/share avg.
Losing Trades: 1 | 100.0% | -$0.03/share avg.
Average Trade: -0.9% | -$0.03/share | Reward-to-Risk (R): -0.02
Compound Annual Growth Rate (CAGR): -2.8% 
Alpha% (weekly): -0.26%
Sharpe Ratio (weekly): +0.0091

Alpha% and Sharpe Ratio calculations:
Total # of weeks (1 trade): 16
Mean Trade Returns (weekly): +0.04%
Mean S&P 500 Returns (weekly): +0.46%
Standard Deviation (weekly): +4.52%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): +0.66
Alpha (calculation): -0.26%
Sharpe Ratio (calculation): +0.0091

Precision Castparts (PCP)

BUY signal the week of 9.13.10 at $126.68. My first stop was $103.19, so my risk (R)/share was $23.49. 

Closed Friday at $213.92 with a $187.91 stop. My new stop for this week is $188.73. 

The percentage gain on this trade is +68.9%, and the reward-to-risk ratio is +$87.24/$23.49 = +3.71.

History (beginning in 2003):
Winning Trades: 3 | 100.0% | +$73.43/share avg.
Losing Trades: 0 | 0.0% | -$0.00/share avg.
Average Trade: +218.9% | +$73.43/share | Reward-to-Risk (R): +13.89
Compound Annual Growth Rate (CAGR): +33.0%
Alpha% (weekly): +0.46%
Sharpe Ratio (weekly): +0.1987

Alpha and Sharpe Ratio calculations:
Total # of weeks (3 trades): 427
Mean Trade Returns (weekly): +0.71%
Mean S&P 500 Returns (weekly): +0.22%
Standard Deviation (weekly): +3.58%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): +1.16
Alpha (calculation): +0.46%
Sharpe Ratio (calculation): +0.1987

Mastercard (MA)

BUY signal the week of 10.18.10 at $242.64. My first stop was $202.75, so my risk (R)/share was $39.89. 

Closed Friday at $570.25 with a $519.79 stop. My new stop for this week is $522.37.  

The percentage gain on this trade is +135.0%, and the reward-to-risk ratio is +$327.61/$39.89 = +8.21.

History (beginning in 2006):
Winning Trades: 4 | 80.0% | +$117.35/share avg.
Losing Trades: 1 | 20.0% | -$35.79/share avg.
Average Trade: +57.8% | +$86.72/share | Reward-to-Risk (R): +3.02
Compound Annual Growth Rate (CAGR): +32.0%
Alpha% (weekly): +0.67%
Sharpe Ratio (weekly): +0.1638

Alpha and Sharpe Ratio calculations:
Total # of weeks (5 trades): 271
Mean Trade Returns (weekly): +0.82%
Mean S&P 500 Returns (weekly): +0.13%
Standard Deviation (weekly): +4.98%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): +1.15
Alpha (calculation): +0.67%
Sharpe Ratio (calculation): +0.1638

LinkedIn (LNKD)

BUY signal the week of 1.7.13 at $118.00. My first stop was $96.40, so my risk (R)/share was $21.60. 

Closed Friday at $167.53 with a $139.69 stop. My new stop for the coming week is $141.22.

The percentage gain on this trade is +42.0%, and the reward-to-risk ratio is +$49.53/$21.60 = +2.29.

History (beginning in 2013):
Winning Trades: 1 | 100.0% | +$49.53/share avg.
Losing Trades: 0 | 0.0% | -$0.00/share avg.
Average Trade: +42.0% | +$49.53/share | Reward-to-Risk (R): +2.29
Compound Annual Growth Rate (CAGR): +148.7%
Alpha% (weekly): +1.14%
Sharpe Ratio (weekly): +0.3039

Alpha% and Sharpe Ratio calculations:
Total # of weeks (1 trade): 20
Mean Trade Returns (weekly): +1.95%
Mean S&P 500 Returns (weekly): +0.52%
Standard Deviation (weekly): +6.42%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): +1.56
Alpha (calculation): +1.14%
Sharpe Ratio (calculation): +0.3039

Deckers Outdoor (DECK)

BUY signal the week of 2.4.13 at $43.56. My first stop was $29.97, so my risk (R)/share was $13.59. 

Closed Friday at $53.68 with a $45.81 stop. My new stop for the coming week is $46.52.

The percentage gain on this trade is +23.2%, and the reward-to-risk ratio is +$10.12/$13.59 = +0.74.

History (beginning in 2005):
Winning Trades: 3 | 75.0% | +$29.55/share avg.
Losing Trades: 1 | 25.0% | -$16.82/share avg.
Average Trade: +117.3% | +$17.96/share | Reward-to-Risk (R): +3.44
Compound Annual Growth Rate (CAGR): +34.2%
Alpha% (weekly): +0.83%
Sharpe Ratio (weekly): +0.1539

Alpha and Sharpe Ratio calculations:
Total # of weeks (4 trades): 280
Mean Trade Returns (weekly): +1.00%
Mean S&P 500 Returns (weekly): +0.11%
Standard Deviation (weekly): +6.49%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.60
Alpha (calculation): +0.83%
Sharpe Ratio (calculation): +0.1539

Crocs (CROX)

BUY signal the week of 2.19.13 at $15.43. My first stop was $12.46, so my risk (R)/share was $2.97. 

Closed Friday at $17.64 with a $14.08 stop. My new stop for this week is $14.50. 

The percentage gain on this trade is +14.3%, and the reward-to-risk ratio is +$2.21/$2.97 = +0.74.

History (beginning in 2006):
Winning Trades: 3 | 75.0% | +$14.34/share avg.
Losing Trades: 1 | 25.0% | -$5.43/share avg.
Average Trade: +159.5% | +$9.40/share | Reward-to-Risk (R): +2.88
Compound Annual Growth Rate (CAGR): +46.2%
Alpha% (weekly): +1.35%
Sharpe Ratio (weekly): +0.1778

Alpha% and Sharpe Ratio calculations:
Total # of weeks (4 trades): 204
Mean Trade Returns (weekly): +1.70%
Mean S&P 500 Returns (weekly): +0.21%
Standard Deviation (weekly): +9.57%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): +1.68
Alpha (calculation): +1.35%
Sharpe Ratio (calculation): +0.1778

Salesforce.com (CRM)

BUY signal the week of 2.21.12 at $35.91 (adjusted for 4.18.13 4:1 stock split). My first stop was $27.13, so my risk (R)/share was $8.78. 

Closed Friday at $42.33 with a $38.00 stop. My new stop for the coming week is $38.10.  

The percentage gain on this trade is +17.9%, and the reward-to-risk ratio is +$6.42/$8.78 = +0.73.

History (beginning in 2004 and adjusted for 4.18.13 4:1 stock split):
Winning Trades: 4 | 80.0% | +$8.12/share avg.
Losing Trades: 1 | 20.0% | -$0.17/share avg.
Average Trade: +66.9% | +$6.46/share | Reward-to-Risk (R): +1.96
Compound Annual Growth Rate (CAGR): +28.2%
Alpha% (weekly): +0.52%
Sharpe Ratio (weekly): +0.1312

More bells and whistles! 

I added alpha% calculations the last time around because I want to compare the weekly performance of my trades against the benchmark S&P 500 Index.

Now I'm adding a weekly Sharpe Ratio (which I've actually calculated for years) because I like to objectively rank all of the stocks that I trade and/or follow from first to worst in terms of reward and risk. Basic portfolio optimization.

I've started to factor Sortino Ratios into the mix as well (differs from Sharpe in that it only calculates standard deviation below a minimum required rate of return), but let's stick with one new thing at a time for the sake of this blog.

Here are my calculations for alpha% and the Sharpe Ratio:

Total # of weeks (5 trades): 368
Mean Trade Returns (weekly): +0.75%
Mean S&P 500 Returns (weekly): +0.16%
Standard Deviation (weekly): 5.74%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): +1.39
Alpha% (calculation): +0.52%
Sharpe Ratio (calculation): +0.1312

Sunday, May 26, 2013

Crying Over Spilled Milk

In this particular case, the spilled milk is Facebook (FB) stock...

BUY signal the week of 11.26.12 at $28.00. My first stop was $19.07, so my risk (R)/share was $8.93. I was stopped out Friday at $24.31. The percentage loss on this trade was -13.2%, and the reward-to-risk ratio was -$3.69/$8.93 = -0.41.

History (beginning in 2012):
Winning Trades: 0 | 0.0% | +$0.00/share avg.
Losing Trades: 1 | 100.0% | -$3.69/share avg.
Average Trade: -13.2% | -$3.69/share | Reward-to-Risk (R): -0.41
Compound Annual Growth Rate (CAGR): -25.5%
Alpha% (weekly): -1.39%

...and the crying is because I didn't build this sooner. 

If I had, I not only could have/would have/should have avoided both this trade and Zynga, but I also could have/would have/should have picked up: 
  • 3D Systems (DDD) +229.3%
  • Marathon Petroleum (MPC) +86.0%
  • Phillips 66 (PSX) +54.7%
  • Pandora (P) +49.1%
  • Zillow (Z) +58.0%
  • Splunk (SPLK) +6.1%
Granted, I still would have missed out on Caesar's Entertainment (+94.3%), and I guess the LinkedIn trade is working out okay (+47.3%), but that doesn't make me feel a whole lot better.

Wah. Boo hoo. 

Sunday, May 12, 2013

Predictive Analytics

I am going to cut right to the chase.

I had hoped to write something funny about how I don't like predictions, but I don't think anybody actually wants to read that. And I'm not good at writing that kind of stuff anyway.

All I really want to talk about is the table you see below.

In almost all of my trading I use actual past trades or back-testing (or a combination of the two) to make decisions. It's all about probabilities.

But what information should I use to make trading decisions about new stocks that have only recently gone public?

That is the problem I'm trying to solve here.

So the approach/experiment I've chosen is to model the weekly price behavior of 10 stocks that have gone public over the last year and a half (beginning with their IPOs) to see if I can make reasonably accurate predictions about how the stocks will perform after we get a buy signal.   

The table includes the 10 stocks, the dates and prices of their initial buy signals, and their predicted average weekly returns. It also includes the most recent closing prices for all 10 stocks, which we use to compute the actual weekly average returns, actual total returns, and Compound Annual Growth Rates.
  

Company (Symbol)Buy Signal DateBuy Signal PriceClosing Price 5/10/2013Predicted Average Weekly Return %Actual Average Weekly Return %Actual Total Return %CAGR %
3D Systems (DDD)1/30/2012$14.09 $43.85 +0.63%+2.07%+211.2%+144.6%
Marathon Petroleum (MPC)6/25/2012$44.13 $77.38 +0.39%+1.32%+75.3%+91.4%
Phillips 66 (PSX)8/13/2012$42.33 $61.38 +1.15%+1.08%+45.0%+66.3%
Facebook (FB)11/26/2012$28.00 $26.68 -0.00%-0.08%-4.7%-10.3%
Caesars Entertainment (CZR)12/3/2012$7.32 $15.02 -0.90%+4.95%+105.2%+446.8%
LinkedIn (LNKD)1/7/2013$118.00 $173.78 +0.61%+2.49%+47.3%+226.8%
Pandora (P)1/7/2013$11.02 $15.58 +0.06%+2.24%+41.4%+188.4%
Zillow (Z)1/22/2013$35.35 $54.14 +0.74%+3.22%+53.2%+338.3%
Zynga (ZNGA)2/4/2013$3.43 $3.23 -1.16%-0.35%-5.8%-21.4%
Splunk (SPLK)4/8/2013$42.26 $44.89 +0.66%+1.58%+6.2%+119.2%

So what is the table telling us?

A lot. This blog would go on forever if I chose to break down everything it's telling us.

So I'm going to cut to the chase again and look at just 4 simple solutions.

1. The base case. In the interest of full (and embarrassing) disclosure, the first solution is what I've actually done. I took the Facebook, LinkedIn, and Zynga trades, but none of the others. Why those stocks? I honestly don't know. Gut feeling. And my gut feeling is obviously worthless. Heck, I knew that 10 years ago. That's why I use a system to trade. In any case, the result of this approach is an average gain of +12.2%.

2. Take all of the trades. No real decision to make here. The average gain with this approach is +57.4%, so it's already a much better alternative to what I've been doing.

3. Take only the trades with a positive predicted average weekly return. Now we're getting somewhere. This would include Phillips 66, Zillow, Splunk, 3D Systems, LinkedIn, Marathon Petroleum, and Pandora. Our average gain here is +68.5%.

4. But wait, there's more. What if we took only the trades with a positive predicted weekly alpha? This would eliminate Pandora, because it's predicted average weekly return of +0.06% lags the predicted average weekly return of the S&P 500, which is +0.22%. This last approach gives us an average gain of +73.0% across 6 stocks.

Clearly there is some room for improvement regarding my current methodology...

Sunday, April 28, 2013

Zynga (ZNGA)

BUY signal the week of 2.4.13 at $3.43. My first stop was $2.20, so my risk (R)/share was $1.23. Closed Friday at $3.35 with a $2.47 stop. My new stop for this week is $2.46. The percentage loss on this trade is -2.3%, and the reward-to-risk ratio is -$0.08/$1.23 = -0.06.

History (beginning in 2013):
Winning Trades: 0 | 0.0% | +$0.00/share avg.
Losing Trades: 1 | 100.0% | -$0.08/share avg.
Average Trade: -2.3% | -$0.08/share | Reward-to-Risk (R): -0.06
Compound Annual Growth Rate (CAGR): -10.6% 
Alpha% (weekly): -0.47%

Alpha calculations:
Total # of weeks (1 trade): 11
Mean Trade Returns (weekly): -0.09%
Mean S&P 500 Returns (weekly): +0.39%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation):0.98
Alpha (calculation): -0.47%

Precision Castparts (PCP)

BUY signal the week of 9.13.10 at $126.68. My first stop was $103.19, so my risk (R)/share was $23.49. Closed Friday at $187.47 with a $173.59 stop. My new stop for this week is $173.83. The percentage gain on this trade is +48.0%, and the reward-to-risk ratio is +$60.79/$23.49 = +2.59.

History (beginning in 2003):
Winning Trades: 3 | 100.0% | +$64.61/share avg.
Losing Trades: 0 | 0.0% | -$0.00/share avg.
Average Trade: +212.0% | +$64.61/share | Reward-to-Risk (R): +13.51
Compound Annual Growth Rate (CAGR): +31.6%
Alpha% (weekly): +0.45%

Alpha calculations:
Total # of weeks (3 trades): 423
Mean Trade Returns (weekly): +0.69%
Mean S&P 500 Returns (weekly): +0.21%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.16
Alpha (calculation): +0.45%

Mastercard (MA)

BUY signal the week of 10.18.10 at $242.64. My first stop was $202.75, so my risk (R)/share was $39.89. Closed Friday at $535.33 with a $489.16 stop. My new stop for this week is $487.92. The percentage gain on this trade is +120.6%, and the reward-to-risk ratio is +$292.69/$39.89 = +7.34.

History (beginning in 2006):
Winning Trades: 4 | 80.0% | +$108.62/share avg.
Losing Trades: 1 | 20.0% | -$35.79/share avg.
Average Trade: +54.9% | +$79.73/share | Reward-to-Risk (R): +2.85
Compound Annual Growth Rate (CAGR): +31.2%
Alpha% (weekly): +0.67%

Alpha calculations:
Total # of weeks (5 trades): 266
Mean Trade Returns (weekly): +0.81%
Mean S&P 500 Returns (weekly): +0.12%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.15
Alpha (calculation): +0.67%

LinkedIn (LNKD)

BUY signal the week of 1.7.13 at $118.00. My first stop was $96.40, so my risk (R)/share was $21.60. Closed Friday at $187.76 with a $148.56 stop. My new stop for the coming week is $147.87. The percentage gain on this trade is +59.1%, and the reward-to-risk ratio is +$69.76/$21.60 = +3.23.

History (beginning in 2013):
Winning Trades: 1 | 100.0% | +$69.76/share avg.
Losing Trades: 0 | 0.0% | -$0.00/share avg.
Average Trade: +59.1% | +$69.76/share | Reward-to-Risk (R): +3.23
Compound Annual Growth Rate (CAGR): +400.4%
Alpha% (weekly): +2.38%

Alpha calculations:
Total # of weeks (1 trade): 15
Mean Trade Returns (weekly): +3.33%
Mean S&P 500 Returns (weekly): +0.49%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.93
Alpha (calculation): +2.38%

Facebook (FB)

BUY signal the week of 11.26.12 at $28.00. My first stop was $19.07, so my risk (R)/share was $8.93. Closed Friday at $26.85 with a $25.48 stop. My new stop for the coming week is $25.55. The percentage loss on this trade is -4.1%, and the reward-to-risk ratio is -$1.15/$8.93 = -0.13.

History (beginning in 2012):
Winning Trades: 0 | 0.0% | +$0.00/share avg.
Losing Trades: 1 | 100.0% | -$1.15/share avg.
Average Trade: -4.1% | -$1.15/share | Reward-to-Risk (R): -0.13
Compound Annual Growth Rate (CAGR): -9.9%
Alpha% (weekly): -0.86%

Alpha calculations:
Total # of weeks (1 trade): 21
Mean Trade Returns (weekly): -0.07%
Mean S&P 500 Returns (weekly): +0.54%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.46
Alpha (calculation): -0.86%

Deckers Outdoor (DECK)

BUY signal the week of 2.4.13 at $43.56. My first stop was $29.97, so my risk (R)/share was $13.59. Closed Friday at $54.31 with a $46.46 stop. My new stop for the coming week is $45.34. The percentage gain on this trade is +24.7%, and the reward-to-risk ratio is +$10.75/$13.59 = +0.79.

History (beginning in 2005):
Winning Trades: 3 | 75.0% | +$29.76/share avg.
Losing Trades: 1 | 25.0% | -$16.82/share avg.
Average Trade: +117.6% | +$18.12/share | Reward-to-Risk (R): +3.45
Compound Annual Growth Rate (CAGR): +35.0%
Alpha% (weekly): +0.86%
 
Alpha calculations:
Total # of weeks (4 trades): 275
Mean Trade Returns (weekly): +1.02%
Mean S&P 500 Returns (weekly): +0.10%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.62
Alpha (calculation): +0.86%

Crocs (CROX)

BUY signal the week of 2.19.13 at $15.43. My first stop was $12.46, so my risk (R)/share was $2.97. Closed Friday at $15.93 with a $12.98 stop. My new stop for this week is $12.73. The percentage gain on this trade is +3.2%, and the reward-to-risk ratio is +$0.50/$2.97 = +0.17.

History (beginning in 2006):
Winning Trades: 3 | 75.0% | +$13.77/share avg.
Losing Trades: 1 | 25.0% | -$5.43/share avg.
Average Trade: +156.7% | +$8.97/share | Reward-to-Risk (R): +2.73
Compound Annual Growth Rate (CAGR): +44.8%
Alpha% (weekly): +1.35%

Alpha calculations:
Total # of weeks (4 trades): 199
Mean Trade Returns (weekly): +1.69%
Mean S&P 500 Returns (weekly): +0.20%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.69
Alpha (calculation): +1.35%

Saturday, April 27, 2013

Salesforce.com (CRM)

BUY signal the week of 2.21.12 at $35.91 (adjusted for 4.18.13 4:1 stock split). My first stop was $27.13, so my risk (R)/share was $8.78. Closed Friday at $40.71 with a $38.87 stop. My new stop for the coming week is $39.35. The percentage gain on this trade is +13.4%, and the reward-to-risk ratio is +$4.80/$8.78 = +0.55.

History (beginning in 2004 and adjusted for 4.18.13 4:1 stock split):
Winning Trades: 4 | 80.0% | +$7.72/share avg.
Losing Trades: 1 | 20.0% | -$0.17/share avg.
Average Trade: +66.0% | +$6.14/share | Reward-to-Risk (R): +1.93
Compound Annual Growth Rate (CAGR): +28.0%
Alpha% (weekly): +0.53%

As you can see, I've added alpha to the mix just to see how I've traded Salesforce.com over the years on a risk-adjusted basis. I use weekly OHLC data to trade a long-term trend-following system, so it seems appropriate to measure alpha on a weekly basis(?)

For my calculations, I've captured (and combined) the weekly returns for all of my Salesforce.com trades and compared them to the corresponding weekly S&P 500 Index returns. Hopefully this yields a meaningful number. After 10+ years of trading, I have to confess that this is my first real exploration of alpha, so I may be way off base. Like a lot of things (including this blog), it's a work in progress. 

My first thought was to share my calculations for alpha via Google Docs, and as much as I'm sure everyone would like to examine 370 lines of data, I think I'll just lay out the summary results here:

Total # of weeks (5 trades): 363
Mean Trade Returns (weekly): +0.75%
Mean S&P 500 Returns (weekly): +0.16%
Risk-Free Rate (baseline assumption): 0.0%
Beta (calculation): 1.39
Alpha (calculation): +0.53%   

Obviously, my assumption for the Risk-Free Rate is 0%, and I used that primarily for the sake of simplicity. But I also did it to establish what I consider more or less a baseline result. If I change the Risk-Free Rate to 1%, then my alpha increases to +0.92%. 

On the flip side, since beta is a multiplier in my calculations, my alpha would get worse when I have a beta less than 1.  

Friday, March 29, 2013

Zynga (ZNGA)

BUY signal the week of 2.4.13 at $3.43. My first stop was $2.20, so my risk (R)/share was $1.23. Closed Friday at $3.36 with a $2.37 stop. My new stop for this week is $2.46. The percentage loss on this trade is -2.0%, and the reward-to-risk ratio is -$0.07/$1.23 = -0.06.

History (beginning in 2013):
Winning Trades: 0 | 0.0% | +$0.00/share avg.
Losing Trades: 1 | 100.0% | -$0.07/share avg.
Average Trade: -2.0% | -$0.07/share | Reward-to-Risk (R): -0.06
Compound Annual Growth Rate (CAGR): -14.2%