Click here to Login





                                                   Conditional count countif to determine avg analyst rating

  0

0
Kiran
2016-05-06 16:49:07


I'm trying to determine the average Analyst rating over last 60 days using the Analyst Rating database, and configured the AnalystRating function to
return the rating only on the day it's published (i.e. 1-5 scale) - other days, it's 0.

How do i calculate average rating? I tried this code below but there's no countif function.

a = AnalystRating("", 1, "");
b = sum(a, 60);
c = countif(b>0, 60); //This function doesn't exist
avgRating = iff(c ==0, 0, b/c);


thanks,
Kiran



QuantShare
2016-05-07 04:57:57

  0

Use the "AvgIf" function.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
    To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










    QuantShare

    Trading Items
    Analyst Days Since Last Rating
    Analyst Rating
    Analyst Rating (Yahoo Historical Buy/Sell Recommendations)
    Analyst Previous Rating
    Analyst downgrades & upgrades

    How-to Lessons
    How to automatically arrange charts?
    How to change volume bar colors when the price closes down
    How to use the Fibonacci retracement drawing tool
    How to use QuantShare with Metastock data
    How to download EOD quotes for active and valid stocks only

    Related Forum Threads
    Downlad data Yahoo Analyst Rating
    Component count
    How to determine if the a given day is a trading day?
    Count Down Days
    Conditional Buy/Sell

    Blog Posts
    Create Your Own Technical Stock Rating System
    Introduction to sentiment analysis applied to the stock market
    Correlation of market indicators
    How to Optimize a Trading System with Thousands of Billions of Co...
    How to Backtest Your Trading System for Each Industry









    QuantShare
    Product
    QuantShare
    Features
    Create an account
    Affiliate Program
    Support
    Contact Us
    Trading Forum
    How-to Lessons
    Manual
    Company
    About Us
    Privacy
    Terms of Use

    Copyright © 2025 QuantShare.com
    Social Media
    Follow us on Facebook
    Twitter Follow us on Twitter
    Google+
    Follow us on Google+
    RSS Trading Items



    Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.