As discussed in the previous blog post, under the Uncovered Interest Rate Parity condition, the expected change in the exchange rate between two currencies should theoretically offset the interest rate differential between them. This would eliminate any opportunity for investors to profit from interest rate differentials. Fortunately, in the real world, uncovered Interest Rate Parity … Continue reading Coding towards CFA (40) – FX Carry Trade
Coding towards CFA (39) – International Parity Conditions
This is the first code-less blog post in my Coding Towards CFA series. I’ve included this topic because of the importance of International Parity Conditions, which form the theoretical foundation of forex trading. These conditions are essential for gaining a deep understanding of equilibrium pricing, enabling investors to navigate the FX market more effectively. One of the main … Continue reading Coding towards CFA (39) – International Parity Conditions
Coding towards CFA (38) – Mark-to-Market of Forex Forward Contract
Mark-to-Market (MTM) is the process of valuing an asset, liability, or financial instrument, such as a forex forward contract, at its current market price rather than its book value or historical cost. The calculated MTM value represents the profit or loss that would be realised if the contract were settled at the current market exchange … Continue reading Coding towards CFA (38) – Mark-to-Market of Forex Forward Contract
Coding towards CFA (37) – Triangular Arbitrage in Forex Trading
Triangular arbitrage is a strategy used to exploit inefficiencies in the currency markets by executing a series of trades across three currencies in different markets. Let’s assume we now observe the following quotes for currency pairs from the interbank market and dealers. We want to analyse whether there is any arbitrage opportunity. Interbank Market Quotes … Continue reading Coding towards CFA (37) – Triangular Arbitrage in Forex Trading
Coding towards CFA (36) – Performance Attribution with Brinson Model in DolphinDB and Python
Performance attribution is discussed in the CFA Portfolio Management curriculum, specifically in Module 2, Section 2: "Active Management and Value Added". Performance attribution is a process used to decompose the "value added," i.e., the excess return relative to a benchmark, into different sources. In the CFA curriculum, a simplified Brinson model is presented, which discusses the basic calculations of … Continue reading Coding towards CFA (36) – Performance Attribution with Brinson Model in DolphinDB and Python
Coding towards CFA (35) – The Monte Carlo Method of VaR Estimation
In the previous blog post, we explored the Parametric Method for estimating Value at Risk (VaR). While the parametric method offers the advantage of optimal computational efficiency, it relies on strict assumptions, particularly that returns follow a specific distribution (e.g., normal distribution). For complex portfolios, nonlinear instruments, and scenarios where flexibility and precision are critical, the parametric method may not be suitable. In such … Continue reading Coding towards CFA (35) – The Monte Carlo Method of VaR Estimation
Coding towards CFA (34) – The Parametric Method of VaR Estimation
In the previous blog post, we explored the Historical Method of VaR Estimation. The historical method is simple and intuitive; however, it relies on the assumption that financial markets will repeat historical patterns, disregarding structural changes in market conditions. This limitation makes the historical method less practical in real-world scenarios. In this blog post, I will … Continue reading Coding towards CFA (34) – The Parametric Method of VaR Estimation
Coding towards CFA (33) – VaR Overview and the Historical Method
Value at Risk (VaR) is arguably the most widely used metric for risk management. It quantifies the potential loss in the value of a portfolio over a certain period. In this blog post, I will first provide an overview of VaR, clarifying its definition and discussing its advantages and disadvantages. Then, I will implement Python code … Continue reading Coding towards CFA (33) – VaR Overview and the Historical Method
Coding towards CFA (32) – Setup QuantLib C++ Dev Environment with VS Code on Linux
Since I really don't want to go back to Windows, the bulky, messy headache, I decided to set up my QuantLib C++ development environment on Ubuntu. It took a few extra steps compared to setting up Visual Studio on Windows, so I’m sharing the process in this blog post in case it helps anyone. Step … Continue reading Coding towards CFA (32) – Setup QuantLib C++ Dev Environment with VS Code on Linux
Coding towards CFA (31) – Credit Transition Matrix and Credit Migration Analysis
Credit Migration Analysis with Credit Transition Matrix is discussed in the CFA Fixed Income, Module 4, Section 3, "Credit Scores and Credit Ratings". Credit migration refers to changes in the credit rating of a bond issuer, which can impact the value and expected returns of an investment. A Credit Transition Matrix is a tool used … Continue reading Coding towards CFA (31) – Credit Transition Matrix and Credit Migration Analysis









You must be logged in to post a comment.