"""Compare gross winning and losing P&L.

Profit factor is not a return percentage. With no losing trade the estimate is undefined, not proof of safety.
All inputs are synthetic teaching examples. Run: python 11_profit-factor.py
"""
from tv_math import *

s=trade_summary([200,-100,100,-50])
assert s['profit_factor']==2
print(s)
