Seven years ago, I developed a little analytic app in R on my notebook to monitor the performance of the stock market. The program reads/downloads performance data refreshed daily from about 25 different stock index portfolios starting in 1995. From the index-level data, I calculate daily percent changes that lead to growth of $1 calculations for each portfolio over any time period. The app then produces charts in R comparing side-by-side performance of indexes for selected time frames – e.g. 2015 year to date, from the end of the recession to the present,  the 20 years starting in July 1995, etc.  All index and daily percent change calculations are ultimately written to CSV files and Tableau workbooks for additional processing.

Once a year I revisit the code and without fail make changes/enhancements. At times, especially early on, the updates were to streamline clunky code, at other times to add new capabilities, and  finally to redo sections with the latest R features. An example of the former is development of more efficient and readable R data download; examples of the later include migrating the source code to RMarkdown and introducing data.table as the driving R data structure.

Register or login for access to this item and much more

All Information Management content is archived after seven days.

Community members receive:
  • All recent and archived articles
  • Conference offers and updates
  • A full menu of enewsletter options
  • Web seminars, white papers, ebooks

Don't have an account? Register for Free Unlimited Access