Exemplo n.º 1
0
def get_valuation_performance_data(group: str, data_type: str) -> pd.DataFrame:
    """Get group (sectors, industry or country) valuation/performance data. [Source: Finviz]

    Parameters
    ----------
    group : str
       sectors, industry or country
    data_type : str
       valuation or performance

    Returns
    ----------
    pd.DataFrame
        dataframe with valuation/performance data
    """
    if data_type == "valuation":
        return valuation.Valuation().ScreenerView(group=group)
    return performance.Performance().ScreenerView(group=group)
Exemplo n.º 2
0
def get_valuation_performance_data(group: str, data_type: str):
    """Get group (sectors, industry or country) valuation/performance data

    Parameters
    ----------
    other_args : List[str]
        argparse other args
    group : str
        select group to see data between sectors, industry or country
    data_type : str
        select data type to see data between valuation or performance

    Returns
    ----------
    pd.DataFrame
        dataframe with valuation/performance data
    """
    if data_type == "valuation":
        df_group = valuation.Valuation().ScreenerView(group=group)
    elif data_type == "performance":
        df_group = performance.Performance().ScreenerView(group=group)

    return df_group