is_relative_mismatch#

API documentation for tradeexecutor.strategy.account_correction.is_relative_mismatch Python function.

is_relative_mismatch(actual_amount, expected_amount, relative_epsilon, dust_epsilon)[source]#

Calculate if we are within the relative tolerance.

Mismatch has two methods of ronding

  • Close to zero as absolute units (dust)

  • Relative % of the position size

Parameters:
Return type:

bool