Defaults#
- class rateslib.default.Defaults#
Bases:
object
The defaults object used by initialising objects. Values are printed below:
In [1]: from rateslib import defaults In [2]: print(defaults.print()) Scheduling: stub: SHORTFRONT stub_length: SHORT modifier: MF eom: False eom_fx: True eval_mode: swaps_align Instruments: convention: ACT360 payment_lag: 2 payment_lag_exchange: 0 payment_lag_specific: {'IRS': 2, 'STIRFuture': 0, 'IIRS': 2, 'ZCS': 2, 'ZCIS': 0, 'FXSwap': 0, 'SBS': 2, 'Swap': 2, 'XCS': 2, 'FixedRateBond': 0, 'IndexFixedRateBond': 0, 'FloatRateNote': 0, 'Bill': 0, 'FRA': 0, 'CDS': 0, 'NDF': 2} notional: 1000000.0 fixing_method: rfr_payment_delay fixing_method_param: {'rfr_payment_delay': 0, 'rfr_observation_shift': 2, 'rfr_lockout': 2, 'rfr_lookback': 2, 'rfr_payment_delay_avg': 0, 'rfr_observation_shift_avg': 2, 'rfr_lockout_avg': 2, 'rfr_lookback_avg': 2, 'ibor': 2} spread_compound_method: none_simple base_currency: usd fx_delivery_lag: 2 fx_delta_type: spot fx_option_metric: pips cds_premium_accrued: True cds_recovery_rate: 0.4 cds_protection_discretization: 23 Curves: interpolation: {'dfs': 'log_linear', 'values': 'linear'} endpoints: natural multi_csa_steps: [2, 5, 10, 20, 30, 50, 77, 81, 86, 91, 96, 103, 110, 119, 128, 140, 153, 169, 188, 212, 242, 281, 332, 401, 498, 636, 835, 1104, 1407, 1646, 1766, 1808, 1821, 1824, 1825] curve_caching: True Solver: algorithm: levenberg_marquardt tag: v curve_not_in_solver: ignore Miscellaneous: headers: {'type': 'Type', 'stub_type': 'Period', 'u_acc_start': 'Unadj Acc Start', 'u_acc_end': 'Unadj Acc End', 'a_acc_start': 'Acc Start', 'a_acc_end': 'Acc End', 'payment': 'Payment', 'convention': 'Convention', 'dcf': 'DCF', 'df': 'DF', 'notional': 'Notional', 'currency': 'Ccy', 'rate': 'Rate', 'spread': 'Spread', 'npv': 'NPV', 'cashflow': 'Cashflow', 'fx': 'FX Rate', 'npv_fx': 'NPV Ccy', 'real_cashflow': 'Real Cashflow', 'index_value': 'Index Val', 'index_ratio': 'Index Ratio', 'index_base': 'Index Base', 'collateral': 'Collateral', 'pair': 'Pair', 'expiry': 'Expiry', 't_e': 'Time to Expiry', 'delivery': 'Delivery', 'model': 'Model', 'vol': 'Vol', 'strike': 'Strike', 'survival': 'Survival', 'recovery': 'Recovery'} no_fx_fixings_for_xcs: warn pool: 1
Methods Summary
print
()Return a string representation of the current values in the defaults object.
Revert defaults back to their initialisation status.
Methods Documentation
- print()#
Return a string representation of the current values in the defaults object.
- reset_defaults()#
Revert defaults back to their initialisation status.
Examples
In [1]: from rateslib import defaults In [2]: defaults.reset_defaults()