Comparing assets

Let's use the AssetGroupAnalyzer to compare all the assets we have collected data for. As with prior sections, we won't use all the methods in the StockAnalyzer class here, so be sure to try them out on your own:

>>> all_assets_analyzer = stock_analysis.AssetGroupAnalyzer(...     all_assets... )

Remember from Chapter 1, Introduction to Data Analysis, that the coefficient of variation (CV) is the ratio of the standard deviation to the mean; this helps us compare the variation of asset closing prices, even though their means are of different magnitudes (like Amazon and Apple). CV can also be used to compare the volatility to the expected return of an investment and quantify the risk-return trade-off. Let's use the CV to see which ...

Get Hands-On Data Analysis with Pandas now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.