Does order(c.security, -c.order_size) account for transaction costs, borrowing costs and vwapping using a symbol specific profile based on volume and volatility? Probably not a big deal for SPY, but would make more of a difference for a larger portfolio.