calculatory_widget
Classes:
BRMSBondCalculatorWidget
BRMSBondCalculatorWidget(parent=None)
Bases: BaseCalculatorWidget
Methods:
-
center_window
–Center the main window on the screen.
-
parse_view_params
–Parse the parameters from the widget inputs and return a tuple of values.
-
show_bond_payment_schedule
–Display the bond payment schedule in a table widget.
-
show_bond_value
–Display the bond value in a dialog.
center_window
center_window() -> None
Center the main window on the screen.
parse_view_params
parse_view_params()
Parse the parameters from the widget inputs and return a tuple of values.
show_bond_payment_schedule
show_bond_payment_schedule(payments)
Display the bond payment schedule in a table widget.
This method retrieves the necessary parameters from the widget's input fields,
calculates the bond payment schedule using the fixed_rate_bond_payment_schedule
function,
and populates a table widget with the payment schedule data.
The table widget is assumed to be named table_widget
and should have three columns:
- Weekday: The weekday of the payment date.
- Date: The payment date in ISO format.
- Payment: The payment amount.
Note: This method assumes that the necessary input fields and table widget have been properly initialized.
show_bond_value
show_bond_value(
npv, clean_price, dirty_price, accrued_interest
)
Display the bond value in a dialog.
This method calculates the bond value using the provided parameters and displays it in a dialog box. The bond value includes the NPV, clean price, dirty price, and accrued interest.
BRMSMortgageCalculatorWidget
BRMSMortgageCalculatorWidget(
parent=None,
name="Mortgage Calculator",
size=(1500, 500),
)
Bases: BaseCalculatorWidget
Methods:
-
center_window
–Center the main window on the screen.
-
parse_view_params
–Parse the parameters from the widget inputs and return a tuple of values.
-
show_loan_payment_schedule
–Display the bond payment schedule in the table widget.
-
show_loan_value
–Display the bond value in a dialog.
center_window
center_window() -> None
Center the main window on the screen.
parse_view_params
parse_view_params()
Parse the parameters from the widget inputs and return a tuple of values.
show_loan_payment_schedule
show_loan_payment_schedule(
interest_pmt, principal_pmt, outstanding_amt
)
Display the bond payment schedule in the table widget.
show_loan_value
show_loan_value(
npv, total_interest_pmt, total_principal_pmt, total_pmt
)
Display the bond value in a dialog.
BaseCalculatorWidget
BaseCalculatorWidget(
parent=None, name="Calculator", size=(600, 560)
)
Bases: QWidget
Methods:
-
center_window
–Center the main window on the screen.
center_window
center_window() -> None
Center the main window on the screen.
PlotWidget
PlotWidget(title: str = '', parent=None)
Bases: QWidget
Methods:
-
update_plot_style
–Update an existing Matplotlib figure when the style changes.
update_plot_style
update_plot_style()
Update an existing Matplotlib figure when the style changes.