A Trend-following Trading Indicator on Homomorphically Encrypted Data

Haotian Weng, Artem Lenskiy


Algorithmic trading has dominated the area of quantitative finance for already over a decade. The decisions are made without human intervention using the data provided by brokerage firms and exchanges. An emerging intermediate layer of financial players that are placed in between a broker and algorithmic traders has recently been introduced. The role of this layer is to aggregate market decisions from the algorithmic traders and send a final market order to a broker. In return, the quantitative analysts receive incentives proportional to the correctness of their predictions. In such a setup, the intermediate player — an aggregator — does not provide the market data in plaintext but encrypts it. Encrypting market data prevents quantitative analysts from trading on their own, as well as keeps valuable financial data private. This paper proposes an implementation of a popular trend-following indicator with two different homomorphic encryption libraries — SEAL and HEAAN — and compares it to the trading indicator implemented for plaintext. Then, an attempt to implement a trading strategy is presented and analysed. The trading indicator implemented with SEAL and HEAAN is almost identical to that implemented on the plaintext, with the percentage error of 0.14916% and 0.00020% respectively. Despite many limitations that homomorphic encryption imposes on this algorithm’s implementation, quantitative finance has a potential of benefiting from the methods of homomorphic encryption.


Paper Citation