okama.Portfolio.annual_return_ts

property Portfolio.annual_return_ts

Calculate annual rate of return time series for portfolio.

Rate of return is calculated for each calendar year.

Returns:
DataFrame

Calendar annual rate of return time series.

Examples

>>> import matplotlib.pyplot as plt
>>> pf = ok.Portfolio(['VOO.US', 'AGG.US'], weights=[0.4, 0.6])
>>> pf.annual_return_ts.plot(kind='bar')
>>> plt.show()
../_images/okama-Portfolio-annual_return_ts-1_00_00.png

Plot annual returns for portfolio with EUR as the base currency.

>>> pf = ok.Portfolio(['VOO.US', 'AGG.US'], weights=[0.4, 0.6], ccy='EUR')
>>> pf.annual_return_ts.plot(kind='bar')
>>> plt.show()
../_images/okama-Portfolio-annual_return_ts-1_01_00.png