The immediate precursor in the formation of acetoacetate from acetyl CoA in the liver is
HMG CoA 


Acetoacetyl-CoA is the starting material for ketogenesis.



However, it is HMG-CoA from which acetoacetate arises.
Mevalonate
HMG CoA
Acetoacetyl CoA
3-Hydroxybutyryl