Recently, I read a book that describes an indicator to measure the sentiment of the market. It uses data from data that is readily available from the CFTC website (
http://www.cftc.gov).
This website provides a breakdown of each Tuesday’s open interest for markets in which 20 or more traders hold positions equal to or above the reporting levels established by CFTC.
This information is useful because market tops and bottoms occur during extreme optimism and pessimism.
This example shows futures position for Canadian Dollar traded in the CHICAGO MERCANTILE EXCHANGE.
The “COMMERCIAL” traders are those that make use of the futures contract for hedging purpose. “NON-COMMERCIAL” traders refer to speculators that operate in the futures market.
An example of a sentiment indicator is the %long indicator (based on non-commercial data) which is computed using the formula:
%long = (number of long contracts)/(number of long contracts + number of short contracts)
This is a contrarian indicator meaning that when majority of the speculators that are holding “Long” positions, the probability that the market has reached a top is higher.
For more information please refer to the book