if you have been resident in germany and have owned shares for six months or more , and you are assessed by their finzamt ( tax department ) when you sell those shares , there is no liability for capital gain on the transaction .