Yes, being on this visa does not stop you from making any type of investments; what you cannot do in any case is work for any Spanish company with this type of visa. Nevertheless, this visa allows you to obtain income from investments but not income from work in Spain.