Exploring the advantages of an open source FX TCA library

June 2023 in Previous Features

With the introduction of MiFID II, best execution has become a necessity in all asset classes including FX. TCA can help us to determine the cost of our trading, and in particular ways of reducing it. However, what is the best way to do transaction cost analysis?

The most flexible approach is for investment firms to develop their own bespoke TCA software. This can be fully customised for their needs. In particular, firms are free to develop their own proprietary metrics to complement more common metrics. It also allows firms to keep their trade history internal.

This also enables them to compare using any market data sources as benchmarks. For example, they can compare using an external benchmark such as New Change FX against their own aggregated broker quote streams, a dataset which is unique to them. The downside of this approach is that it is very costly to develop such a library given it requires significant internal development time and expertise.

The other option is using an external TCA service. This requires much less development expertise and is simpler to setup. We can also opt-in to comparing our TCA performance with other funds in our peer group. However, it is less flexible in terms of customisation, given we don’t have access to the source code. Some clients might also prefer to keep their entire trade history internally.

Combining benefits of both

There is another approach which tries to combine the benefits of both, namely the use of open source TCA libraries. Cuemacro is currently in the process of developing a Python FX TCA library. Whilst some of the library will remain proprietary, including certain more complex analysis and visualisations, we are hoping to open source some parts of the framework. Why are we doing this? We recognise that many market participants would like to customise a TCA library and also keep their trade data internally but can’t stretch to developing a full library themselves. From experience, it is a time-consuming process to develop such a framework. By open sourcing it, people can use the library and add their own customised metrics. Writing it in Python also makes the code more accessible.

It also allows other people to contribute and over time this crowdsourcing of ideas, which could be useful to find new metrics and approaches to TCA and will ultimately result in a better library. Also the whole point of transaction cost analysis is transparency, which is helped significantly, if you have access to the code. In the short term, we hope sponsors who see the benefits of a such an open source library, will also support the project.


So far, there have only been two choices for doing FX TCA, namely doing it all yourself or using an external service. We hope that an open source approach to FX TCA is something that market participants will start to consider, given the benefits we have outlined.