If the transactions carried are intra day trasactions then it will be speculative business for all purposes.
If the shares are held in stock in trade then all delivery transactions will be considered as non speculative business in case of assessees other than companies.
If the shares are held in stock in trade then all delivery transactions will be considered as speculative business in case of assessees are companies as per explanation to Section 73. If it falls under the exception to the explanation then non speculative business.
If shares are held as investment then profit / loss on sale of shares will be taken as income from capital gains.