def analyze(context=None, results=None):
import matplotlib.pyplot as plt
import logbook
logbook.StderrHandler().push_application()
log = logbook.Logger('Algorithm')
fig = plt.figure()
ax1 = fig.add_subplot(211)
results.algorithm_period_return.plot(ax=ax1,color='blue',legend=u'????')
ax1.set_ylabel(u'??')
results.benchmark_period_return.plot(ax=ax1,color='red',legend=u'????')
plt.show()
# capital_base is the base value of capital
#
评论列表
文章目录