Question about data from Stocks Pack

Hi…
I have just started experimenting with the stocks pack, and it’s great!
When you use some of the formats like Stocks::Quotes(), what you get is a dropdown full of all kinds of useful info like sector, 52-week high, 52-week low, etc.
Is there any way to extract those individual pieces of data?
For instead, I would like to have a column for 52-week high, another column for 52-week low etc.
Is there a way to do this?
Many thanks, Gregg

Hi @Gregg_Stebben,

All of those values should project out to their own columns with a formula.

1 Like

Thank you so much, Ben!

1 Like

@BenLee is there a way to adjust historic data from the stocks pack using a date control?

Coda formulas, formula library, formula cheat sheet - Coda says …

Valid values are “5y”,“2y”,“1y”,“ytd”,“6m”,“3m”,“1m”


That will give you the data for however far back you want to see, but I don’t think there is a way to say “show me 1 month from this start date to this end date”.

If you do need to filter it though to pull out various data items from that list, you can use a formula like this:

thisRow.[Historic Data].Filter(CurrentValue.Date.ToDate().Contains(Today()-1)).ClosePrice

1 Like

Thanks @BenLee!

  • “no” on using a Coda date control to filter :ok_hand:
  • “yes” on using a filter formula within the table :+1:

I updated the embedded doc [above]. Ben’s formula is the column that is highlighted in yellow

1 Like

This question came up again and I wanted to reply that you can definitely use a Coda date filter to pull these values. A date range is two dates so using .First() and .Last() can be used to pull the start and end of that range.

In your example doc above, you can try this formula and see that it will pull the values for only those dates.

thisRow.[Historic Data]
  .Filter(
    CurrentValue.Date.ToDate() >= [Historic Days].First() 
    AND
    CurrentValue.Date.ToDate() <= [Historic Days].Last()
  )
  .ClosePrice

The error flag you’re seeing on that column is from the result being a list and not a single currency, so you can change the column type to “Text” and that error will go away.

2 Likes

Thanks for circling back to this update this thread, @BenLee!


I updated the embedded doc [below]. Ben’s formula is the column that is highlighted in green

1 Like

Thanks for the answer @BenLee and @jeo for sharing.

1 Like