Parameters

Equity as percentage of TA: 45

Debt as percentage of TA: 55


First set up the functions, ignoring Benninga and Sarig

def wacc(ke, kd, tc, E, D):
    V = E + D
    k = kd*(1-tc)*D/V + ke*E/V
    return k

def coc(rf, b, rp):
    return rf + b * rp

Benninga and Sarig

def coc_bs(rf, tc, b, rm):
    return rf*(1-tc) + b*(rm-rf*(1-tc))

def cod_bs(rf, tc, b, rm):
    return rf        + b*(rm-rf*(1-tc))

Main parameters

rf = 6.0
rm = 12.0
rp = rm-rf
b_e = 1.6
b_d = 0.45
tc = 0.28
E = 0.45
D = 1-E

Cost of Equity:

ke = coc(rf, b_e, rp)
print(f"Cost of Equity: {ke:.3f}")
## Cost of Equity: 15.600
ke_bs = coc_bs(rf, tc, b_e, rm)
print(f"Cost of Equity with tax: {ke_bs:.3f}")
## Cost of Equity with tax: 16.608

Cost of Debt:

kd = coc(rf, b_d, rp)
print(f"Cost of Debt: {kd:.3f}")
## Cost of Debt: 8.700
kd_bs = cod_bs(rf, tc, b_d, rm)
print(f"Cost of Debt with tax: {kd_bs:.3f}")
## Cost of Debt with tax: 9.456

WACC

Traditional WACC

k =  wacc(ke, kd, tc, E, D)
print(f"WACC: {k:.3f}")
## WACC: 10.465

Benninga and Sarig

k_bs =  wacc(ke_bs, kd_bs, tc, E, D)
print(f"WACC: {k_bs:.3f}")
## WACC: 11.218