Commission calculated as a fixed percent of traded value. Suitable for many crypto exchanges.

fixed_percent(trades, trade_value, commission_pct = 0)

Arguments

trade_value

vector of traded value for each asset

commission_pct

percentage of traded value to be paid as commission (scalar or vector of same length as trade_value)

Value

vector of commissions

Examples

fixed_percent(c(150, 75, -220), 0.01)
#> [1] 0