eclipse-tradista / tradista

Tradista: the first open source Financial Risk Management Solution
Apache License 2.0
9 stars 2 forks source link

Give the possibility to calculate the convexity of repo trades #154

Closed oasuncion closed 1 month ago

oasuncion commented 1 month ago

For the moment, it is not possible to calculate the convexity of a repo in Tradista. Convexity is a commonly used measure for trading and should be added to Tradista repo trading dashboards.

The solution is to add a new measure named "CONVEXITY" for both GC and specific repos pricers. Convexity is the measure of the repo value sensitivity to non linear interest rates variations. In other words, it measures how the repo value change when interest rate change significantly. The formula to give an approximation of the convexity is: $T^2+T/(1+r)^2$ where $T$ is the trade duration and $r$ is the interest rate.

Example: The repo duration is 30 days, the interest rate is 3%. The (approximate) convexity is 0,085