Please may you advise how I can use the same code from another question "https://community.developers.refinitiv.com/questions/83964/function-fxcalcperiod-in-eikon-api-codebook.html?" or similar to also clone the FX Calc period for a future valuation date?
=FxCalcPeriod("21MAR2022","USDKRW","1M") formula that works correctly in excel with future valuation dates "21MAR2022" (Assume todays actual date is 18th Mar 2022)
top dataframe returned is for todays date 18th Mar 22,
Bottom df is for future date since that works in Excel but seemingly not in python.
Formula works with future valuation_date that works (44641=21st March 2022)
import refinitiv.dataplatform as rdp import refinitiv.dataplatform.eikon as rdp_ek from refinitiv.dataplatform.content.ipa.contracts import cross from refinitiv.dataplatform.content.ipa import FinancialContracts as fc #%% #%% rdp.open_desktop_session(appkey) fwd_contract = cross.Definition(fx_cross_code='USDKRW', fx_cross_type='FxForward', legs = [cross.LegDefinition(tenor='1M')]) response = fc.get_cross_analytics(fwd_contract, fields = ['StartDate', 'EndDate', 'FxSwapsCcy1Ccy2', 'FxOutrightCcy1Ccy2'], calculation_params = cross.CalculationParams(valuation_date='2022-03-21')) response.data.df