OpenBB
OpenBB copied to clipboard
feature/commodities-lbma-fixing: Adds Commodity Extension and LBMA Gold/Silver daily fixing levels
This PR adds a Commodity extension, and creates one endpoint: obb.commodity.lbma_fixing()
The function returns daily AM/PM prices for gold, and daily for silver, in USD/EUR/GBP. The data provider is Nasdaq Data Link, and the time series can be collapsed as monthly, quarterly, and annual. It can also be transformed by difference, rate of change, cumulative, and normalized. Daily data goes back to 1968.
@deeleeramone Do you know we have some of the Nasdaq tests failing and also yfinance on this branch?
@deeleeramone Do you know we have some of the Nasdaq tests failing and also yfinance on this branch?
They appear to be cassettes needing to be re-recorded, I'll investigate, but maybe it gets resolved when I merge latest develop into this branch.
@deeleeramone I see that query_params.py
is defined in the openbb_nasdaq/models
folder. This file should go in the openbb_nasdaq/utils
folder, as it's not a model file but instead a helpers file.
@deeleeramone I see that
query_params.py
is defined in theopenbb_nasdaq/models
folder. This file should go in theopenbb_nasdaq/utils
folder, as it's not a model file but instead a helpers file.
It is a model. They are the common query params accepted by Nasdaq Data Link for any request. The code doesn't do anything, it's a Query Params model.
@deeleeramone I see that
query_params.py
is defined in theopenbb_nasdaq/models
folder. This file should go in theopenbb_nasdaq/utils
folder, as it's not a model file but instead a helpers file.It is a model. They are the common query params accepted by Nasdaq Data Link for any request. The code doesn't do anything, it's a Query Params model.
A standard model will contain a QueryParams
and Data
class. I like your idea of having a single standard model file for grouping similar types of models (financial_statements in this case). This means we have multiple QueryParams
and Data
class in a single file.
However, a provider model is considered a model because it contains the QueryParams
, Data
and Fetcher
class. This file doesn't and should instead be moved to the utils
folder.
@deeleeramone What is the state of this PR?
@deeleeramone What is the state of this PR?
It's been ready to go for weeks.
Let's resolve the conflicts and switch it to use our custom parameterized. Then we merge :D
Let's resolve the conflicts and switch it to use our custom parameterized. Then we merge :D
I'm confused, switch what to use what?
@deeleeramone we now have a custom parametrize decorator that we import. It is wrapped around the pytest one to allow for testing modularity.
@deeleeramone we now have a custom parametrize decorator that we import. It is wrapped around the pytest one to allow for testing modularity.
A) What is it? How do you use it? B) Is this documented somewhere? C) How is it any different than all other provider-specific parameters? A standard model is still being used, there is simply a shared set of parameters for Nasdaq Data Link only.