While being a resident of Spain, do you have to declare the stocks you own if you basically never sell? Let's say you have a 10 year investing strategy where you sell after 10 years, and you become a Spanish resident after 5 years. When you sell on year 10, will they say "hey you didn't declare anything before" (obviously after declaring your profit from selling)?