If you have sold a property and made a profit out of it, you have to declare capital gains on the said property and pay a tax accordingly. Similarly, if you have bought and sold shares, it's mandatory to declare capital gains or losses on the same.
In fact, if you have losses, you can set off the losses against the profits that may arise in the subsequent years with regards to shares.
What is a capital gain?
Let's say you bought a house for Rs 5 lakhs in 2012 and sold the same for Rs 10 lakhs in 2014. You are liable to pay a tax on the Rs 5 lakhs, which is the profit you made. Such a tax on the gain is called a capital gains tax.
Now, the rate of taxes differs depending on the type of investment. In the case of shares, there is no capital gains tax to be paid if the shares is sold after one year of purchase. On the other hand, if you have bought and sold the shares for a profit in less than a year, capital gains tax will apply. In the case of property, there is no escape. You would have to pay capital gains after taking indexation into consideration. Read how to calculate capital gains with indexation here.
Also remember that if you have made losses you can set aside the losses to be carried forward against the profits in regards to shares in the subsequent years.
Remember, please declare losses and profits under all circumstances, including other asset classes like gold, or if you have traded in commodities as well.