# Mark-to-market cross-currency basis swap valuation

I'm looking to replicate the EUR vs USD cross-currency basis curve that Bloomberg outputs (EUR.OIS collateralized in USD). I understand that Bloomberg is currently using the mark-to-market implementation instead of the constant notional implementation that was used in the past.

So far, I've succeeded in replicating the EUR.OIS, USD.OIS, EUR.3M and USD.3M curves (with OIS curve stripping). When I try to bootstrap the EUR vs USD basis curve, using as an additional input the USDEUR FX forward rates, I'm not managing to replicate the cross-currency curve. So far, I've been using the following formula for the USD leg (with periodically resetting notional):

For the EUR leg, I've been using the same formula as in the constant notional case (for the record, using this formula for both legs allows me to reproduce the EUR vs USD basis curve in the constant notional case):

I've been looking for other valuation formulas for the MtM case but can't find anything more concrete that allows me to better replicate Bloomberg's EUR vs USD basis curve.

Can anyone tell me whether the formula for the USD leg is correct or whether Bloomberg uses another implementation to bootstrap their cross-currency basis curves? At a maturity of 30 years, I'm currently getting a 1.5% difference compared to Bloomberg's result.

One thing that comes to mind are the USDEUR FX forward rates used as input. Those should be consistent with the curves you're building, ie. $$F_{X{}}(t_0,f_i) = S_{X{}}(t_0) \cdot P_X(t_0,a_{i,s}) / P_{}(t_0,a_{i,s})$$