"""Aggregate logarithmic returns.

Log returns add over time; their exponential minus one is the compounded simple return.
All inputs are synthetic teaching examples. Run: python 02_log-returns.py
"""
from tv_math import *

r=returns([100,110,99],True)
assert abs(math.expm1(sum(r))+.01)<1e-12
print(r)
