Mark-to-Market (MTM) is the process of valuing an asset, liability, or financial instrument, such as a forex forward contract, at its current market price rather than its book value or historical cost. The calculated MTM value represents the profit or loss that would be realised if the contract were settled at the current market exchange rate, reflecting the real-time value of the contract at the moment.
The MTM value of a forex forward contract can be evaluated in the following four steps.
- Step 1 – Create an offsetting forward position
- Step 2 – Determine the forward rate for the offsetting position
- Step 3 – Calculate the cashflow at the maturity date
- Step 4 – Calculate the present value of the cashflow
In this blog post, I will walk through these steps and implement them in Python. I will use the examples provided in the CFA curriculum (Questions 3 and 4 in Example 3, Module 1, Economics) to validate the results from my code.
Here are the market quotes required in this example:
Market Quotes
- Spot rate (USD/NZD): 0.7825/0.7830
- Three-month points: -12.1/-10
- Three-month MRR(NZD): 3.31%
- Three-month MRR(USD): 0.31%
This is the forward contract to evaluate in Case 1:
Forward Contract – Case 1
- Currency Pair: USD/NZD
- Direction: Short
- Notional Amount: 10M NZD
- Forward Price: 0.79 (USD/NZD)
- Time to Maturity: 3 Months
Here, we have a 10 million NZD forward short position that will be settled in 3 months at a rate of 0.79 USD/NZD. I have created the following diagram to visualise the four steps for calculating the mark-to-market (MTM) value of the forward position.

Step 1:
We create an 10 million NZD long position to offset our 10 million NZD short position. At the settlement day, we will need to close the existing short position with the pre-agreed rate at 0.79 (USD/NZD), and close the new offsetting long position with a rate we need to determine.
Step 2:
Based on the spot rate of USD/UZD (0.7825/0.7830) at the evaluation date (i.e., 3 months before the settlement day) and the three-month forward points (-12.1/-10) quoted in the current market, we can derive the forward rate for the newly created offsetting position as 0.78129/0.78200. As the offsetting position is a long position, we need to use the ‘ask‘ price of the quote, i.e., 0.78200
Step 3:
We can calculate the cashflow payments at settlement as:
- The NZD short position in our portfolio: 10M NZD * 0.79 = 7.9M USD
- The NZD long position for MTM: -10M NZD * 0.782 = – 7.82 M USD
The total cashflow of the two position is 0.08M USD, which is a profit.
Step 4:
Based on the Three-month MRR(USD) market quote at 0.31% and the time-to-maturity as 3 months, we can calculate the present value of the cashflow as 0.08M USD / (1 + 0.0031/4) = 79, 938 USD, which is the mark-to-market value of our 10M NZD short position.
I created a mark_to_market function in Python to replicate these four steps, as the snapshot shows below.
This is a generic function with no dependency with specific currency pair or forward contract. For our Case 1, here is the parameters settings. As the position to mark is a short position on NZD, the offsetting position needs to be a long position on NZD. Given the currency pair is quoted as USD/NZD, we need to use the ‘ask‘ price of the market spot rate and forward points as we need to buy NZD using USD from the market. In addition, as the cashflow at settlement will be valued in USD, we don’t need to switch the currencies for currency pair quoted (USD/NZD).
Forward Contract – Case 2
- Currency Pair: USD/NZD
- Direction: Short
- Notional Amount: 10M USD
- Forward Price: 0.79 (USD/NZD)
- Time to Maturity: 3 Months
For Case 2, everything remains the same as in Case 1, except the position is in USD instead of NZD. The steps and calculations for the mark-to-market (MTM) process are largely identical to those in Case 1. The main difference lies in the conversion of the currencies involved in the cash flow calculations. Since the currency pair is quoted as USD/NZD, we need to convert the quote to NZD/USD, as shown in the following formula. More details about the conversion can be found in my previous blog post.
In addition, as the cashflow at settlement is in NZD, the discount rate for deriving the present value at step 4 needs to be three-month MRR(NZD) at 3.31%.
Here are the parameter settings for the mark_to_market function in Case 2. The bid price of the USD/NZD is used for the spot rate and the forward points to calculate the forward rate. Additionally, the currency_pair_reverse flag has been set to True to inform the mark_to_market function about the need for currency pair conversion.
Here are the outputs of the code, which align with the answers provided in the CFA curriculum example.
Full Code – Python
# Mark to market of a forex forward, such as short 10M USD/NZD
# Notional_a - the notional amount for the forward contract
# a - base currency, b - pricing currency
def mark_to_market(notional_a, fwd_a_b, spot_a_b, fwd_points,
time_to_maturity, r_b, currency_pair_reverse):
# step 1 - create a offsetting forward position
notional_a_offsetting = -notional_a
# step 2 - determine forward rate for the offsetting forward position
if not currency_pair_reverse:
fwd_offsetting_a_b = spot_a_b + fwd_points/10000
else:
fwd_offsetting_a_b = 1 / (spot_a_b + fwd_points/10000)
# step 3 - calculate the cashflow at the settlement day
fwd_rate = 1 / fwd_a_b if currency_pair_reverse else fwd_a_b
cashflow_T = notional_a_offsetting * fwd_offsetting_a_b + notional_a * fwd_rate
# step 4 - calculate the current value of the cashflow
cashflow_t = cashflow_T / (1 + r_b*time_to_maturity)
return cashflow_t
# Mark-to-Market of 10M NZD Short Position:
notional_nzd = -10000000 # notional amount of the forward contract
fwd_nzd_usd = 0.79 # forward price at initiation
spot_nzd_usd = {'bid':0.7825, 'ask':0.783} # spot rate
fwd_points = {'bid':-12.1, 'ask':-10} #fwd points
time_to_maturity = 0.25 # current time to forward maturity, in years
r_usd = 0.0031 # three month MRR (USD)
mtm_fwd_a = mark_to_market(
notional_a = notional_nzd,
fwd_a_b = fwd_nzd_usd,
spot_a_b = spot_nzd_usd['ask'],
fwd_points = fwd_points['ask'],
time_to_maturity = time_to_maturity,
r_b = r_usd,
currency_pair_reverse = False
)
print('\n\n')
print(f'Mark-to-Market of NZD Short Position: {mtm_fwd_a}')
# Mark-to-Market of 10M USD Short Position:
notional_usd = -10000000 # notional amount of the forward contract
fwd_nzd_usd = 0.79 # forward price at initiation
spot_nzd_usd = {'bid':0.7825, 'ask':0.783} # spot rate
fwd_points = {'bid':-12.1, 'ask':-10} #fwd points
time_to_maturity = 0.25 # current time to forward maturity, in years
r_nzd = 0.0331 # three month MRR (NZD)
mtm_fwd_a = mark_to_market(
notional_a = notional_usd,
fwd_a_b = fwd_nzd_usd,
spot_a_b = spot_nzd_usd['bid'],
fwd_points = fwd_points['bid'],
time_to_maturity = time_to_maturity,
r_b = r_nzd,
currency_pair_reverse = True
)
print(f'Mark-to-Market of USD Long Position: {mtm_fwd_a}')
print('\n\n')





