Swap pricing is just daily compounding. Calculate a daily index from SOFR fixings and day counts, and every term rate or discount factor follows directly from simple ratios.
Introduction
I previously explained DV01 – the discounted value of a basis point – and looked at why every SOFR futures tick is worth $25. Swap pricing really just builds on that – you really don’t require a complex curve-building engine to value a swap.
Because most interest-rate derivatives are now traded as Overnight Index Swaps (OIS), you can construct a transparent, spreadsheet-based SOFR pricer directly from data published by the Federal Reserve Bank of New York.
This article explains – step-by-step and with a spreadsheet example – how to replicate the mechanics behind a swaps pricer using only:
- Daily SOFR fixings and SOFR Index from the NY Fed.
- Official U.S. holiday calendar.
- Standard ACT/360 day-count conventions.
It shows how to:
- Compute the SOFR Index recursively.
- Derive term rates between any two dates.
- Calculate discount factors for any cash-flow.
The goal is to make swap valuation transparent: every step – from overnight compounding to term rate calculation – can be expressed with simple linear mathematics.
By the end, you’ll see that a swaps pricer is nothing more than a sequence of index calculations and ratios, all grounded in publicly available SOFR data.
How to Build a Simple SOFR Swap Pricer
Step One: download the SOFR fixings from the NY Fed here.
Step Two: grab the US holidays from here.
Step Three: set up your calculations to mirror those below:

The breakdown by column is as follows:
- Effective Date = Fixing Date as published by the NY Fed.
- SOFR Rate = Rate published by the NY Fed.
- SOFR Days = Number of days applying to that SOFR fixing. The rate with a date of 27th October runs from the 27th until 28th of October. The Fed makes this clear on their technical guidance:
For the overnight repo transactions comprising the SOFR, the maturity date is always the next business day (when the SOFR is published), so the index and averages will always have a value date one business day later than the value date of the final SOFR observation included.
Calculation Methodology for SOFR , NY Fed
- Index Value is calculated as;
Where;
= SOFR rate fixed on date A.
= Day count fraction calculated as Actual 360 between dates A and B.
The next five columns simply show the steps to calculate one month term rates for each date.
Step Four: Armed with your daily index values, the term rate between any two dates (shown as column “1 month Equiv Rate“) is calculated as:
Where;
= SOFR Index at the start of the period.
= SOFR Index at the end of the period.
= Day count fraction calculated as Actual 360 between the two dates.
How do I calculate discount factors?
This is a great way to value any swap if you ask me. If you have the index value on any given date, you can also discount the cashflow.
Let’s rewind our spreadsheet to say the 10th October 2025 as my value date. What is the discount factor to the 27th October?
Simple:
In my spreadsheet, I have index values of 103.42920 and 103.63473, giving me a discount factor of 0.998017.
It is really obvious if you think about it. If I then compound up that 0.998017 by the SOFR fixing each day, I am bound to arrive at 1 for the cashflow on 27th October.
(And if you need a refresher on how we calculate DV01, see Mechanics and Definitions of DV01 in Derivatives – it is the starting point of all this.)
Can all swaps pricers be this simple?
Final Step: Populate your spreadsheet with the forward SOFR rates every day for the next 50 years. HINT: You can’t download them from the internet!
This blog explains the mechanics of a swaps pricer. It doesn’t matter if those interest rates are known or unknown. All that a swaps pricer does is calculate an index value every day and divide one index by the other.
I wish that the systems I traded with were transparent enough to show the value of the index each day. It would make swap pricing a lot more intuitive (and would have saved all of the interns who have worked with me from making the above spreadsheet each year 😛 ).
How to calculate your forward rates
This is where the value of a swaps pricer lies. You want to be able to incorporate all of the market information out there – swaps, futures, bonds, spreads, basis – and create an “arbitrage free” view of the world so that all instruments value back to par.
That is not a topic for this blog. The take-away here is to understand how simple it is to value a swap – to remove a bit of the mystery.
In Summary
- Question: How can I start building a simple swaps pricer?
Answer: A modern swaps pricer can be built from first principles using public SOFR data from the Federal Reserve Bank of New York. - Question: What are the fundamental concepts?
Answer: Compounding overnight rates creates an Index, and all term rates and discount factors derive from ratios of that index between two dates.
- Question: How does this differ to other swaps pricers?
Answer: Whilst every swaps pricer follows the same reasoning – the differences lie in how forward rates are estimated to make the curve arbitrage-free. - Question: Which products can I use this pricer for?
Reproducing the valuation logic behind OIS-based swaps and verifying how discounting works enables all future dated cash-flows to be valued – whether swaps, FX, repos or cross currency products.


Leave a Reply