qis.compute_futures_fx_adjusted_returns¶
- qis.compute_futures_fx_adjusted_returns(prices, fx_spots, periods=1, is_log_returns=False)[source]¶
returns of a futures position in a foreign currency, converted to the quote currency.
For a future, only the margin flow is in the foreign currency, so the FX move applies to the return and not to the notional:
r = r_local + r_local * r_fx. Contrastcompute_cash_fx_adjusted_returns(), where the notional is exposed as well.- Parameters:
prices (DataFrame) – instrument prices in local currency
fx_spots (DataFrame) – spot per instrument, aligned with
prices; seeget_aligned_fx_spots()periods (int) – return horizon in index steps
is_log_returns (bool) – return log returns rather than arithmetic ones
- Returns:
Quote-currency returns in the shape of
prices. Simple futures P&L is returned directly and may be at or below -100%; log output requires a positive gross payoff.- Return type: