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: object

Owned 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:
__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:

None

Methods

__init__(return_type, coordinate, frequency, ...)

to_index(normalization)

Construct a synthetic index under explicit sizing, cash and missing-data policies.

Attributes

currency_spells

Return owned original dated spells, retaining intra-interval changes for audit.

diagnostics

Return copies of requested compact currency legs.

index_kind

Distinguish compounded wealth from fixed-notional accumulated capital and P&L.

local_ccys

Return effective quote-currency spells on the valuation grid.

opening_hedge_ratios

Return effective opening hedges; a closing change affects the next interval.

payoff_basis

Describe the denominator without asserting a return on zero initial capital.

periods

Return the actual reset boundaries, with no opening for the initial valuation.

synthetic_index

Return the optional explicitly normalized index, otherwise None.

values

Return an owned copy, never the internal mutable panel.

return_type

coordinate

frequency

reference_ccy

cash_policy

embedded_hedge_policy

normalization

return_type: FxReturnType
coordinate: FxReturnCoordinate
frequency: str
reference_ccy: str | None
cash_policy: FxCashPolicy
embedded_hedge_policy: str
normalization: FxIndexNormalization | None
property values: DataFrame

Return an owned copy, never the internal mutable panel.

property local_ccys: DataFrame

Return effective quote-currency spells on the valuation grid.

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 diagnostics: dict[str, DataFrame]

Return copies of requested compact currency legs.

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:

DataFrame