"""Build a compounded wealth path.

A gain followed by the equal percentage loss leaves wealth below its start.
All inputs are synthetic teaching examples. Run: python 03_wealth-compounding.py
"""
from tv_math import *

curve=wealth([.1,-.1])
assert abs(curve[-1]-99)<1e-12
print(curve)
