© Chris Conlan 2016

Chris Conlan, Automated Trading with R, 10.1007/978-1-4842-2178-5_3

3. Data Preparation

Chris Conlan

(1)Bethesda, Maryland, USA

In this chapter, we will discuss ways of cleaning data to make analysis faster and more effective. Additionally, we will compute some new data sets we will need in our analysis. For this chapter, you should have the final results of the list DATA and the three directory variables from the previous chapter in your R environment. This list DATA contains 6 zoo objects rather than 500+ stock symbols.

Handling NA Values

There are a handful of specific reasons why a certain stock may have NA values on any given day. We want to diagnose and treat these reasons appropriately to ensure the validity of our simulation ...

Get Automated Trading with R: Quantitative Research and Platform Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.