Python API¶
List of nefindata’s python functions.
Cost of Capital/Equity¶
get_sector_cost_of_capital(sector[, agg, …]) |
Download data of an industrial sector cost of capital from NEFIN’s website. |
Dividend Yield¶
get_dividend_yield([agg, agg_func]) |
Download Dividend Yield data from NEFIN’s website. |
Market Illiquidity Index¶
get_illiquidity_index([agg, agg_func]) |
Download Market Illiquidity Index data from NEFIN’s website. |
Loan Fees¶
get_loan_fees([agg, agg_func]) |
Download Loan Fees from NEFIN’s website. |
Risk Factors¶
get_single_risk_factor(factor[, agg, agg_func]) |
Download a risk factor time series data from NEFIN’s website. |
get_risk_factors([factors, agg, agg_func]) |
Download a risk factor time series data from NEFIN’s website. |
Short Interest¶
get_short_interest([agg, agg_func]) |
Download Short Interest from NEFIN’s website. |
Functions Definitions¶
-
nefindata.cost_capital.cost_capital_downloaders.get_sector_cost_of_capital(sector, agg=None, agg_func=None)[source]¶ Download data of an industrial sector cost of capital from NEFIN’s website. Data is available for 1, 5, 10 and 20-year projects.
Parameters: - sector (str) – Industry sector to download. Options are: ‘Basic’, ‘Construction’, ‘Consumer’, ‘Energy’, ‘Finance’, ‘Manufacturing’ and ‘Other’.
- agg (str, optional) – Frequency to aggregate. Either ‘year’ or ‘yearly’). Defaults to None.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series of chosen sector
Return type: pandas.core.dataframe
-
nefindata.dividend_yield.dividend_yield_downloaders.get_dividend_yield(agg=None, agg_func=None)[source]¶ Download Dividend Yield data from NEFIN’s website.
Parameters: - agg (str, optional) – Frequency to aggregate. Either ‘year’ (or ‘yearly’) and ‘month’ (or ‘monhtly’). Defaults to None.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series
Return type: pandas.core.dataframe
-
nefindata.illiquidity_index.illiquidity_downloaders.get_illiquidity_index(agg=None, agg_func=None)[source]¶ Download Market Illiquidity Index data from NEFIN’s website.
Parameters: - agg (str, optional) – Frequency to aggregate. Either ‘year’ or ‘yearly’. Defaults to None. Monthly data is the default.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series
Return type: pandas.core.dataframe
-
nefindata.loan_fees.loan_fees_downloaders.get_loan_fees(agg=None, agg_func=None)[source]¶ Download Loan Fees from NEFIN’s website.
Parameters: - agg (str, optional) – Frequency to aggregate. Either ‘year’ (or ‘yearly’) and ‘month’ (or ‘monhtly’). Defaults to None.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series
Return type: pandas.core.dataframe
-
nefindata.risk_factors.risk_factors_downloaders.get_risk_factors(factors=None, agg=None, agg_func=None)[source]¶ Download a risk factor time series data from NEFIN’s website.
Parameters: - factors (str or list-like) – Risk factors to download. Options are one or more out of: ‘Market’, ‘SMB’, ‘HML’, ‘WML’, ‘IML’ and ‘Rf’. If ‘all’ or None, then all factors will be downloaded.
- agg (str, optional) – Frequency to aggregate. Either ‘year’ (or ‘yearly’) and ‘month’ (or ‘monhtly’). Defaults to None.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series of chosen risk factors
Return type: pandas.core.dataframe
-
nefindata.risk_factors.risk_factors_downloaders.get_single_risk_factor(factor, agg=None, agg_func=None)[source]¶ Download a risk factor time series data from NEFIN’s website.
Parameters: - factor (str) – Risk factor to download. Options are: ‘Market’, ‘SMB’, ‘HML’, ‘WML’, ‘IML’ and ‘Rf’.
- agg (str, optional) – Frequency to aggregate. Either ‘year’ (or ‘yearly’) and ‘month’ (or ‘monhtly’). Defaults to None.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series of chosen risk factor
Return type: pandas.core.dataframe
-
nefindata.short_interest.short_interest_downloaders.get_short_interest(agg=None, agg_func=None)[source]¶ Download Short Interest from NEFIN’s website.
Parameters: - agg (str, optional) – Frequency to aggregate. Either ‘year’ (or ‘yearly’) and ‘month’ (or ‘monhtly’). Defaults to None.
- agg_func (str, optional) – Function to apply at aggreagtion (e.g. ‘last’ or ‘mean’). If it is None, then it defaults to ‘last’.
Returns: Pandas dataframe with (aggregated) time series
Return type: pandas.core.dataframe