Fundamental Data – Previous Quarters

Optuma Forums Optuma Scripting Fundamental Data – Previous Quarters

  • This topic has 2 replies, 2 voices, and was last updated 3 years ago by Liam.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45339
    Liam
    • Topics: 2
    • Replies: 2
    • Posts: 4

    Hi,

    I would like to create a watchlist that shows the current Earnings per Share (EPS) value as well as the previous 3 quarters.
    However, I’m not quite sure how to go about getting the previous values.

    The current value is easy enough:

    DATAFIELD(FEED=FD, FIELD=EPS, LATESTONLY=False)

    However, I have tried the following to look back 3 months and it does not appear to work as I intended it. (I just the figure corresponding to the current EPS):

    DATAFIELD(Month(PERIODAMOUNT=1), FEED=FD, FIELD=EPS, LATESTONLY=False,OFFSET=-3)

    Can anyone tell me where I am  going wrong?

    Thanks
    Liam

    #45371
    MA7
    • Topics: 0
    • Replies: 2
    • Posts: 2

    Hi Liam,

    For the previous value you can use a script like this:

    Value = DATAFIELD(Month(PERIODAMOUNT=3), FEED=FD, FIELD=EPS);

    Value[2]

    You can then modify the last line to Value[4] and Value [6] to grab the two EPS values before that.

    I’ve attached a workbook example with the columns setup.

     

     

    #45391
    Liam
    • Topics: 2
    • Replies: 2
    • Posts: 4

    Fantastic. That’s exactly what I’m after.

    This may be a dumb question, but why do I need to retrieve every 2nd value (Eg. Value[2], Value[4], etc.)?

    Also, where does Optuma source it’s fundamental data from?

     

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest