Add option to set period of historical data

Add a new option for historical data, `period`, that can be set to `'d'`, `'w'`, or `'m'`. Defaults to `'d'`.