After tax cashflow calculation.¶
-
cashflows.taxing.
after_tax_cashflow
(cflo, tax_rate)[source]¶ The function after_tax_cashflow returns a new cashflow object for which the values are taxed. The specified tax rate is only appled to positive values in the cashflow. Negative values are reemplazed by a zero value. cflo and tax_rate must have the same length and time specification.
Computes the after cashflow for a tax rate. Taxes are not computed for negative values in the cashflow.
Parameters: - cflo (TimeSeries) – generic cashflow.
- tax_rate (TimeSeries) – periodic income tax rate.
Returns: TimeSeries objects with taxed values
Example*
>>> cflo = cashflow(const_value=[100] * 5, spec=(0, -100)) >>> tax_rate = interest_rate(const_value=[10] * 5) >>> after_tax_cashflow(cflo=cflo, tax_rate=tax_rate) Time Series: Start = (0,) End = (4,) pyr = 1 Data = (0,) 0.00 (1,)-(4,) [4] 10.00