Skip to content

valuation

Contain valuation visitor classes for banking and trading books.

Classes:

BankingBookValuationVisitor

BankingBookValuationVisitor(
    scenario_manager: ScenarioManager,
    *,
    valuation_date: date | None = None,
)

Bases: ValuationVisitor

A visitor for banking book valuation.

Methods:

set_date

set_date(
    date: date, *, date_must_be_in_simulation: bool = True
) -> None

Set the date for the valuation and update the term structure.

visit_amortizing_fixed_rate_loan

visit_amortizing_fixed_rate_loan(
    instrument: AmortizingFixedRateLoan,
) -> None

Value an amortizing fixed rate bond.

visit_cash

visit_cash(instrument: Cash) -> None

Value cash.

visit_common_equity

visit_common_equity(instrument: CommonEquity) -> None

Value common equity.

visit_covered_bond

visit_covered_bond(instrument: CoveredBond) -> None

Value a covered bond.

visit_credit_card

visit_credit_card(instrument: CreditCard) -> None

Value a credit card.

visit_deposit

visit_deposit(instrument: Deposit) -> None

Visit deposit.

visit_fixed_rate_bond

visit_fixed_rate_bond(instrument: FixedRateBond) -> None

Value a fixed rate bond.

visit_mock_instrument

visit_mock_instrument(instrument: MockInstrument) -> None

Visit a mock instrument.

visit_personal_loan

visit_personal_loan(instrument: PersonalLoan) -> None

Value a personal loan.

TradingBookValuationVisitor

TradingBookValuationVisitor(
    scenario_manager: ScenarioManager,
    *,
    valuation_date: date | None = None,
)

Bases: ValuationVisitor

A visitor for trading book valuation.

Methods:

set_date

set_date(
    date: date, *, date_must_be_in_simulation: bool = True
) -> None

Set the date for the valuation and update the term structure.

visit_amortizing_fixed_rate_loan

visit_amortizing_fixed_rate_loan(
    instrument: AmortizingFixedRateLoan,
) -> None

Value an amortizing fixed rate bond.

visit_cash

visit_cash(instrument: Cash) -> None

Value cash.

visit_common_equity

visit_common_equity(instrument: CommonEquity) -> None

Value common equity.

visit_covered_bond

visit_covered_bond(instrument: CoveredBond) -> None

Value a covered bond.

visit_credit_card

visit_credit_card(instrument: CreditCard) -> None

Value a credit card.

visit_deposit

visit_deposit(instrument: Deposit) -> None

Visit deposit.

visit_fixed_rate_bond

visit_fixed_rate_bond(instrument: FixedRateBond) -> None

Value a fixed rate bond.

visit_mock_instrument

visit_mock_instrument(instrument: MockInstrument) -> None

Visit a mock instrument.

visit_personal_loan

visit_personal_loan(instrument: PersonalLoan) -> None

Value a personal loan.

ValuationVisitor

ValuationVisitor(
    scenario_manager: ScenarioManager,
    *,
    valuation_date: date | None = None,
)

Bases: Visitor

Abstract base class for valuation visitors.

Methods:

set_date

set_date(
    date: date, *, date_must_be_in_simulation: bool = True
) -> None

Set the date for the valuation and update the term structure.

visit_amortizing_fixed_rate_loan abstractmethod

visit_amortizing_fixed_rate_loan(
    instrument: AmortizingFixedRateLoan,
) -> None

Value an amortizing fixed rate bond.

visit_cash

visit_cash(instrument: Cash) -> None

Value cash.

visit_common_equity

visit_common_equity(instrument: CommonEquity) -> None

Value common equity.

visit_covered_bond abstractmethod

visit_covered_bond(instrument: CoveredBond) -> None

Value a covered bond.

visit_credit_card abstractmethod

visit_credit_card(instrument: CreditCard) -> None

Value a credit card.

visit_deposit

visit_deposit(instrument: Deposit) -> None

Visit deposit.

visit_fixed_rate_bond abstractmethod

visit_fixed_rate_bond(instrument: FixedRateBond) -> None

Value a fixed rate bond.

visit_mock_instrument

visit_mock_instrument(instrument: MockInstrument) -> None

Visit a mock instrument.

visit_personal_loan abstractmethod

visit_personal_loan(instrument: PersonalLoan) -> None

Value a personal loan.