© 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 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.