StockFetcher Forums · Filter Exchange · PORTFOLIO SELECTION AND MANAGEMENT USING RISK/REWARD RATIOS | << 1 2 3 4 5 ... 65 >>Post Follow-up |

Kevin_in_GA 3,964 posts msg #91296 - Ignore Kevin_in_GA modified |
4/16/2010 4:06:30 PM Lately I have been looking at different strategic elements of good portfolio management - diversification of asset classes, position sizing and money management techniques, and most recently (and perhaps most importantly) looking at reward/risk relationships in a quantitative fashion. I think we would all like to have a portfolio that outperforms that market, generating positive "alpha" or excess returns relative to a buy-and-hold strategy over the same time frame. Our hope in buying any stock is that we realize a gain - hopefully greater than just putting it in the bank - while not taking on too much risk. With that being said, I want to first lay out how one can quantify this type of risk/reward relationship for a stock or set of stocks, and then show how this can be done in Stockfetcher and used to identify stocks or ETFs with superior risk/reward profiles. COMPARING PORTFOLIO RETURNS
There are several ways of comparing portfolio returns with each other and with the market in general. A simple comparison is to simply compare their returns. However, returns by themselves do not account for the risk taken. If 2 portfolios have the same return, but one has lower risk, then that would be the preferable, more efficient portfolio. There are 3 common ratios that measure a portfolio’s risk/return tradeoff: Sharpe’s ratio, Treynor’s ratio, and Jensen’s Alpha. Usually these are annualized values, but they work just as well over shorter times (here I will use 21 trading days as the default, or approximately one calendar month). 1. The Sharpe ratio
The Sharpe ratio (aka Sharpes measure), developed by William F. Sharpe, is the ratio of a portfolio’s total return minus the risk-free rate divided by the standard deviation of the portfolio, which is a measure of its risk. The Sharpe ratio is simply the risk premium per unit of risk, which is quantified by the standard deviation of the portfolio. Risk Premium = (Total Portfolio Return – Risk-free Rate) / Standard Deviation of Portfolio
The risk-free rate is subtracted from the portfolio return because a risk-free asset, often exemplified by short-term Treasuries or Certificates of Deposit, has no risk premium since the return of a risk-free asset is certain. Therefore, if a portfolio’s return is equal to or less than the risk-free rate, then it makes no sense to invest in the risky assets. Hence, the Sharpe ratio is a measure of the performance of the portfolio compared to the risk taken — the higher the Sharpe ratio, the better the performance and the greater the profits for taking on additional risk. Coding this in Stockfetcher is pretty easy. First, calculate the return of the stock or ETF over the last 21 days: SET{21DAYSAGO, CLOSE 21 DAYS AGO}
SET{21DAYRETURN, CLOSE - 21DAYSAGO} SET{21DAYPERCENTRETURN, 21DAYRETURN / 21DAYSAGO} Next, subtract from this the risk-free rate of return. I use the average rate of return on a 3-month CD (right now just about 1%) as the risk-free rate of return for these determinations. Since we are looking at one month as the shortest time frame we simply divide this by 12 to get the RFR: SET{RISKFREERETURN, 0.000825}
SET{PERFORMANCE, 21DAYPERCENTRETURN - RISKFREERETURN} Now determine the volatility of the investment - this is simply the standard deviation of the prices divided by the average price: SET{STD, CSTDDEV(CLOSE,21)}
SET{VOL, STD / MA(21)} Now it's easy to calculate the Sharpe ratio for any stock or ETF: SET{SHARPE, PERFORMANCE / VOL}
2. The Treynor ratio
While the Sharpe ratio measures the risk premium of the portfolio over the portfolio risk, or its standard deviation, Treynor’s ratio, popularized by Jack L. Treynor, compares the portfolio risk premium to the diversifiable risk of the portfolio as measured by its "beta". Beta is the ratio of a stock's volatility to that of the general market - if beta is high, it indicates that the stock carries more volatility (risk) than the market, and should therefore be able to provide a higher return to justify investment. Let's start by calculating beta. We already have calculated the stock volatility for the Sharpe ratio, so all we need here is to do the same for the general market. I will use SPY as a market surrogate, although you can also use ^SPX or any other index as well. SET{SPY, IND(SPY,CLOSE)}
SET{SPYMA21, CMA(SPY,21)} SET{SPYSTD, CSTDDEV(SPY,21)} SET{SPYVOL, SPYSTD / SPYMA21} and from earlier, the stock volatility is calculated as: SET{STD, CSTDDEV(CLOSE,21)}
SET{VOL, STD / MA(21)} So beta is simply the ratio of these two: SET{BETA21, VOL / SPYVOL}
The Treynor Ratio is defined as (Total Portfolio Return – Risk-Free Rate) / Portfolio Beta. We previously also calculated the numerator (called Performance) so this is simply
SET{TREYNOR1, PERFORMANCE / BETA21} SET{TREYNOR, TREYNOR1 * 100} I have multiplied it by 100 to make its value comparable in magnitude to the Sharpe ratio. Note that since the beta of the general market is defined to be 1, the Treynor ratio of the market would be equal to its return minus the risk-free rate. 3. Jensen's Alpha (aka Jensen's index)
Alpha is a coefficient that is proportional to the excess return of a portfolio over its required return, or its expected return, for its expected risk as measured by its beta. Hence, alpha is determined by the fundamental values of the company in contrast to beta, which measures the return due to its volatility. Jensen’s alpha (aka Jensen index), developed by Michael C. Jensen, uses the capital asset pricing model (CAPM) to determine the amount of the return that is firm-specific over that which is due to market risk, which causes market volatility as measured by the firm’s beta. Jensen’s Alpha = Total Portfolio Return – Risk-Free Rate – [Portfolio Beta x (Market Return – Risk-Free Rate)]
Jensen’s alpha can be positive, negative, or zero. Note that, by definition, Jensen’s alpha of the market is zero. If the alpha is negative, then the portfolio is underperforming the market. We have calculated almost all of these quantities already, but still need to determine the SPY performance over the same period as the performance measured for the investment. Then just plug it into the calculation. That can be done as follows: SET{SPY21DAYSAGO, SPY 21 DAYS AGO}
SET{SPY21DAYRETURN, SPY - SPY21DAYSAGO} SET{SPYRETURN, SPY21DAYRETURN / SPY21DAYSAGO} SET{SPYPERFORMANCE, SPYRETURN - RISKFREERETURN} SET{RISKADJUST, BETA21 * SPYPERFORMANCE} SET{JENSEN1, PERFORMANCE - RISKADJUST} SET{JENSEN, JENSEN1 * 100} Jensen's measure is one of the ways to help determine if a portfolio is earning the proper return for its level of risk. If the value is positive, then the portfolio is earning excess returns. In other words, a positive value for Jensen's alpha means a fund manager has "beat the market" with his or her stock picking skills. SELCTION OF INVESTMENTS
Everybody is different in this regard - I am focused on ETFs because they let me access select segments of the markets, and they act as a "basket" of stocks to help smooth out volatility. Running this filter on the universe of stocks is not helpful - too many sudden one day moves to the top of the market only to drop back into the pack the next day. Very hard to trade that way using this approach. A small group of highly liquid ETFs, on the other hand, works well in this approach. Here is my current list of high liquidity ETFs that span a large range of markets and styles: SPY,EEM,IWM,SHY,DBA,DBB,DBC,USO,XRT,XME,XHB,KBE,VNQ,VTI,VVR,IWP,IWR,IEF,PCY,BKF,IWC,WIP,VBR I looked at leveraged ETFs as well, but (not surprisingly, their Sharpe and Treynor Ratios were actually LESS than the unleveraged counterpart - the added return is offset by more unit risk than one would expect, making them too risky even for their enhanced levels of return. I guess no one should be surprised by this - there have been countless articles on the higher risk associated with these vehicles, but I was still surprised that they score so much lower than the unleveraged versions. PUTTING IT ALL TOGETHER INTO A FILTER
Fetcher[ SET{21DAYSAGO, CLOSE 21 DAYS AGO} SET{21DAYRETURN, CLOSE - 21DAYSAGO} SET{21DAYPERCENTRETURN, 21DAYRETURN / 21DAYSAGO} SET{RISKFREERETURN, 0.000825} SET{PERFORMANCE, 21DAYPERCENTRETURN - RISKFREERETURN} SET{SPY, IND(SPY,CLOSE)} SET{SPYMA21, CMA(SPY,21)} SET{SPYSTD, CSTDDEV(SPY,21)} SET{SPYVOL, SPYSTD / SPYMA21} SET{ETFSTD, CSTDDEV(CLOSE,21)} SET{ETFVOL, ETFSTD / MA(21)} SET{BETA21, ETFVOL / SPYVOL} /*SHARPE RATIO*/ SET{SHARPE, PERFORMANCE / ETFVOL} /*TREYNOR RATIO*/ SET{TREYNOR1, PERFORMANCE / BETA21} SET{TREYNOR, TREYNOR1 * 100} /*JENSEN'S ALPHA*/ SET{SPY21DAYSAGO, SPY 21 DAYS AGO} SET{SPY21DAYRETURN, SPY - SPY21DAYSAGO} SET{SPYRETURN, SPY21DAYRETURN / SPY21DAYSAGO} SET{SPYPERFORMANCE, SPYRETURN - RISKFREERETURN} SET{RISKADJUST, BETA21 * SPYPERFORMANCE} SET{JENSEN1, PERFORMANCE - RISKADJUST} SET{JENSEN, JENSEN1 * 100} SYMLIST(SPY,EEM,IWM,SHY,DBA,DBB,DBC,USO,XRT,XME,XHB,KBE,VNQ,VTI,VVR,IWP,IWR,IEF,PCY,BKF,IWC,WIP,VBR) DRAW SHARPE LINE AT 0 DRAW TREYNOR ON PLOT SHARPE DRAW JENSEN ON PLOT SHARPE DRAW MA(21) ADD COLUMN SHARPE {SHARPE RATIO} ADD COLUMN TREYNOR {TREYNOR RATIO} ADD COLUMN JENSEN {JENSEN'S ALPHA} ADD COLUMN BETA21 {BETA} SORT ON COLUMN 5 DESCENDING CHART-TIME IS 63 DAYS ] TRADING THE FILTER RESULTS
My current thinking is that you invest equally in each of the 10 top scoring ETFs, and hold them until they fall below 10 in the ranking. Buy whatever replaced them and hold it until it falls below 10. Wash, rinse, repeat. I have not tested this approach fully yet, but my cursory review of multiple trades using this approach are fairly compelling. If I have time over the weekend, I'll manually backtest this (you cannot use SF backtesting capabilities on this one, since it always returns all 60). If nothing else, this appraoch can be used to look at your current investments and see if any are underperforming the markets. Consider replacing them with ones that have a better risk/reward profile. Enjoy. Kevin |

tomm1111 197 posts msg #91307 - Ignore tomm1111 |
4/16/2010 8:01:20 PM Kevin, Nice work and good explaination of the ratios. |

Kevin_in_GA 3,964 posts msg #91308 - Ignore Kevin_in_GA |
4/16/2010 8:13:15 PM Well, this was designed to be part tutorial on the ratios, part tutorial on how to code things like this in SF, and a big part on how to develop risk/reward metrics to select stocks that should deliver profit at lower risk (something usually ignored in technical analysis). My intention is to backtest this for about 100 trades over this weekend. I'll post the results (including the individual trades, resulting profit, and W/L ratios). Results will speak for themselves. |

sbuck143 88 posts msg #91435 - Ignore sbuck143 |
4/20/2010 1:24:10 PM Did you get a chance to do this Kev? |

Kevin_in_GA 3,964 posts msg #91438 - Ignore Kevin_in_GA |
4/20/2010 2:49:45 PM I am in progress doing it right now. Because you are constantly rotating out the top stocks, this has to be done manually and is suprisingly time-consuming. I have run this back six months against a slightly modified ETF list (I eliminated a few like IVV and RSP that are 100% correlated with SPY, and added in some bond ETFs and three inverse ETFs (SH,DOG,PSQ) to provide for a more diversified pool of candidates). From 10/15/09 through 1/15/10 this approach is up 4.5% versus 3.5% for the SPY, even after trading commissions are included at $20 per trade. I still need to factor in the January correction and subsequent run up, so the test is not ready to post just yet. I have assumed a starting portfolio of $100,000 and no compounding of profits into the next trade. Like any strategy, not all of the selected ETFs will trade well using this approach - I will most likely further pare down the list once the backtest is complete by eliminating ones that never traded at a profit or only had a single trade over the last six months. I will not redo the optimization just to get a higher result, but rather I'll do this to get a better pool of candidates moving forward. Thanks also for the interest in this - I was starting to wonder if I was the only one interested in this type of portfolio management. |

hmsb4494 62 posts msg #91876 - Ignore hmsb4494 |
4/30/2010 10:33:50 PM Kevin_in_GA - Ignore Kevin_in_GA 4/20/2010 2:49:45 PM I am in progress doing it right now. Because you are constantly rotating out the top stocks, this has to be done manually and is suprisingly time-consuming. I have run this back six months against a slightly modified ETF list (I eliminated a few like IVV and RSP that are 100% correlated with SPY, and added in some bond ETFs and three inverse ETFs (SH,DOG,PSQ) to provide for a more diversified pool of candidates). From 10/15/09 through 1/15/10 this approach is up 4.5% versus 3.5% for the SPY, even after trading commissions are included at $20 per trade. I still need to factor in the January correction and subsequent run up, so the test is not ready to post just yet. I have assumed a starting portfolio of $100,000 and no compounding of profits into the next trade. Like any strategy, not all of the selected ETFs will trade well using this approach - I will most likely further pare down the list once the backtest is complete by eliminating ones that never traded at a profit or only had a single trade over the last six months. I will not redo the optimization just to get a higher result, but rather I'll do this to get a better pool of candidates moving forward. Thanks also for the interest in this - I was starting to wonder if I was the only one interested in this type of portfolio management. hey Kevin---how did this come out??? |

Kevin_in_GA 3,964 posts msg #91900 - Ignore Kevin_in_GA |
5/1/2010 12:46:34 PM I had put this aside to refine the filter, and in discussions with the guys over at etfreplay.com on this idea, learned that they were developing the same tool. Their approach is a variation on what I have posted here - they rank each ETF based on their relative strength over two different time periods (usually 20 days and 3 months), then weight the results to generate a performance metric. They also rank against volatility and add this in (the lower the volatiliy for the same return, the higher that ETF will be ranked). You can set the timeframes and relative weights for each of these three inputs, and backtest a limited set of ETFs from 2003 (or their creation date) through to today. Their strategy is also simpler - only keep the top-ranked ETF, and hold it for either a week, month or full quarter (not the daily rebalancing of 5-10 ETFs I was looking at). What I like here is that they have done what I was trying to do, but made it simpler, faster, capable of longer backtesting, and gives you an equity curve to evaluate performance rather than just a % profitable result. They only look at three ETFs, and rebalance monthly. One is always set to cash (SHY as the proxy). You can set the others, as well as the relative weighting of time periods and volatility. Remember - this is one trade per MONTH. Their default settings since 2003 generate the following results: Total Trades: 43
Total Days: 1849 ETFs Used: EEM (in 36.5% of the time) , SPY (in22.3% of the time), SHY (in 41.2% of the time) Return since 2003: 252.6% Average Volatility: 17.3% SPY return since 2003: 54.9% SPY Average Volatility: 21.4% Almost 5 times the return of buy and hold, at a lower average volatilty! I ran several variations using IWM instead of SPY (since smallcaps typically outperform the overall market). Using a 50%/30%/20% weighting, which more heavily emphasizes performance over volatility, the following results were obtained: Total Trades: 34
Total Days: 1849 ETFs Used: EEM (in 40.8% of the time) , SPY (in 22.7% of the time), SHY (in 36.4% of the time) Return since 2003: 416.5% Average Volatility: 18.9% SPY return since 2003: 54.9% SPY Average Volatility: 21.4% This combo outperfomed the SPY by 7.6x at a lower overall volatility since 2003. Now, if you ignore the volatility input completely, and just use a 50/50 weighting on relative strength, you get the following results: Total Trades: 35
Total Days1849 ETFs Used: EEM (in 46.5% of the time) , SPY (in 23.9% of the time), SHY (in 29.6% of the time) Return since 2003: 491.3% Average Volatility: 20.5% SPY return since 2003: 54.9% SPY Average Volatility: 21.4% In other words, making 1 trade every other month on average, this approach outperformed the SPY by 8.95x at a lower volatility (although not that much lower). Now I think you can see why relative strength is such a useful metric - in fact writing a filter for this is trivial: Just buy whatever ETF is at the top of the list at the end of each month, and hold it until the end of the next month. If it is still at the top, do nothing. If it is not the top pick, sell it and buy the new top pick. Wash, rinse, repeat. ONE TRADE A MONTH. This is perfect for those managing a 401K, as these ETFs are typically represented as bond or stable income funds, international/emerging market funds, and smallcap funds. If you want to add in other classes, just expand the etf list to include them. |

jnafach 74 posts msg #91928 - Ignore jnafach |
5/2/2010 9:25:01 AM Hey kevin, I am not sure hoe you get them I did run on same sit and got differnt return on putting 50% on 20 days and 50% on 3mo, also the filter you put how did you set it is it same as 50/50 |

jnafach 74 posts msg #91929 - Ignore jnafach |
5/2/2010 9:43:05 AM ALSO ON FILTER YOU WROTE THE RESULTS ON END OF MONTH DO NOT MATCH LIKE IN END OF DEC AND END OF OCT 2009 |

Kevin_in_GA 3,964 posts msg #91933 - Ignore Kevin_in_GA modified |
5/2/2010 11:44:17 AM Hey kevin, I am not sure hoe you get them I did run on same sit and got differnt return on putting 50% on 20 days and 50% on 3mo, also the filter you put how did you set it is it same as 50/50 ++++++++++++ I just re-ran it with IWM, EEM, and SHY at 50% 3 month, 50% 20 day settings. Still get 491.3% return since 2003. Did you set the rebalance for "monthly" versus weekly or quarterly? That makes a big difference. As for how I set my filter to 50/50, all that means is that the two time frames are equally weighted. Therefore the simple addition of the two is the same as a 50/50 weighting when you are ranking one ETF against another. |

StockFetcher Forums · Filter Exchange · PORTFOLIO SELECTION AND MANAGEMENT USING RISK/REWARD RATIOS | << 1 2 3 4 5 ... 65 >>Post Follow-up |

Copyright 2016 - Vestyl Software L.L.C.•Terms of Service | License | Questions or comments? Contact Us

EOD Data sources: DDFPlus & CSI Data
**Quotes delayed** during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus