Chapter 7. Selecting Stocks with Financial Data Analysis

In this chapter, we will cover the following recipes:

  • Computing simple and log returns
  • Ranking stocks with the Sharpe ratio and liquidity
  • Ranking stocks with the Calmar and Sortino ratios
  • Analyzing returns statistics
  • Correlating individual stocks with the broader market
  • Exploring risk and return
  • Examining the market with the non-parametric runs test
  • Testing for random walks
  • Determining market efficiency with autoregressive models
  • Creating tables for a stock prices database
  • Populating the stock prices database
  • Optimizing an equal weights two-asset portfolio

Introduction

Finance deals with many subjects, such as money, saving, investing, and insurance. In this chapter, we will focus on stock investing because ...

Get Python Data Analysis Cookbook 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.