Anti-deuterons are a possible candidate for indirect detection of dark matter. In this thesis formation models of anti-deuterons are studied. The standard coalescence model and an empirically based cross-section model both can not well describe the anti-deuteron measurements from the LHC. We re-weight the nucleon input spectra based on experimental results from the LHC, and show that the compatibility improves drastically. Also a new space-time model, based on the distance of closest approach of the proton--neutron pairs is studied and gives good fits to the measurements. Finally, we investigate for the first time formation models in terms of measurements differential in multiplicity classes in order to search for signs of (anti)deuteron production directly from (anti)quark coalescence in high-multiplicity events. Also anti-deuteron production at 13 TeV is studied the first time.