Fx carry trade in AB


Does anyone know how to code the fx carry trade as described here:

in AB?

If so I would be grateful if they would share the code.

many thanks,

Can it be done in AB ? Sure.

  1. Beside from importing the price of an underlying import the corresponding interest rates (IT) ( for the pair ).
  2. Then calculate the interest rate differential of the underlying.
  3. Calculate the debited/credited amount on a (presumably) daily interval.
  4. Subtract or add the daily IT differential from your account for every day you hold a position.

Hi Teyano, thanks for that but I asked for sharing of the code. Cheers, Amarjit