Is it ethical to develop software for financial company? I'm wondering whether it is ethical to work as software engineer for financial company that develops software for exchanges and banks. When we consider exchange, different things are traded there, i.e. commodities, currency, money and equities. Unfortunately some of commodities are pork bellies (dead hogs), however there are hundreads other goods which are not meat.

Moreover, markets are not only for speculators (who risk their money by "gambling") but also hedgers (who want to manage their risk by using financial market, so it's good reason). Also, exchanges make it possible for companies to acquire money for further investments. Furthermore, implementing new legislations makes markets more secure against financial crises, e.g. MIFID II.
I assume you're looking for an answer based on this definition:


  A lay follower should not engage in five types of business. Which five? Business in weapons, business in human beings, business in meat, business in intoxicants, and business in poison.


I'd guess so (that it is ethical or not inethical to develop software for a financial company).

Consider telecommunications or telephony software, for example: theoretically the internet and telephone system is also used for trading meat, but, that's not exactly your responsibility: the same is true for anything -- making cars, for example: a few cars, too, are used in the trade of meat.

I think I mostly just avoided employment with aerospace (i.e. defence, weapons) manufacturers.