Can someone explain to me why the delta-hedging of ATM options near expiry is difficult?
Questions on Quantitative Finance Stack Exchange are expected to relate to quantitative finance within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
This is usually called Pin Risk. It's difficult because there is a high degree of uncertainty regarding the whether the options you sold are exercised or not. If you don't hedge, your short options could be exercised and you are left with risky net short position in the underlying. If you hedge and your short options are not exercised, then you have a long position in underlying after expiry. Alternatively, you can partially hedge. However, in any case, you are potentially exposed to risk of adverse underlying movement.