Can you make a sword out of obsidian?

Short answer: yes, but not a very good one.

Obsidian is very similar to common glass. This means that it has very high compressive values with very low tensal values. Hitting a “sword” against another object puts it in a state of bending (compressive and tensal forces at the same time) which means it will break with relatively little force. Hit it hard it is likely to fracture explosively (relatively speaking).

It would be heavy and difficult to construct.

Generally, I would recommend against it.