Be very careful about use of Interest Expense. Companies can be very inconsistent in the way they report/bury it, to the point where you may often see companies with Interest Exp that seems very high relative to the debt they report or very low (or even zero for companies with debt). Consider using Eval statements to substitute a heuristic cost of debt when the computed one is out of whack. There may also be oddities caused by the fact that Interest Exp is a running 265 day total while the debt item is based on just a few daily snapshots.
Similar issues may impact preferred.
With setvar, we have more flexibility now. For example we can easily start with the 10year treasury and establish spreads for each capital item.
Example:
SetVar(@DbtCost,(close(0,#tnx))*2/10)
SetVar(@PfdCost,@DbtCost+1)
setvar(@CostEq,@DbtCost+3)
then, you can have @WACC equal to weight of debt time @Dbtcost + … etc.
What’s interesting though is that it’s not clear how sensitive stock prices are to getting the best possible WACCs. For another project, I did a lot more work with WACC including having built a p123 algorithm based on an academic factor model. The latter is super when viewed on an individual company basis; answers reasonably consistent with common sense. Oddly, though, when I plugged WACC into other factors that use it, such as EVA or FGV, I found better performance with less sophisticated approaches to WACC. Perhaps the market has given up the ghost on cost of equity which, no matter how one slices it, is necessarily going to be a fairly artificial assumption.