Most tests of preferred habitat theory are indirect; they infer the existence of preferred habitat behaviour in financial markets by examining the behaviour of asset prices. We instead identify preferred habitat behaviour directly from whether investors show a preference towards a particular duration habitat. We do so by making use of a newly available and highly granular data set on the UK government bond (gilt) market, which allows us to examine investors’ gilt transactions and their daily stock of gilt holdings during 2016 and 2017. Using cluster analysis, we find that investors can be classified into distinct groups, some of which more closely display the behavioural properties that theory associates with preferred habitat investors. We find that these groups of investors are less sensitive to price movements than other investor groups and include institutional investors, like life insurers and pension funds, which are typically associated with preferred habitat behaviour. Evidence from the Bank of England’s QE4 purchase programme during August 2016 to March 2017 suggests that these investor groups sold relatively more of their gilt holdings to the Bank than other groups of investors.