Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-dfsvx Total loading time: 0 Render date: 2024-04-28T15:18:32.713Z Has data issue: false hasContentIssue false

12 - Data Exploration Using Fundamentals

Published online by Cambridge University Press:  20 October 2016

Mark J. Bennett
Affiliation:
University of Chicago
Dirk L. Hugen
Affiliation:
University of Iowa
Get access

Summary

As investigated in Chapter 7, income statements and balance sheets provide the investor with a view inside the company. As investors, we would like to know if gross revenue is growing year to year. We may also like to know the market value to book value ratio for a stock we own and compare it to the larger market. Knowing it will help us determine if the company could be overvalued in the stock market.

While “NoSQL,” key–value, and graph databases are all the range of late, SQL databases still offer rapid querying and schemas that support years and decades of historical data. As we will see in this chapter, querying investment fundamentals can be accomplished in the R environment using the RSQLite package. The investor and data scientist can perform the required data mining with very little code, yielding beneficial results. We first begin with some definitions and formulas for investment fundamentals.

Since Chapter 7, and especially in Chapter 10, we focused on the price movement as the primary driver of our investment strategies. In Chapter 7, we had introduced four key income statement metrics and measured their Sharpe Ratio. In this chapter, like Chapter 7, the primary focus will be fundamental metrics of the company's balance sheet rather than price movements and their statistics. We are guided by our intuition and investment principles from classic industry references (Bodie, Kane, and Marcus, 2013; Greenblatt, 2006). In order to set the context regarding fundamentals, we define some basic investment terms and examples and then introduce our data mining package before examining our dataset.

The RSQLite Package

In order to apply some of these fundamental investment principles in a data mining setting, we need a package to perform the computations. SQL is a specialized language for declarative queries against relational databases (Chamberlin and Boyce, 1974). Query results are specified by the main query mechanism, the SELECT statement. SQLite is a widely deployed database engine which uses the SQL language. The source code for SQLite is in the public domain, accessible via http://www.sqlite.org/.

RSQLite is an R package to interface with the SQLite database engine, enabling R to work well with the large datasets we encounter in finance.

Type
Chapter
Information
Financial Analytics with R
Building a Laptop Laboratory for Data Science
, pp. 281 - 296
Publisher: Cambridge University Press
Print publication year: 2016

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×