okama.AssetList.tracking_difference_annual

property AssetList.tracking_difference_annual

Calculate tracking difference for each calendar year.

Tracking difference is calculated by measuring the accumulated difference between the returns of a benchmark and ETFs replicating it (could be mutual funds, or other types of assets). Tracking difference is measured in percents.

Benchmark should be in the first position of the symbols list in AssetList parameters.

Returns:
DataFrame

Time series with tracking difference for each calendar year period.

Examples

>>> import matplotlib.pyplot as plt
>>> al = ok.AssetList(['SP500TR.INDX', 'VOO.US', 'SPXS.LSE'], inflation=False)
>>> al.tracking_difference_annual.plot(kind='bar')
../_images/okama-AssetList-tracking_difference_annual-1.png