Author Topic: Earnings Date?  (Read 6291 times)

sternforpres

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
Earnings Date?
« on: October 06, 2011, 10:15:53 am »
Does anyone know the variable name for Earnings Date?

I am trying to write a rule that excludes Earnings date between -1 and 2.

Something like (ED<-1||ED>2)?

Then look for TRUE in Trade Ideas?

TradeIdeas_DA

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
  • Karma: +9/-2
    • Trade Ideas LLC
Re: Earnings Date?
« Reply #1 on: October 06, 2011, 10:40:15 pm »
Try 'EarningD'
Follow me on Twitter: http://twitter.com/TradeIdeas

sternforpres

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
Re: Earnings Date?
« Reply #2 on: October 07, 2011, 11:07:21 am »
Unknown symbol...I don't know C very well, maybe I am messing up something

sternforpres

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
Re: Earnings Date?
« Reply #3 on: October 07, 2011, 04:31:01 pm »
Ok, getting somewhere...got this far...

([EarningD]>=-1 && [EarningD]<=2) returns a ONE if the stock has earnings yesterday, today, and today; so using this column you can put the MAX to 0.5 and they are gone.

HOWEVER, there are lots of NULLS in the EarningD field, I assume that means that Trade Ideas doesn't have the data...so I would want to include them, since its more likely that NULLS are not earnings stocks.

Can't figure that one out...ANYONE? I tried this...but it returns NULL for the result, I want it to return a zero.

(([EarningD]>=-1 && [EarningD]<=10) || [EarningD] !=null)

TradeIdeas_DA

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
  • Karma: +9/-2
    • Trade Ideas LLC
Re: Earnings Date?
« Reply #4 on: October 08, 2011, 12:21:17 pm »
From our CTO Philip:
Quote
First question: Where the nulls come from?  It might be that we don't know.  A lot of times it means that the stock doesn't report earnings.  ETFs, for example, typically have no fundamentals.  Also, if the next earnings are at least a month in the future and the last earnings are at least a month in the past, we report null.  Most stocks report quarterly, so that means the next one and the last one are both about the same distance away.

You want to block out stocks with earnings in the recent past or near future.  You want to include stocks with no earnings information.  There are two obvious ways to do that.  First, let's start with something very similar to what you wrote.

([EarningD]>=-1 && [EarningD]<=2)??-1

This will return 1 if earnings are nearby.  This will return 0 if earnings are far away.  This will return -1 if earnings are null.  So you can keep your filter, max = 0.5.  You can look up ?? or "null Coalescing Operator" in the help.  That is the way to replace a null with something else.

That will work, but there's an even easier way to do this.  Start with the following custom formula:

[EarningD]??100

This is just like the normal earnings, unless the value is null.  Then we say the stock is reporting 100 weekdays in the future.

Next set the minimum value to 2.1 and the maximim value to -1.1.  Notice that the minimum is larger than the maximum.  That means that you want to see all stocks that are below the minimum and you want to see all stocks that are above the maximum.  That is to say, you want to see all stocks outside of the range.  For more info, see http://www.trade-ideas.com/MinMaxNegative/?min=2&max=-1&filter_name=GUP  

I like the second version because you can make small changes in the config window.  You don't have to go back to the formula editor every time.

One more hint.  Why don't you punch in all three formulas?  (Your original and the two I gave you.)  Create a top list and display all three formulas side by side.  That's how I checked these formulas before I posted them here.  It's a good way to understand what's going on. 


 
Follow me on Twitter: http://twitter.com/TradeIdeas

sternforpres

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
Re: Earnings Date?
« Reply #5 on: October 11, 2011, 10:15:35 am »
Very cool...I like it!