finstmt.resolver package

Submodules

finstmt.resolver.base module

class finstmt.resolver.base.ResolverBase(stmts)[source]

Bases: object

__init__(stmts)[source]
property all_eqs: List[Equality]
property num_periods: int
set_solve_eqs_and_full_subs_dict()[source]
solve_eqs: List[Equality]
subs_dict: Dict[IndexedBase, float]
property sympy_subs_dict: Dict[IndexedBase, float]
property t: Idx
property t_indexed_eqs: List[Equality]
to_statements()[source]
Return type:

FinancialStatements

finstmt.resolver.forecast module

exception finstmt.resolver.forecast.BalanceSheetBalancedException[source]

Bases: Exception

class finstmt.resolver.forecast.ForecastResolver(stmts, forecast_dict, results, bs_diff_max, timeout, balance=True)[source]

Bases: ResolverBase

__init__(stmts, forecast_dict, results, bs_diff_max, timeout, balance=True)[source]
property all_eqs: List[Equality]
property bs_balance_eqs: List[Equality]
property forecast_dates: DatetimeIndex
property num_periods: int
property plug_configs: List[ItemConfig]
property plug_keys: List[str]
property plug_x0: ndarray
resolve_balance_sheet()[source]
solve_eqs: List[Equality]
subs_dict: Dict[IndexedBase, float]
property sympy_subs_dict: Dict[IndexedBase, float]
property t_indexed_eqs: List[Equality]
to_statements()[source]
Return type:

ForecastedFinancialStatements

class finstmt.resolver.forecast.PlugResult(res=None, timeout=180, start_time=None, fun=None, met_goal=False)[source]

Bases: object

__init__(res=None, timeout=180, start_time=None, fun=None, met_goal=False)
fun: Optional[float] = None
property is_timed_out: bool
met_goal: bool = False
res: Optional[ndarray] = None
start_time: Optional[float] = None
property time_elapsed: float
timeout: float = 180
finstmt.resolver.forecast.resolve_balance_sheet(x0, eqs, plug_keys, subs_dict, forecast_dates, config, sympy_namespace, bs_diff_max, balance_groups, timeout)[source]
Return type:

Dict[IndexedBase, float]

finstmt.resolver.history module

class finstmt.resolver.history.StatementsResolver(stmts)[source]

Bases: ResolverBase

property all_eqs: List[Equality]
property num_periods: int
solve_eqs: List[Equality]
subs_dict: Dict[IndexedBase, float]
property sympy_subs_dict: Dict[IndexedBase, float]
property t_indexed_eqs: List[Equality]
to_statements(**kwargs)[source]
Return type:

FinancialStatements

finstmt.resolver.solve module

finstmt.resolver.solve.get_solve_eqs_and_full_subs_dict(eqs_for_sub, subs_dict)[source]
Return type:

Tuple[List[Equality], Dict[IndexedBase, float]]

finstmt.resolver.solve.numpy_solve(exprs, variables)[source]
finstmt.resolver.solve.results_dict_to_sympy_dict(results_dict, sympy_namespace)[source]
Return type:

Dict[IndexedBase, float]

finstmt.resolver.solve.solve_equations(solve_eqs, subs_dict, substitute=True, round_results=True)[source]
finstmt.resolver.solve.sympy_dict_to_results_dict(s_dict, forecast_dates, item_configs, t_offset=0)[source]
Return type:

Dict[str, Series]