This python model performs the PCA decomposition of a defined list of rates instruments (e.g. treasuries or IR swaps) using Eikon Data API, Additionally this model calculates the mean reversion on a curve trade as well as optimal holding period. Full article is provided here.
Refinitiv Eikon or Refinitiv Workspace with access to Eikon Data APIs
Required Python Packages: eikon, pandas, cufflinks, sklearn, scipy, numpy, random