plot_contribution

Defined in fynance.plot

plot_contribution(asset_returns, index=None, ax=None)[source]

Plot the cumulative per-asset gross contribution of a book.

asset_returns is the per-asset gross return book (T, N) (each column is one asset’s contribution; together they sum to the book gross return). The cumulative sum per asset shows how much each asset added to the book over time. Returns the matplotlib Axes.