In how many is it not? Not sarcasm at all, I haven't studied law much outside of the US and I'm genuinely curious where you have in mind that you or I could look at our investment portfolio and go "I think re-weighting to have some more minority managed companies would yield improved gains" and that would be illegal. I doubt it'd actually be a good investment strategy sure, but a crime?
Public accommodations law and protections for employment and so on are all quite common, but in what western democracies are you required by law to donate or invest money with the same restrictions government would face? Not saying they aren't out there or that I can't imagine some reasoning that would lead to such laws, just wondering where and how that's worked out.
In Sweden for example, as far as I know, the only degree of discrimination that is allowed is to prefer one biological/ethnic etc category over another when the candidates are equally good in all other respects.