Calculates commission on number of contracts traded given a per- contract commission structure.

futs_per_contract_commission(contracts_traded, per_contract_commission)

Arguments

contracts_traded

vector of number of contracts traded per symbol

per_contract_commission

vector of per-contract commission per symbol

Value

vector of commissions paid per symbol

Examples

contracts_traded <- c("ES" = 5, "GC" = -2)
per_contract_commission <- c("ES" = 0.85, "GC" = 0.5)
futs_per_contract_commission(contracts_traded, per_contract_commission)
#>   ES   GC 
#> 4.25 1.00