Books reference for econometrics for PhD that focus on the programming aspect I'd like to know which book you would recommend for studying econometrics in a rigorous way at a PhD level.
I'm aware that this question has already been asked, but what I want to question is slightly different. I found the Hamilton book for time series the best one by far. The problem I have with this book is that it lacks in providing examples about coding, maybe because is quite old. Is there any book on the market that is rigorous as the Hamilton and provides coding examples? There is something out there but is more about a statistical approach.
About cross-section analysis, in my opinion, the Wooldridge (advanced version) is the real Bible. Is there, something, also for this research field, that is more about coding and still rigorous as the Wooldridge?

A very popular Econometrics textbook is Econometric Analysis by W. Greene, now in its 8th edition, ISBN-13: 9781292231150. It is written in a crystal clear style and is essentially complete in terms of topics coverage. For the computations, Greene seems reluctant to stick to a particular software. Using his words (pag. 39):

A more extensive list of computer software used for econometric
analysis can be found at the resource Web site,
http://www.oswego.edu/~economic/econsoftware.htm. With only a few
exceptions, the computations described in this book can be carried out
with any of the packages listed. NLOGIT was used for the computations
in most of the applications. This text contains no instruction on
using any particular program or language. Many authors have produced
RATS, LIMDEP/NLOGIT, EViews, SAS, or Stata code for some of the
applications, including, in a few cases, in the documentation for
their computer programs. There are also quite a few volumes now
specifically devoted to econometrics associated with particular
packages, such as Cameron and Trivedi’s (2009) companion to their
treatise on microeconometrics

