ENH: Add print of monthly Sharpe to DMA example.

This commit is contained in:
Thomas Wiecki
2013-08-01 16:09:38 -04:00
parent 37bab9bb72
commit 1635a54fb8
+3
View File
@@ -87,4 +87,7 @@ if __name__ == '__main__':
ax2.plot(results.ix[results.sell].index, results.short_mavg[results.sell],
'v', markersize=10, color='k')
plt.legend(loc=0)
sharpe = [risk['sharpe'] for risk in dma.risk_report['one_month']]
print "Monthly Sharpe ratios:", sharpe
plt.gcf().set_size_inches(18, 8)