Test getSharesByPeriod