"""Round risk-limited units down to lots.

This is planned stop risk. Gaps, liquidity, exposure caps and margin can require a smaller position.
All inputs are synthetic teaching examples. Run: python 13_lot-rounded-sizing.py
"""
from tv_math import *

q=risk_units(100000,.01,6,1,25)
assert q==125
print(q)
