code: def rollup(self, freq, **kwargs):
          
  
          return self.ret_rels().resample(freq, **kwargs).prod() - 1.0
docs: Downsample `self` through geometric linking.
  
          Parameters
          ----------
          freq : {'D', 'W', 'M', 'Q', 'A'}
              The frequency of the result.
          **kwargs
              Passed to `self.resample()`.
  
          Returns
          -------
          TSeries
  
          Example
          -------
          # Derive quarterly returns from monthly returns.
          >>> import numpy as np
          >>> from pyfinance import TSeries
          >>> np.random.seed(444)
          >>> ts = TSeries(np.random.randn(12) / 100 + 0.002,
          ...              index=pd.date_range('2016', periods=12, freq='M'))
          >>> ts.rollup('Q')
          2016-03-31    0.0274
          2016-06-30   -0.0032
          2016-09-30   -0.0028
          2016-12-31    0.0127
          Freq: Q-DEC, dtype: float64