You can pull historical stats, however you can only get them from vCenter, and as the data ages it gets rolled up into longer and longer sample periods.
So for example if you use "-intervalsecs" switch and try and get 30 second samples from a time period more than 1 hour ago from the current time, I have found the results unreliable. The commandlet is supposed to use the next nearest rollup period, but I have found this to be unreliable at times. (Using vSphere 7u3)
In the past hour, you can get stats with a period of 20 seconds [Performance Intervals]
After 1 hour, these 20 second samples get rolled up into 5 minute samples.
5 min sample are kept for one day, and then then those older than one day get rolled into 30 minute samples.
After a month they are rolled up into 30 minute samples, which means that if you want to get data covering the last year, you will need to keep in mind how coarse the samples are.
For summation stats (e.g. CPU Readiness Summation) this can make long term statistically view look bad, when in reality it isn't.
When I wanted to do some analysis of stats a few months ago, I had a script that would fetch the "-realtime" stats and append the data to a file, so that I had access to the 20 second samples for periods longer than the past hour. There isn't anything that can do this for you that I am aware of, unless you make use of something like vROPS, or other analysis tools like Splunk. We did not have these options so created a script.
It simply gathered the realtime data (20 second period) and save it every hour.