Dynamic Risk Management: Investment, Capital Structure, And Hedging In The Presence Of Financial Frictions