To net-off your physical settlement obligation in spread contracts, both your positions ie. Short 3800 CE and Long 4000 CE have to expire ITM (underlying should close above 4000 on expiry)

If underlying closes below 3800 on expiry then both your postions will expire worthless and you will not have any obligations.

If underlying expires between 3800 and 4000 then your Short 3800 CE will be ITM, in such case you will be obliged to deliver underlying shares.

It is bear call Spread…that is it is a net credit option strategy… So if the underlying expires below the lower strike price… Then you will be profitable…

If it expires at the higher strike price that is at the long call strike price… Then you may have to give delivery…

The underlying closing price which will also be settlement price on expiry day is based on Weighted Average Price of last 30 minutes, so getting an approximate guess will not be possible.

In case you want to know how WAP is calculated you can go through this post.

I understand this and took this position because i expected the stock will not be above the short strike price. But it kept moving upwards and I closed my positions with a loss particularly because the contracts were illiquid. By the way please let me know if the total margin for the position will increase on wednesday and thursday or there is no additional requirement? Also do you know of any method by which I can arrive at a reasonably accurate method to know the settlement price? Or will that be known only after the post market session is closed? Thanks a lot for your response and sharing knowledge.

Even if your position is hedged, margin requirements for Short position will increase on last two days of expiry.

Also, if your Long position is ITM, from expiry minus 4 days, exchange blocks Physical Delivery margin. For more information would suggest you go through this article.