'Creates a dictionary representing the state of this tracker.
Returns a dict object of the form described in header comments.'

def to_dict(self, emission_type=None):

    if (emission_type is None):
        emission_type = self.emission_rate
    _dict = {'period_start': self.period_start, 'period_end': self.period_end, 'capital_base': self.capital_base, 'cumulative_perf': self.cumulative_performance.to_dict(), 'progress': self.progress, 'cumulative_risk_metrics': self.cumulative_risk_metrics.to_dict()}
    if (emission_type == 'daily'):
        _dict['daily_perf'] = self.todays_performance.to_dict()
    elif (emission_type == 'minute'):
        _dict['minute_perf'] = self.todays_performance.to_dict(self.saved_dt)
    else:
        raise ValueError(('Invalid    emission    type:    %s' % emission_type))
    return _dict
