code: def execute(self, timeSeries):
          
          # determine the number of values to forecast, if necessary
          self._calculate_values_to_forecast(timeSeries)
  
          # extract the required parameters, performance improvement
          alpha            = self._parameters["smoothingFactor"]
          valuesToForecast = self._parameters["valuesToForecast"]
  
          # initialize some variables
          resultList  = []
          estimator   = None
          lastT       = None
  
          # "It's always about performance!"
          append = resultList.append
  
          # smooth the existing TimeSeries data
          for idx in xrange(len(timeSeries)):
              # get the current to increase performance
              t = timeSeries[idx]
  
              # get the initial estimate
              if estimator is None:
                  estimator = t[1]
                  continue
  
              # add the first value to the resultList without any correction
              if 0 == len(resultList):
                  append([t[0], estimator])
                  lastT = t
                  continue
  
              # calculate the error made during the last estimation
              error = lastT[1] - estimator
  
              # calculate the new estimator, based on the last occured value, the error and the smoothingFactor
              estimator = estimator + alpha * error
  
              # save the current value for the next iteration
              lastT = t
  
              # add an entry to the result
              append([t[0], estimator])
  
          # forecast additional values if requested
          if valuesToForecast > 0:
              currentTime        = resultList[-1][0]
              normalizedTimeDiff = currentTime - resultList[-2][0]
  
              for idx in xrange(valuesToForecast):
                  currentTime += normalizedTimeDiff
  
                  # reuse everything
                  error     = lastT[1] - estimator
                  estimator = estimator + alpha * error
  
                  # add a forecasted value
                  append([currentTime, estimator])
  
                  # set variables for next iteration
                  lastT         = resultList[-1]
  
          # return a TimeSeries, containing the result
          return TimeSeries.from_twodim_list(resultList)
docs: Creates a new TimeSeries containing the smoothed and forcasted values.
  
          :return:    TimeSeries object containing the smoothed TimeSeries,
             including the forecasted values.
          :rtype:     TimeSeries
  
          :note:    The first normalized value is chosen as the starting point.