Session Ready
Exercise

Determining periodicity

The idea of periodicity is pretty simple: With what regularity does your data repeat? For stock market data, you might have hourly prices or maybe daily open-high-low-close bars. For macroeconomic series, it might be monthly or weekly survey numbers.

xts provides a handy tool to discover this regularity in your data by estimating the frequency of the observations - what we are referring to as periodicity - using the [periodicity()](https://www.rdocumentation.org/packages/xts/topics periodicity) command

In this exercise, you'll try this out on a few sample data sets. In real life you might find yourself doing this as a first step to understanding your data before diving in for further analysis.

Instructions
100 XP
  • Calculate the periodicity of the temps data set.
  • Calculate the periodicity of the edhec data set.
  • Convert the edhec data to yearly periodicity using to.yearly(). Call this edhec_yearly.
  • Calculate the periodicity of edhec_yearly.