kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.38k stars 1.05k forks source link

Expectancy calculation #1108

Open Redeemer98 opened 8 months ago

Redeemer98 commented 8 months ago

Expected Behavior

Thank you for the library.

How is expectancy calculated?

The formula is this but manual calculations through this formula does not match the results. (Reward-to-Risk Ratio X Win Ratio) - (Loss Ratio)