I have searched the internet and can't find any single source of analyst upgrades and downgrades data that can be downloaded.
Either the data is in html or you have to subscribe to a paid service in order to download the data.
Hopefully I found a website, streetinsider.com, who offers the data in a RSS format.
There are two separate feeds, one for the analyst downgrades and the other for the upgrades.
The downloader item I have created combines these two feeds and insert parsed data into a single database whose name is 'analyst_opinion'.
This database contains 4 columns.
Date: the date and time at which the analyst downgrades or upgrades were reported.
Title: the analyst comments. Example: Sterne Agee Upgrades Whitney Holding (WTNY) to Buy.
Upgrade: a numeric value, which takes 1 if it is an upgrade and -1 for a downgrade.
Link: the link of the analyst upgrade or downgrade comment.
You should download the data steadily so you can build your analyst downgrades and upgrades database.
For now I am still collecting data, I am waiting to have more content so that I can create some trading rules and backtest them.
There is a possibility to parse the title data (using regular expressions for example) and create a numeric column with more details on the type of the downgrade or upgrade.
Example:
Canaccord Adams Downgrades First Solar (FSLR) to Hold
This is a downgrade to Hold. We can assign a value to this type of comment and add it to another column.
Bank of America Downgrades Red Hat (RHT) to Neutral
This is a more bearish downgrade.