The ideal CMA would be three of the same houses with all the same attributes in the same area. However, we do not live in an ideal world. When I complete a CMA for a client, I include active listings, pending sales, and sold properties in the last three to six months. The actives are your competition and should be considered in pricing.
A CMA actually helps you choose the right price range. To do that you have to look at:
Similarly styled homes
Similarly sized homes
Homes within a 1 - 3 mile radius (the closer the better)
Homes sold within 3 - 6 months (with the newer sales holding the most weight)
A CMA should also include basic adjustments for things like s.f., interior upgrades, exterior uprades, etc. to do an apples to apples comparison.
Feel free to contact me directly, if you'd like me to give you a detailed breakdown or to do a CMA for a specific property.
There's a few factors. Ideally, you'll be able to find recent sales with homes: in the same area (in the same neighborhood is best), similar style, built about the same time, and size of floorplan. Once you have similar homes with this criteria, you can then adjust a subject's property up or down depending on the home's condition, features and lot location.
Hope that helps. Knowing the neighborhood can really help come up with a better CMA.