用于计算最大回撤及恢复所需收益的数学公式。
账户峰值:$10,000,谷值:$7,000 回撤 = ($10,000 - $7,000) / $10,000 x 100% = 30% 恢复所需收益 = 100 / (100 - 30) x 100% - 100% = 42.86% 你需要获得42.86%的收益才能从30%的回撤中恢复
from dapex_calculators.position_size import calculate_recovery_needed
result = calculate_recovery_needed(30)
print(f"恢复所需收益: {{result['gain_percent']}}%")
发表评论