country_portfolio_returns
Country portfolio returns.
Metadata for the selected dataset are returned in the
extra['results_metadata']
field of the response.
Source
https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html
We form value and growth portfolios in each country using four valuation ratios:
- book-to-market (B/M)
- earnings-price (E/P)
- cash earnings to price (CE/P)
- dividend yield (D/P)
We form the portfolios at the end of December each year by sorting on one of the four ratios and then compute value-weighted returns for the following 12 months.
The value portfolios (High) contain firms in the top 30% of a ratio and the growth portfolios (Low) contain firms in the bottom 30%.
There are two sets of portfolios.
In one, firms are included only if we have data on all four ratios.
In the other, a firm is included in a sort variable's portfolios if we have data for that variable.
The market return (Mkt) for the first set is the value weighted average of the returns for only firms with all four ratios.
The market return for the second set includes all firms with book-to-market data, and Firms is the number of firms with B/M data.
Examples
from openbb import obb
# Get model Country portfolio returns used for constructing the Fama-French Factor models.
obb.famafrench.country_portfolio_returns(provider='famafrench')
# Parameters are different than the regional and US portfolio returns.
obb.famafrench.country_portfolio_returns(provider='famafrench', frequency=annual, measure=local, country=japan, dividends=False, all_data_items_required=False)
Parameters
- standard
- famafrench
country
: Literal['austria', 'australia', 'belgium', 'canada', 'denmark', 'finland', 'france', 'germany', 'hong_kong', 'ireland', 'italy', 'japan', 'malaysia', 'netherlands', 'new_zealand', 'norway', 'singapore', 'spain', 'sweden', 'switzerland', 'united_kingdom']
Country to fetch the portfolio returns for.
• Default: united_kingdom
• Optional: True
measure
: Literal['usd', 'local', 'ratios']
The measure to fetch for the portfolio. Only 'annual' frequency is supported for 'ratios'.
• Default: usd
• Optional: True
frequency
: Literal['monthly', 'annual']
The frequency of the data to fetch. Ignored when measure
is set to 'ratios'.
• Default: monthly
• Optional: True
dividends
: bool
When False, portoflios exclude dividends.
• Optional: True
all_data_items_required
: bool
If True (default), includes firms with data for all four ratios. When False, includes only firms with Book-to-Market (B/M) data.
• Optional: True
start_date
: Union[date, str]
The start date for the data. Defaults to the earliest available date.
• Optional: True
end_date
: Union[date, str]
The end date for the data. Defaults to the latest available date.
• Optional: True
Returns
results
: list[FamaFrenchCountryPortfolioReturns]
Serializable results.
provider
: Optional[Literal['famafrench']]
Provider name.
warnings
: Optional[list[Warning_]]
list of warnings.
chart
: Optional[Chart]
Chart object.
extra
: dict[str, Any]
Extra info.
Data
- standard
- famafrench
date
: Union[date, str]
The date of the data.
mkt
: float
Description
The market return (Mkt) for the first set is the value weighted average
of the returns for only firms with all four ratios.
The market return for the second set includes all firms with book-to-market data,
and Firms is the number of firms with B/M data.
Not returned if measure
is set to 'ratios'.
firms
: int
The number of firms, relative to all_data_items_required
parameter. Only returned when measure
is set to 'ratios'.
bm
: float
Book to Market equity ratio. Not returned if measure
is set to 'ratios'.
be_me_high
: float
Book Equity to Market Equity returns for the value portfolio. Not returned if measure
is set to 'ratios'.
be_me_low
: float
Book Equity to Market Equity returns for the growth portfolio. Not returned if measure
is set to 'ratios'.
ep
: float
Earnings to Price ratio. Only returned when measure
is set to 'ratios'.
e_p_high
: float
Earnings to Price returns for the value portfolio. Not returned if measure
is set to 'ratios'.
e_p_low
: float
Earnings to Price returns for the growth portfolio. Not returned if measure
is set to 'ratios'.
ce_p
: float
Cash Earnings to Price ratio. Only returned when measure
is set to 'ratios'.
ce_p_high
: float
Cash Earnings to Price returns for the value portfolio. Not returned if measure
is set to 'ratios'.
ce_p_low
: float
Cash Earnings to Price returns for the growth portfolio. Not returned if measure
is set to 'ratios'.
yld
: float
Dividend Yield ratio. Only returned when measure
is set to 'ratios'.
yld_high
: float
Dividend Yield returns for the value portfolio. Not returned if measure
is set to 'ratios'.
yld_low
: float
Dividend Yield returns for the growth portfolio. Not returned if measure
is set to 'ratios'.
yld_zero
: float
Dividend Yield returns for firms not paying dividends. Not returned if measure
is set to 'ratios'.