OpenBB-finance / OpenBB

Investment Research for Everyone, Everywhere.
https://openbb.co
Other
29.56k stars 2.76k forks source link

Allow for more options on chart overlays. #2411

Closed Lorenzo025 closed 2 years ago

Lorenzo025 commented 2 years ago

What's the feature that should be improved? For example i can overlay consumer confidence over the sp500 to draw correlations, but I believe the options are limited to just these two datasets.

Describe how you would like the feature improved It would be nice to simply give a time frame like 01-01-2001 -- 01-01-2022/ --y1 sp500 --y2 nasdaq. Just as an example. Of course adding more options like gdp overlayed with energy usage would make great use of the overlays. Screen Shot 2022-08-24 at 6 52 50 PM

DidierRLopes commented 2 years ago

Hey @Lorenzo025,

You actually can overlay any type of datasets (currently only 2 charts). The trick is that you need to call the datasets so that they are "saved" and then you can call them through the name that appears on the menu.

If you want to overlay GDP with energy usage that is possible, e.g.

Screenshot 2022-08-25 at 00 24 35

This is how I did it:

I used: fred -q energy to query what datasets have the word energy, then I was interested in PNRGINDEXM. Thus I run fred PNRGINDEXM.

Then I wanted to see if macro command had the gdp so I did, macro --show parameters where I saw GDP which was when I did macro -p GDP.

Then your stored datasets will have the 2 series you are interested,

 macro     : United_States_CPI
 fred         : PNRGINDEXM
Screenshot 2022-08-25 at 00 26 52

So I run plot --y1 United_States_CPI --y2 PNRGINDEXM.

Hope this helps!

Lorenzo025 commented 2 years ago

I see, thank you for that. I wasn't familiar with the -p and that you need to load your parameters first. Having some issues with fred though. enable to get the parameter you refer to here for energy. It might be the API key im using, not sure. Screen Shot 2022-08-27 at 9 16 18 AM

DidierRLopes commented 2 years ago

That is normal, when you select "energy" it basically looks up for all series that contain the term "energy" if that makes sense.

Lorenzo025 commented 2 years ago

right I was playing with the query option on fred for population and "oil" for example to see what came up. But was having issues pulling the charts up to load. Does this error code have to do with my api key?

Screen Shot 2022-08-27 at 9 45 44 AM

DidierRLopes commented 2 years ago

Yes, it seems it does. Mine is working well at least

Screenshot 2022-08-27 at 15 09 41