© Chris Conlan 2016

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

10. Organizing and Automating Scripts

Chris Conlan

(1)Bethesda, Maryland, USA

This chapter will cover CRON jobs for UNIX machines and task scheduling for Windows machines to automate routine execution of trading scripts. We will discuss which jobs should be run when, frequently referencing Appendix A for production-ready code examples.

Organizing Scripts into Jobs

There are four possible jobs we may want to automate on a schedule. We will call these jobs UPDATE, PLAN, TRADE, and MODEL.

The UPDATE job will need to be run once per day after Yahoo! Finance has updated trade data. This can be around 5 to 6 p.m. EST. This script will update the data in our stock data ...

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.