qis.compute_local_and_fx_return¶
- qis.compute_local_and_fx_return(asset_price_local_ccy, local_to_reference_fx_rate, freq='ME', is_log_returns=False)[source]¶
Decompose an asset’s reference-currency return into its local and FX legs.
Resamples the local-currency asset price and the reference-per-local FX rate to
freq, takes returns of both, and returns them separately. The reference-currency total return of an unhedged position is recovered aslocal_return * (1 + fx_return) + fx_returnfor simple returns, orlocal_return + fx_returnfor log returns.compute_performance_of_local_ccy_asset_in_reference_ccyrequests simple legs and takeslog1pof the completed payoff when log output is requested.- Parameters:
asset_price_local_ccy (Series) – Asset price quoted in its local currency.
local_to_reference_fx_rate (Series) – Units of reference currency per 1 unit of the local currency (e.g.
FxRatesData.get_local_to_reference_fx_rate).freq (str) – Resampling frequency for the returns (e.g.
'ME','QE','B').is_log_returns (bool) – If True compute log returns, otherwise simple returns.
- Returns:
Tuple
(local_return, fx_return)of period-return Series sampled atfreq.- Return type: