finstmt.combined package

Submodules

finstmt.combined.combinator module

class finstmt.combined.combinator.FinancialStatementsCombinator(*args, **kwargs)[source]

Bases: StatementsCombinator[FinancialStatements]

add(statement, other)[source]
Return type:

FinancialStatements

divide(statement, other)[source]
Return type:

FinancialStatements

multiply(statement, other)[source]
Return type:

FinancialStatements

subtract(statement, other)[source]
Return type:

FinancialStatements

class finstmt.combined.combinator.ForecastedFinancialStatementsCombinator(*args, **kwargs)[source]

Bases: StatementsCombinator[ForecastedFinancialStatements]

add(statement, other)[source]
Return type:

ForecastedFinancialStatements

divide(statement, other)[source]
Return type:

ForecastedFinancialStatements

multiply(statement, other)[source]
Return type:

ForecastedFinancialStatements

subtract(statement, other)[source]
Return type:

ForecastedFinancialStatements

class finstmt.combined.combinator.StatementsCombinator(*args, **kwargs)[source]

Bases: Protocol[StatementT]

__init__(*args, **kwargs)
add(statement, other)[source]
Return type:

TypeVar(StatementT, bound= FinancialStatements)

divide(statement, other)[source]
Return type:

TypeVar(StatementT, bound= FinancialStatements)

multiply(statement, other)[source]
Return type:

TypeVar(StatementT, bound= FinancialStatements)

subtract(statement, other)[source]
Return type:

TypeVar(StatementT, bound= FinancialStatements)

finstmt.combined.statements module

class finstmt.combined.statements.FinancialStatements(income_statements, balance_sheets, calculate=True, auto_adjust_config=True, _combinator=<finstmt.combined.combinator.FinancialStatementsCombinator object>)[source]

Bases: object

Main class that holds all the financial statements.

Parameters:

auto_adjust_config (bool) – Whether to automatically adjust the configuration based on the loaded data. Currently will turn forecasting off for items not in the data, and turn forecasting on for items normally calculated off those which are not in the data. For example, if gross_ppe is missing then will start forecasting net_ppe instead

Examples:
>>> bs_path = r'WMT Balance Sheet.xlsx'
>>> inc_path = r'WMT Income Statement.xlsx'
>>> bs_df = pd.read_excel(bs_path)
>>> inc_df = pd.read_excel(inc_path)
>>> bs_data = BalanceSheets.from_df(bs_df)
>>> inc_data = IncomeStatements.from_df(inc_df)
>>> stmts = FinancialStatements(inc_data, bs_data)
__init__(income_statements, balance_sheets, calculate=True, auto_adjust_config=True, _combinator=<finstmt.combined.combinator.FinancialStatementsCombinator object>)
property all_config_items: List[ItemConfig]
auto_adjust_config: bool = True
balance_sheets: BalanceSheets
calculate: bool = True
property capex: Series
change(data_key)[source]

Get the change between this period and last for a data series

Parameters:

data_key (str) – key of variable, how it would be accessed with FinancialStatements.data_key

Return type:

Series

copy(**updates)[source]
Return type:

Self

property dates: List[Timestamp]
property fcf: Series
forecast(**kwargs)[source]

Run a forecast, returning forecasted financial statements

Parameters:

kwargs – Attributes of finstmt.forecast.config.ForecastConfig

Examples:
>>> stmts.forecast(periods=2)
Return type:

ForecastedFinancialStatements

property forecast_assumptions: DataFrame
income_statements: IncomeStatements
item_is_empty(data_key)[source]

Whether the passed item has no data

Parameters:

data_key (str) – key of variable, how it would be accessed with FinancialStatements.data_key

Return type:

bool

Returns:

lag(data_key, num_lags)[source]

Get a data series lagged for a number of periods

Parameters:
  • data_key (str) – key of variable, how it would be accessed with FinancialStatements.data_key

  • num_lags (int) – Number of lags

Return type:

Series

property non_cash_expenses: Series