Determining risk relative to expected returns

A useful analysis is to relate the volatility of a stock's daily percentage change to its expected return. This gives a feel for the risk/return ratio of the investment. This can be performed by mapping the mean of the daily percentage change relative to the standard deviation of the same values.

To demonstrate, the following code will create a scatter plot that relates the risk and return of our sample set of stocks:

In [34]:
   # generate a scatter of the mean versus std of daily % change
   plt.scatter(daily_pc.mean(), daily_pc.std())
   plt.xlabel('Expected returns')
   plt.ylabel('Risk')

   # this adds fancy labels to each dot, with an arrow too
   for label, x, y in zip(daily_pc.columns, 
                          daily_pc.mean(), 
                          daily_pc.std()):
       plt.annotate(
           label, 
           xy = (x, y), xytext = (30, -30),
           textcoords = 'offset points', ha = 'right', va = 'bottom',
           bbox = dict(boxstyle = 'round,pad=0.5', 
                       fc = 'yellow', 
                       alpha = 0.5),
           arrowprops = dict(arrowstyle = '->', 
                             connectionstyle = 'arc3,rad=0'))

   # set ranges and scales for good presentation
   plt.xlim(-0.001, 0.003)
   plt.ylim(0.005, 0.0275)

   # set size
   plt.gcf().set_size_inches(8,8)

The output is seen in the following screenshot:

Determining risk relative to expected returns

The results of this immediately jump out from the visualization and may have been more difficult to see by just looking at tables of numbers:

  • Airline stocks (AA, DAL, and UAL) have the highest risk but also have the highest returns (Isn't that the general rule of investing?)
  • Our tech stocks are of medium risk but also have medium return.
  • Among the tech stocks, IBM and GE are the most conservative of the four.
  • The cola stocks have the lowest risk but are also among the lowest returns as a group. This makes sense for a high-volume commodity.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.57.126