Category: Coding towards CFA

Coding towards CFA (14) – Options Greeks

Coding towards CFA (14) – Options Greeks

Options Greeks are key metrics used in options trading and risk management to measure how sensitive an option's price is a series of factors, including: Delta - measures the sensitivity of an option's price to the changes in the underlying asset's price. Gamma - measures the change rate of an option's Delta in respect to … Continue reading Coding towards CFA (14) – Options Greeks

Coding towards CFA (13) – Swaption Valuation

Coding towards CFA (13) – Swaption Valuation

A swaption is an option on an interest rate swap. As previously discussed, an interest rate swap involves two parties: the fixed-rate payer (who receives the floating rate) and the fixed-rate receiver (who pays the floating rate). A swaption grants the holder the right, but not the obligation, to enter into a swap contract as … Continue reading Coding towards CFA (13) – Swaption Valuation

Coding towards CFA (12) – Interest Rate Options Valuation

Coding towards CFA (12) – Interest Rate Options Valuation

Interest rate options are options based on interest rates, where the underlying asset is a reference interest rate, typically in the form of a Forward Rate Agreement (FRA). For instance, an interest rate call option on a 3-month MRR (market reference rate) with 9 months to expiration would have a 3-month FRA rate expiring in … Continue reading Coding towards CFA (12) – Interest Rate Options Valuation

Coding towards CFA (11) – Futures Options Pricing with Black Model

Coding towards CFA (11) – Futures Options Pricing with Black Model

In the last blog post, we explored the Black-Scholes-Merton model and learned that it is the industry standard for pricing option contracts. However, the BSM model is designed for options on stocks and similar spot market assets, and it is not directly applicable for pricing futures options contracts, mainly due to the following differences between … Continue reading Coding towards CFA (11) – Futures Options Pricing with Black Model

Coding towards CFA (10) – Black-Scholes-Merton (BSM) Model

Coding towards CFA (10) – Black-Scholes-Merton (BSM) Model

In the previous blog post, we saw that the binomial model closely approximates option prices as the number of periods increases. The binomial model is known for its flexibility, intuitiveness, and fewer assumptions. So, why do we still need the Black-Scholes-Merton (BSM) model for option pricing, especially given its restrictive assumptions? One of the main … Continue reading Coding towards CFA (10) – Black-Scholes-Merton (BSM) Model

Coding towards CFA (9) – From Binomial Model to BSM

Coding towards CFA (9) – From Binomial Model to BSM

To kick off this blog post, let's start with a quick experiment where we compare option prices derived from the binomial model with increasing periods to those calculated using the Black-Scholes Model (BSM). Here, we run two sets of option pricing calculations. In the first set, we use the multi-period binomial model, calculating the option … Continue reading Coding towards CFA (9) – From Binomial Model to BSM

Coding towards CFA (8) – Options Pricing with Multi-period Binomial Model

Coding towards CFA (8) – Options Pricing with Multi-period Binomial Model

With the foundational concepts introduced in the previous blog post on the one-period binomial model, along with the path tracing and backward induction covered in the post on the two-period binomial model, we can now move to the multi-period binomial model, which is applicable to real-world scenarios. Once you understand how the one-period and two-period … Continue reading Coding towards CFA (8) – Options Pricing with Multi-period Binomial Model

Coding towards CFA (7) – Options Pricing with Two-Period Binomial Model

Coding towards CFA (7) – Options Pricing with Two-Period Binomial Model

In this blog series, I will aim to code the formulas and model algorithms covered in the CFA Level 2 program using Python and DolphinDB. Each topic will begin with a brief explanation of the formulas or algorithms, followed by their implementations in Python and DolphinDB. In the previous blog post on the one-period binomial … Continue reading Coding towards CFA (7) – Options Pricing with Two-Period Binomial Model

Coding towards CFA (6) – Options Pricing with One-Period Binomial Model

Coding towards CFA (6) – Options Pricing with One-Period Binomial Model

In this blog series, I will aim to code the formulas and model algorithms covered in the CFA Level 2 program using Python and DolphinDB. Each topic will begin with a brief explanation of the formulas or algorithms, followed by their implementations in Python and DolphinDB. From this blog post, we start our journey to … Continue reading Coding towards CFA (6) – Options Pricing with One-Period Binomial Model

Coding towards CFA (5) – Currency Swap Pricing and Valuation

Coding towards CFA (5) – Currency Swap Pricing and Valuation

In this blog series, I will aim to code the formulas and model algorithms covered in the CFA Level 2 program using Python and DolphinDB. Each topic will begin with a brief explanation of the formulas or algorithms, followed by their implementations in Python and DolphinDB. A currency swap is a financial agreement where two … Continue reading Coding towards CFA (5) – Currency Swap Pricing and Valuation