This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
This function utilizes the historical analyst buy/sell recommendations, downloadable from yahoo by Yahoo Historical Buy/Sell Recommendations, to provide the previous numeric rating for a stock. Ratings provided by various firms to a standard numeric score between 5 and 1, where 5 is a strong buy and 1 is a strong sell. 0 is returned when no rating is applicable.
Note that the mapping from analyst text to a numeric rating is mine, not theirs. If you have suggestions on how to improve the mapping, I would be happy to incorporate them.
The function takes three parameters. The first is the symbol you would like to see the ratings for. To specify the current symbol, just enter "". The second parameter is the effective range in bars for a rating. Once a rating is encountered, the function will continue to return that rating until it either encounters a new rating, or the effective range in bars is exceeded. If the effective range in bars is exceeded, it will return 0. Specify -1 to bypass the effective range logic and have the function always provide the most recent rating value. The third parameter is the rating firm for which you wish to see the rating. Use "" to use all rating firms.
If the function encounters multiple ratings on the same day, it will average them together and provide the combined value.
To chart the function, you can use a formula like:
This will plot the ratings for the current stock. After plotting a rating for a max of 90 days, it will return 0 until a new rating is encountered. This could be useful in a trading function if you believe the analyst recommendation is only predictive for a period of 90 days.
If you find a useful way to use this data, I would love to hear about it! If you have suggestions for improving the function I would love to hear about that as well.