Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
samiamjidkhan opened this issue Sep 22, 2024 · 14 comments
Open

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

samiamjidkhan opened this issue Sep 22, 2024 · 14 comments

Comments

@samiamjidkhan
Copy link

Screenshot 2024-09-22 at 3 08 54 PM
@samiamjidkhan
Copy link
Author

@jmaslek
Copy link
Collaborator

jmaslek commented Sep 22, 2024

Have you installed that extension in your env:

pip install openbb-commodity

@samiamjidkhan
Copy link
Author

Yes, I did.

@jmaslek
Copy link
Collaborator

jmaslek commented Sep 22, 2024

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
Copy link
Author

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
Copy link
Author

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

@deeleeramone
Copy link
Contributor

If openbb-nasdaq is not installed, then the extension will not exist. Then there is also this caveat: #6677 (comment)

@samiamjidkhan
Copy link
Author

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

@deeleeramone
Copy link
Contributor

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
Copy link
Author

Can you suggest some reasonable platforms that provide commodities data?

@deeleeramone
Copy link
Contributor

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
Copy link

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

@deeleeramone
Copy link
Contributor

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
Copy link
Author

Thanks boss, appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants