'When the simulation is complete, run the full period risk report
and send it out on the results socket.'

def handle_simulation_end(self):

    log_msg = 'Simulated    {n}    trading    days    out    of    {m}.'
    log.info(log_msg.format(n=int(self.session_count), m=self.total_session_count))
    log.info('first    open:    {d}'.format(d=self.sim_params.first_open))
    log.info('last    close:    {d}'.format(d=self.sim_params.last_close))
    bms = pd.Series(index=self.cumulative_risk_metrics.cont_index, data=self.cumulative_risk_metrics.benchmark_returns_cont)
    ars = pd.Series(index=self.cumulative_risk_metrics.cont_index, data=self.cumulative_risk_metrics.algorithm_returns_cont)
    acl = self.cumulative_risk_metrics.algorithm_cumulative_leverages
    risk_report = risk.RiskReport(ars, self.sim_params, benchmark_returns=bms, algorithm_leverages=acl, trading_calendar=self.trading_calendar, treasury_curves=self.treasury_curves)
    return risk_report.to_dict()
