Skip to content

Fixed income

Money-market yields

Bank discount rate to and from price, money-market (CD-equivalent) yield, Treasury investment rate, effective annual yield and holding-period yield of a discount instrument.

Model id
fixed_income.money_market, version 1
Domain
Fixed income
Evidence
standard
Cost class
instant: A closed-form calculation; a hosted run may take up to 2 seconds.

Formula

P=F(1−d t360),d=F−PF 360tP = F \left(1 - \frac{d\,t}{360}\right), \quad d = \frac{F - P}{F}\,\frac{360}{t}MMY=F−PP 360tMMY = \frac{F - P}{P}\,\frac{360}{t}i=F−PP yt,t≤y2i = \frac{F - P}{P}\,\frac{y}{t}, \quad t \le \tfrac{y}{2}P[1+(t−y2)iy](1+i2)=F,t>y2P \left[1 + \left(t - \tfrac{y}{2}\right)\tfrac{i}{y}\right]\left(1 + \tfrac{i}{2}\right) = F, \quad t > \tfrac{y}{2}EAY=(FP)365/t−1,HPY=P1−P0+DP0EAY = \left(\frac{F}{P}\right)^{365/t} - 1, \quad HPY = \frac{P_1 - P_0 + D}{P_0}

Where

PP
Price price
FF
Face value face_value
dd
Bank discount rate discount_rate
tt
Days to maturity days
MMYMMY
Money-market yield, on a 360-day year money_market_yield
ii
Investment rate: the bond-equivalent yield investment_rate
yy
Days in the year: 365, or 366 in a leap year days_in_year
EAYEAY
Effective annual yield effective_annual_yield
HPYHPY
Holding-period yield holding_period_yield
P0P_0
Purchase price purchase_price
P1P_1
Proceeds at the end of the holding period proceeds
DD
Income received over the holding period income

Each symbol's field is named beside it; the inputs and outputs, with their units and bounds, are under Variables, and the citations give each formula's source.

Variables

Rates, returns and yields are decimals: 0.05 is five percent. Bounds in brackets include their end; in parentheses they exclude it.

Inputs

Price from a bank discount rate (price_from_discount): 4 inputs
Inputs of the calculation price_from_discount
NameDescription
CalculationcalculationtextPrice from a bank discount rate
Discount ratediscount_raterate · [-0.5, 1]Bank discount rate, per 360 days
Daysdaysdays · [1, 730]Days from settlement to maturity
Face valueface_valuemoney · [0.01, 1e+12]Face value repaid at maturity
Bank discount rate from a price (discount_from_price): 4 inputs
Inputs of the calculation discount_from_price
NameDescription
CalculationcalculationtextBank discount rate from a price
Pricepricemoney · (0, 1e+12]Price paid for the face value
Daysdaysdays · [1, 730]Days from settlement to maturity
Face valueface_valuemoney · [0.01, 1e+12]Face value repaid at maturity
Money-market (CD-equivalent) yield (money_market_yield): 4 inputs
Inputs of the calculation money_market_yield
NameDescription
CalculationcalculationtextMoney-market (CD-equivalent) yield
Pricepricemoney · (0, 1e+12]Price paid for the face value
Daysdaysdays · [1, 730]Days from settlement to maturity
Face valueface_valuemoney · [0.01, 1e+12]Face value repaid at maturity
Treasury investment rate (bond-equivalent) (investment_rate): 5 inputs
Inputs of the calculation investment_rate
NameDescription
CalculationcalculationtextTreasury investment rate (bond-equivalent)
Pricepricemoney · (0, 1e+12]Price paid for the face value
Daysdaysdays · [1, 366]Days from settlement to maturity
Face valueface_valuemoney · [0.01, 1e+12]Face value repaid at maturity
Days in yeardays_in_yeardays · [365, 366]Days in the year after the issue date: 366 when it holds a February 29
Return compounded to a 365-day year (effective_annual_yield): 4 inputs
Inputs of the calculation effective_annual_yield
NameDescription
CalculationcalculationtextReturn compounded to a 365-day year
Pricepricemoney · (0, 1e+12]Price paid for the face value
Daysdaysdays · [1, 730]Days from settlement to maturity
Face valueface_valuemoney · [0.01, 1e+12]Face value repaid at maturity
Return over the holding period (holding_period_yield): 4 inputs
Inputs of the calculation holding_period_yield
NameDescription
CalculationcalculationtextReturn over the holding period
Purchase pricepurchase_pricemoney · (0, 1e+12]Price paid at the start
Proceedsproceedsmoney · [0, 1e+12]Sale price, or the face value repaid at maturity
Incomeincomemoney · [0, 1e+12]Interest or other income received

Outputs

Price from a bank discount rate (price_from_discount): 3 outputs
Outputs of the calculation price_from_discount
NameDescription
CalculationcalculationtextPrice from a bank discount rate
Pricepricemoney · (0, 3e+12]Price for the face value
Discountdiscountmoney · [-2e+12, 1e+12]Face value less price (negative at a negative rate)
Bank discount rate from a price (discount_from_price): 2 outputs
Outputs of the calculation discount_from_price
NameDescription
CalculationcalculationtextBank discount rate from a price
Discount ratediscount_raterate · [-0.99, 10]Bank discount rate, per 360 days
Money-market (CD-equivalent) yield (money_market_yield): 2 outputs
Outputs of the calculation money_market_yield
NameDescription
CalculationcalculationtextMoney-market (CD-equivalent) yield
Money market yieldmoney_market_yieldrate · [-0.99, 10]Return on the price, per 360 days
Treasury investment rate (bond-equivalent) (investment_rate): 2 outputs
Outputs of the calculation investment_rate
NameDescription
CalculationcalculationtextTreasury investment rate (bond-equivalent)
Investment rateinvestment_raterate · [-0.99, 10]Bond-equivalent yield, per 365 or 366 days
Return compounded to a 365-day year (effective_annual_yield): 2 outputs
Outputs of the calculation effective_annual_yield
NameDescription
CalculationcalculationtextReturn compounded to a 365-day year
Effective annual yieldeffective_annual_yieldrate · [-0.99, 10]Return compounded over 365 days
Return over the holding period (holding_period_yield): 2 outputs
Outputs of the calculation holding_period_yield
NameDescription
CalculationcalculationtextReturn over the holding period
Holding period yieldholding_period_yieldreturn · [-1, 100]Gain and income over the price paid

Calculator

Run the model on your own inputs, starting from its example. Rates are decimals: 0.05 is five percent. The run goes to the pyeconomics API on this site: your values travel only in the request, and nothing is stored.

Loading the calculator…

Worked example

31 CFR Part 356 Appendix B, section VI.A: 98.097500 per 100.

Example thirteen_week_bill. Inputs:

{
  "calculation": "price_from_discount",
  "days": 90,
  "discount_rate": 0.0761,
  "face_value": 100
}

Outputs:

{
  "calculation": "price_from_discount",
  "discount": 1.9024999999999999,
  "price": 98.0975
}

Assumptions

  • The instrument pays only its face value at maturity, t days after settlement; the bank discount and money-market yields count a 360-day year (ACT/360).
  • The investment rate counts y = 365 days, or 366 when the year after the issue date holds a February 29, and for a bill of more than half a year compounds once at the half year, as Treasury does.
  • The effective annual yield compounds the return over t days to 365 days.

Limitations

  • A yield outside [-0.99, 10] (a price far from the face value over a few days), a holding-period yield above 100, and a discount that takes the whole face value raise DomainError.
  • Prices are not rounded; Treasury rounds prices per 100 to six decimals.

Evidence

Status: standard. Textbook consensus, such as bond duration or the CAPM formula.

Every model declares one status: standard (textbook consensus), practitioner (a widely used convention), contested (under active debate), rejected (failed out of sample) or historical (a superseded methodology).

Syllabus

The 2027 CFA® Program's topic areas this model relates to, as factual tags. Each links to CFA Institute's page for its level; pyeconomics holds none of the curriculum's text.

Citations

  1. US Department of the Treasury (2022). 31 CFR Part 356, Appendix B: Formulas and Tables. Electronic Code of Federal Regulations. https://www.ecfr.gov/current/title-31/subtitle-B/chapter-II/subchapter-B/part-356/appendix-Appendix%20B%20to%20Part%20356 (Section VI (purchase price, discount rate and investment rate of Treasury bills), paragraphs A-D)
  2. US Department of the Treasury, Bureau of the Fiscal Service (2026). Treasury Auction Results: 182-Day Bill, CUSIP 912797RF6, auctioned January 5, 2026. https://www.treasurydirect.gov/instit/annceresult/press/preanre/2026/R_20260105_2.pdf (High rate, price and investment rate)

Changelog

  • Version 1: First version.

Use it elsewhere

Documentation
The model's reference page
REST API
GET or POST /v1/models/fixed_income.money_market/run
MCP tool
run_model with the model's id, fixed_income.money_market. Connect an assistant
Command line
pyeconomics models run fixed_income.money_market --help

The worked example, from Python and from the command line:

Python
import pyeconomics

inputs = {
    "calculation": "price_from_discount",
    "days": 90,
    "discount_rate": 0.0761,
    "face_value": 100,
}
result = pyeconomics.run("fixed_income.money_market", inputs)
print(result.to_json())
Command line
pyeconomics models run fixed_income.money_market --inputs - <<'JSON'
{
  "calculation": "price_from_discount",
  "days": 90,
  "discount_rate": 0.0761,
  "face_value": 100
}
JSON