OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

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

Open samiamjidkhan opened this issue 1 year ago • 14 comments

Screenshot 2024-09-22 at 3 08 54 PM

samiamjidkhan avatar Sep 22 '24 19:09 samiamjidkhan

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

samiamjidkhan avatar Sep 22 '24 19:09 samiamjidkhan

Have you installed that extension in your env:

pip install openbb-commodity

jmaslek avatar Sep 22 '24 19:09 jmaslek

Yes, I did.

samiamjidkhan avatar Sep 22 '24 19:09 samiamjidkhan

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)

jmaslek avatar Sep 22 '24 19:09 jmaslek

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

Extensions: - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected]

samiamjidkhan avatar Sep 22 '24 19:09 samiamjidkhan

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

samiamjidkhan avatar Sep 22 '24 19:09 samiamjidkhan

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

deeleeramone avatar Sep 23 '24 03:09 deeleeramone

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

samiamjidkhan avatar Sep 23 '24 03:09 samiamjidkhan

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.

deeleeramone avatar Sep 23 '24 03:09 deeleeramone

Can you suggest some reasonable platforms that provide commodities data?

samiamjidkhan avatar Sep 24 '24 00:09 samiamjidkhan

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.

deeleeramone avatar Sep 24 '24 03:09 deeleeramone

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

mehassanhmood avatar Sep 24 '24 03:09 mehassanhmood

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.

deeleeramone avatar Sep 24 '24 04:09 deeleeramone

Thanks boss, appreciate it!

samiamjidkhan avatar Sep 24 '24 05:09 samiamjidkhan