qis.FxReturnsData¶
- class qis.FxReturnsData(return_type, coordinate, frequency, reference_ccy, cash_policy, embedded_hedge_policy, normalization, _values, _local_ccys, _opening_hedge_ratios, _diagnostics=<factory>, _currency_spells=None)[source]¶
Bases:
objectOwned return values and their economic/timing contract.
- Variables:
return_type (qis.fx.fx_returns.FxReturnType) – Economic kind, independent of representation.
coordinate (qis.fx.fx_returns.FxReturnCoordinate) – Numerical coordinate of values.
frequency (str) – Actual reset/return cadence; periods records its boundaries.
reference_ccy (str | None) – Reference denomination, or None for native local returns.
cash_policy (qis.fx.fx_returns.FxCashPolicy) – Annual quote lineage, boundary lag and ACT/365F convention.
embedded_hedge_policy (str) – Meaning of the effective additional hedge ratios.
normalization (qis.fx.fx_returns.FxIndexNormalization | None) – Explicit index policy, or None when no index was requested.
values – Copy of the date-by-asset/currency return panel.
periods – Copy of opening/closing interval boundaries, end-labelled.
local_ccys – Copy of as-of currency-spell metadata on the result grid.
currency_spells – Copy of the original dated currency history, including off-grid changes.
opening_hedge_ratios – Copy of effective opening principal hedges.
diagnostics – Optional owned currency-level leg copies.
synthetic_index – Optional compounded index or accumulated capital-plus-P&L.
index_kind – None, compounded_index, or accumulated_pnl_with_initial_capital.
payoff_basis – Denominator and funding meaning of the returned numbers.
- Parameters:
return_type (FxReturnType)
coordinate (FxReturnCoordinate)
frequency (str)
reference_ccy (str | None)
cash_policy (FxCashPolicy)
embedded_hedge_policy (str)
normalization (FxIndexNormalization | None)
_values (DataFrame)
_local_ccys (DataFrame)
_opening_hedge_ratios (DataFrame)
_currency_spells (DataFrame | None)
- __init__(return_type, coordinate, frequency, reference_ccy, cash_policy, embedded_hedge_policy, normalization, _values, _local_ccys, _opening_hedge_ratios, _diagnostics=<factory>, _currency_spells=None)¶
- Parameters:
return_type (FxReturnType)
coordinate (FxReturnCoordinate)
frequency (str)
reference_ccy (str | None)
cash_policy (FxCashPolicy)
embedded_hedge_policy (str)
normalization (FxIndexNormalization | None)
_values (DataFrame)
_local_ccys (DataFrame)
_opening_hedge_ratios (DataFrame)
_currency_spells (DataFrame | None)
- Return type:
None
Methods
__init__(return_type, coordinate, frequency, ...)to_index(normalization)Construct a synthetic index under explicit sizing, cash and missing-data policies.
Attributes
Return owned original dated spells, retaining intra-interval changes for audit.
Return copies of requested compact currency legs.
Distinguish compounded wealth from fixed-notional accumulated capital and P&L.
Return effective quote-currency spells on the valuation grid.
Return effective opening hedges; a closing change affects the next interval.
Describe the denominator without asserting a return on zero initial capital.
Return the actual reset boundaries, with no opening for the initial valuation.
Return the optional explicitly normalized index, otherwise None.
Return an owned copy, never the internal mutable panel.
- return_type: FxReturnType¶
- coordinate: FxReturnCoordinate¶
- cash_policy: FxCashPolicy¶
- normalization: FxIndexNormalization | None¶
- property currency_spells: DataFrame¶
Return owned original dated spells, retaining intra-interval changes for audit.
- property opening_hedge_ratios: DataFrame¶
Return effective opening hedges; a closing change affects the next interval.
- property periods: DataFrame¶
Return the actual reset boundaries, with no opening for the initial valuation.
- property synthetic_index: DataFrame | None¶
Return the optional explicitly normalized index, otherwise None.
- property index_kind: str | None¶
Distinguish compounded wealth from fixed-notional accumulated capital and P&L.
- property payoff_basis: str¶
Describe the denominator without asserting a return on zero initial capital.
- to_index(normalization)[source]¶
Construct a synthetic index under explicit sizing, cash and missing-data policies.
- Parameters:
normalization (FxIndexNormalization) – Full capital/notional/settlement specification. Cash is already included or subtracted according to return_type; this never adds funding.
- Returns:
Compounded index or initial capital plus accumulated fixed-notional P&L.
- Raises:
ValueError – Cadences differ or compounded gross increments are nonpositive.
- Return type: