Wa `alaykum as-Salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Thank you for your good question.
As for buying or selling mutual funds, it is allowed on some conditions.
Giving a detailed reply to your question, Prof. Dr. Monzer Kahf, Professor of Islamic Finance and Economics at Qatar Faculty of Islamic Studies, states:
It is allowed with two sets of conditions:
1) Shares should be of companies whose main line of business is permissible and they do not indulge much in haram activities or transactions. For this reason, some scholars suggest criteria such as the revenue from haram activities (like selling alcohol on airlines) should not exceed 5% of total revenue, must not be highly leveraged by interest-based loans and must not have much of their assets used in non-permissible usages. On the basis of these and like criteria the Dow Jones company issued its Islamic DJ index in 1999.
2) The second condition relates to speculation which should be avoided as much as possible. Some contracts and some behaviors are obviously speculative; they are not permissible, such as short sale of share, day trading, CFD and the like. The same rules apply to mutual funds units.
Allah Almighty knows best.