Python code to get Accrued interest
You can make it pretty short in Python 3 if you use functools.reduce():

from functools import reduce

interest_list = [0.5, 0.4, 0.3, 0.5, 0.7, 0.4, -0.2, -0.5, 0.3, 0.7, 0.9, 1.0]

l = [1 + n / 100 for n in interest_list]

accrued = (reduce(lambda x, y: x * y, l) - 1) * 100


In Python 2.7 no imports are needed.