OpenBB-finance / OpenBB

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

AttributeError: 'App' object has no attribute 'commodity' #6684

Open samiamjidkhan opened 1 week ago

samiamjidkhan commented 1 week ago
Screenshot 2024-09-22 at 3 08 54 PM
samiamjidkhan commented 1 week ago

https://docs.openbb.co/platform/reference/commodity/lbma_fixing

jmaslek commented 1 week ago

Have you installed that extension in your env:

pip install openbb-commodity

samiamjidkhan commented 1 week ago

Yes, I did.

jmaslek commented 1 week ago

I'm gonna guess some env issue between where yo are running your nb from.

In your jupyter notebook (which is what I see above) is the commodity present if you run:

!pip list

If the commodity isn't there then there's some env issue (and you can install it there using !pip install openBB-commodity then restart kernel and import openBB)

samiamjidkhan commented 1 week ago

Commodity is the only one not working from the following and it is also the only one that is 1.2.2

Extensions:

samiamjidkhan commented 1 week ago

BTW, yes, I do see openbb-commodity after !pip list

deeleeramone commented 1 week ago

If openbb-nasdaq is not installed, then the extension will not exist. Then there is also this caveat: https://github.com/OpenBB-finance/OpenBB/pull/6677#discussion_r1768211850

samiamjidkhan commented 1 week ago

I do have openbb-nasdaq installed. Looks like I'll have to wait until it is fixed.

deeleeramone commented 1 week ago

I do have openbb-nasdaq installed. Looks like I'll have to wait until it is fixed.

In the meantime, the spot price of gold and silver can be obtained from most providers as a currency pair, XAUCAD and XAGCAD. The USD pairs from yFinance are seemingly not available.

samiamjidkhan commented 1 week ago

Can you suggest some reasonable platforms that provide commodities data?

deeleeramone commented 1 week ago

Can you suggest some reasonable platforms that provide commodities data?

If you just need price/volume and market data related to only the financial futures, BarChart or a brokerage platform are decent choices; but, if you are actively trading those markets you probably want a feed directly from the exchange you are dealing with. Your broker may or may not include all the data you need to trade.

If you need "fundamentals" data and/or need to manage physical settlement, this data is very fragmented and ultra-specific to the commodity in question. I don't have a recommendation for an all-purpose vendor covering the broad commodities universe in this level of detail.

A combination of both is a recipe for an expensive data collection/habit. If the commodity basket is for a trend following strategy or CTA-type futures allocation, daily closing prices may be sufficient.

mehassanhmood commented 1 week ago

What would you recommend for just the closing price , volume and open interest data

deeleeramone commented 1 week ago

What would you recommend for just the closing price , volume and open interest data

Depends on your region, for North America and Europe BarChart probably has the coverage you need. I'm not familiar with the Asian markets here, but Interactive Brokers has pretty good global coverage.

samiamjidkhan commented 1 week ago

Thanks boss, appreciate it!