Module eng_econ.factors

Expand source code
from eng_econ import generate_dcostring


@generate_dcostring("F", "P", "Single payment compound amount")
def single_payment_compound_amount_factor(i, n):
    return (1 + i) ** n


@generate_dcostring("P", "F", "Single payment present worth")
def single_payment_present_worth_factor(i, n):
    return (1 + i) ** (-n)


@generate_dcostring("A", "F", "Uniform series sinking fund")
def uniform_series_sinking_fund_factor(i, n):
    return i / ((1 + i) ** n - 1)


@generate_dcostring("A", "P", "Capital recovery")
def capital_recovery_factor(i, n):
    temporary = (1 + i) ** n
    return i * temporary / (temporary - 1)


@generate_dcostring("F", "A", "Uniform series compound amount")
def uniform_series_compound_amount_factor(i, n):
    return ((1 + i) ** n - 1) / i


@generate_dcostring("P", "A", "Uniform series present worth")
def uniform_series_present_wortht_factor(i, n):
    temporary = (1 + i) ** n
    return (temporary - 1) / (i * temporary)


@generate_dcostring("P", "G", "uniform gradient present worth")
def uniform_gradient_present_worth_factor(i, n):
    temporary = (1 + i) ** n
    return (temporary - 1) / (i ** 2 * temporary) - (n / (i * temporary))


@generate_dcostring("F", "G", "uniform gradient future worth")
def uniform_gradient_future_worth_factor(i, n):
    return ((1 + i) ** n - 1) / (i ** 2) - (n / i)


@generate_dcostring("A", "G", "Uniform gradient uniform series")
def uniform_gradient_uniform_series_factor(i, n):
    return 1 / i - (n / ((1 + i) ** n - 1))

Functions

def capital_recovery_factor(i, n)

Factor applies to A/P => to A (Uniform amount per interest period) given P (Present worth, value, or amount)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Capital recovery factor

Expand source code
@generate_dcostring("A", "P", "Capital recovery")
def capital_recovery_factor(i, n):
    temporary = (1 + i) ** n
    return i * temporary / (temporary - 1)
def single_payment_compound_amount_factor(i, n)

Factor applies to F/P => to F (Future worth, value, or amount) given P (Present worth, value, or amount)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Single payment compound amount factor

Expand source code
@generate_dcostring("F", "P", "Single payment compound amount")
def single_payment_compound_amount_factor(i, n):
    return (1 + i) ** n
def single_payment_present_worth_factor(i, n)

Factor applies to P/F => to P (Present worth, value, or amount) given F (Future worth, value, or amount)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Single payment present worth factor

Expand source code
@generate_dcostring("P", "F", "Single payment present worth")
def single_payment_present_worth_factor(i, n):
    return (1 + i) ** (-n)
def uniform_gradient_future_worth_factor(i, n)

Factor applies to F/G => to F (Future worth, value, or amount) given G (Uniform gradient amount per interest period)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: uniform gradient future worth factor

Expand source code
@generate_dcostring("F", "G", "uniform gradient future worth")
def uniform_gradient_future_worth_factor(i, n):
    return ((1 + i) ** n - 1) / (i ** 2) - (n / i)
def uniform_gradient_present_worth_factor(i, n)

Factor applies to P/G => to P (Present worth, value, or amount) given G (Uniform gradient amount per interest period)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: uniform gradient present worth factor

Expand source code
@generate_dcostring("P", "G", "uniform gradient present worth")
def uniform_gradient_present_worth_factor(i, n):
    temporary = (1 + i) ** n
    return (temporary - 1) / (i ** 2 * temporary) - (n / (i * temporary))
def uniform_gradient_uniform_series_factor(i, n)

Factor applies to A/G => to A (Uniform amount per interest period) given G (Uniform gradient amount per interest period)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Uniform gradient uniform series factor

Expand source code
@generate_dcostring("A", "G", "Uniform gradient uniform series")
def uniform_gradient_uniform_series_factor(i, n):
    return 1 / i - (n / ((1 + i) ** n - 1))
def uniform_series_compound_amount_factor(i, n)

Factor applies to F/A => to F (Future worth, value, or amount) given A (Uniform amount per interest period)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Uniform series compound amount factor

Expand source code
@generate_dcostring("F", "A", "Uniform series compound amount")
def uniform_series_compound_amount_factor(i, n):
    return ((1 + i) ** n - 1) / i
def uniform_series_present_wortht_factor(i, n)

Factor applies to P/A => to P (Present worth, value, or amount) given A (Uniform amount per interest period)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Uniform series present worth factor

Expand source code
@generate_dcostring("P", "A", "Uniform series present worth")
def uniform_series_present_wortht_factor(i, n):
    temporary = (1 + i) ** n
    return (temporary - 1) / (i * temporary)
def uniform_series_sinking_fund_factor(i, n)

Factor applies to A/F => to A (Uniform amount per interest period) given F (Future worth, value, or amount)

:param i: Interest rate per interest period

:param n: Number of compounding periods

:return: Uniform series sinking fund factor

Expand source code
@generate_dcostring("A", "F", "Uniform series sinking fund")
def uniform_series_sinking_fund_factor(i, n):
    return i / ((1 + i) ** n - 1)