cert-machine · certified decisions · Tesouro Direto

Tesouro Direto prices re-decided from the official rule table

PU Verificado

Tesouro Direto publishes a price for every federal bond it sells, every business day, and the Treasury publishes the formula that produces it — down to a table saying which intermediate value is truncated and which is rounded, and at how many decimals. So each published price has exactly one value under its own rule. This page re-decides every fixed-rate price in the public history, 111,101 of them, in exact arithmetic: 110,176 are the rule’s value to the centavo, 887 are not, 0 could not be decided. The conventions the publisher follows but does not print — which day a purchase settles, whether the centavos are cut or rounded — are measured, not assumed.

The pinned history precotaxatesourodireto.csv (Tesouro Transparente, ODbL; 55,588 rows of Tesouro Prefixado = LTN and Tesouro Prefixado com Juros Semestrais = NTN-F, 2004-12-31 to 2026-10-15, 61 titles), the ANBIMA national-holiday file to 2099, and the STN methodology of 29/04/2024 whose Tabela 3 is the rule (= ANBIMA 2021 §22), every byte sha256-pinned in corpus/pu/PINS.json. Pre-registered in corpus/pu/preregistration.json, with 2 dated amendments. Both sides of every row (compra, venda) under the pre-registered settlement hypotheses and printed readings. Phase A: fixed-rate titles only; the indexed titles (Selic, IPCA+), ANBIMA’s secondary-market prices and B3’s are phase B.

tl;dr
  • The finding. 99.17% of 111,101 prices are the rule’s value to the centavo. The census decides the conventions: a purchase settles on the next business day (D+1, 54,932 buy-side prices, the whole history); a sale settled on the next business day too until 2021-09-10 (42,728 prices) and on the quotation day since (D+0, 14,235 prices; every sell-side price from 2022 on); and the centavos are the 6-decimal price truncated, never rounded (55,005 prices reproduce only under truncation; 1 only under rounding). 17,911 prices reproduce only under the calendar in force on the day they were published: 20 November became a national holiday on 2023-12-21 (Lei 14.759), today’s holiday file carries it from 2024 on, and every earlier quotation of a title maturing after 2024 was priced without it — one business day more per weekday 20 November between settlement and maturity. The data place the publisher’s switch to the new calendar at the quotation of 2023-12-26 (the last quotation priced on the old calendar: 2023-12-22). 259 buy-side prices reproduce only when 24 and 31 December are skipped as settlement days — days the published calendar omits by its own note. 887 prices are OFF: not the rule’s value under any pre-registered settlement; 0 REFUSED (the enclosure straddled a truncation boundary). Each is listed with its exact value and the difference in centavos.
  • The mechanism. Every step of the Treasury’s formula is exact: business days on the pinned calendar, the rate truncated at 6 decimals, the exponent du/252 truncated at 14, each NTN-F flow rounded at 9, the price truncated at 6. The one irrational step, (1 + taxa)^(du/252), is an enclosure — BigInt fixed point with every series remainder bounded — and each truncation is a decision from the two ends or a refusal. A second decider in Python (decimal, 60 digits, directed rounding; no shared code) re-derives every OFF and REFUSED row and a seeded sample (2,387/2,387 agree). The methodology’s own worked examples (LTN 753.315323, NTN-F 903.075616 with its twelve flows) are reproduced digit for digit before any row is decided.
  • Check it. node tools/run-pu-ledger.js (about ten minutes on a laptop) · node instruments/pu/battery.js — 13 checks, 7 red controls · python3 -I instruments/pu/decide.py re-decides the worked examples with no engine present.
prices decided
111,101
LTN + NTN-F, buy and sell, 2004 → 2026-10-15
reproduced
99.17%
110,176 prices equal the rule’s value truncated to the centavo
off
887
not the rule’s value under any pre-registered settlement — each listed below
refused
0
the enclosure straddled a truncation boundary; not claimed either way
cross-checked
2,387/2,387
rows re-derived by the Python decider; every OFF and REFUSED row included
§1 · the atlas

Every title, every day, one verdict

2005 2007 2009 2011 2013 2015 2017 2019 2021 2023 2025 LTN 2005-01 2005-10 2006-07 2007-04 2008-01 2008-10 2009-07 2010-07 2012-01 2015-01 2018-01 2021-01 2024-07 2027-01 2031-01 NTN-F 2008-01 2011-01 2014-01 2023-01 2029-01 2035-01
Rows: the 61 fixed-rate titles by maturity; x: quotation days from 2004-12-31. A thin faint line is a run of REPRODUCED prices (buy side, D+1, today’s calendar); a brighter line is a run that reproduces only under the calendar in force on the quotation day (no 20 November holiday after 2023); a heavier bar is a run that reproduces only with 24 and 31 December skipped as settlement days; a diamond is an OFF price; a slash is a REFUSED one. Weight and shape carry the verdict; the one semantic hue marks OFF.

The field is the result: an almost uniform texture of reproduced prices, with the exceptions where they are. The buy side is drawn because it carries the settlement convention; the sell side (D+0) reproduces at 99.01% and its exceptions are in the table of §3.

§2 · the census

The conventions the publisher follows, measured

Three things the methodology does not say about Tesouro Direto’s published prices were pre-registered as hypotheses and decided row by row: on which day a purchase and a sale settle, and how a 6-decimal price becomes the 2-decimal one printed. The census answers: buy D+1 across the whole history; sell D+1 until 2021-09-10, sell D+0 since — a change of settlement convention made during 2021 and not printed beside the price (752 sell-side prices of 2021 reproduce only under D+0, every one from 2022 on; 27 earlier prices do too, on 6 days where both settlements were quoted); centavos truncated throughout. Where every hypothesis fails, the row is OFF; the table shows how many, by year.

yearbuy pricesbuy D+1of which old calendar onlybuy D+1 skipping 24/31 Decbuy OFFsell pricessell D+1sell D+0of which old calendar onlysell OFF
20047700077000
20052,1852,17300122,1852,1740011
20062,8832,87200112,8832,8650018
20073,5393,50703023,5393,5020037
20083,6313,587027113,6313,54421066
20093,0743,05302013,0743,0530021
20102,5832,555018102,5832,5540029
20112,3392,3300092,3392,3290010
20122,1132,09701602,1132,0970016
20131,9971,959014241,9971,9590038
20141,9891,8942258861,9891,894122494
20151,9541,9152468301,9541,915124538
20162,4492,4254750232,4492,425447423
20172,1952,1704880252,1952,170048825
20182,4122,36170419342,4122,36121869851
20192,4782,43574119262,4782,43524573543
20202,6842,6661,1882002,6842,6662491,18115
20212,4462,4111,22219162,4461,6789221,29916
20222,6792,6711,673072,68002,6801,9300
20232,2322,2231,715092,23232,2321,9600
20242,8102,79002002,8103512,81000
20252,7062,68502102,7062772,70600
20262,1462,1460002,1464692,14600

A calendar is dated. The pinned holiday file is the one ANBIMA serves today, and it carries a holiday that did not exist when most of these prices were published: 20 November, national since Lei 14.759 of 21 December 2023. A quotation of 2019 for a title maturing in 2029 was priced with the calendar of 2019, in which 2024, 2025, 2026 and 2028 each had one more business day than today’s file says (2027’s 20 November is a Saturday). Re-decided with today’s calendar those prices are OFF by exactly that many days; re-decided with the calendar as of the quotation they are the rule’s value to the centavo. The pre-registration’s second amendment added that hypothesis after the full run showed the pattern (du + 1 for 2025 maturities, + 2 for 2026, + 4 for 2029 on a seeded sample of 30 rows); the rows that need it are the brighter lines in the atlas and the “calendar as of quote only” columns here. Around the law’s date the census reads, per quotation day, how many rows reproduce only under today’s calendar and how many only under the old one; the last day priced on the old calendar is 2023-12-22 and the first priced on the new one is 2023-12-26.

The settlement skip: Tesouro Direto quotes on 24 and 31 December but does not settle on them, and the ANBIMA holiday file says in its own notes that it lists only days that close bank reserves and omits the last business day of the year. The amendment of 2026-10-16 in the pre-registration added that hypothesis after the first 4,000 rows showed it; the rows that need it are counted apart, never folded into the primary count.

§3 · the slips

887 published prices that are not their rule’s value

0 90 180 2004 0 2005 23 2006 29 2007 39 2008 77 2009 22 2010 39 2011 19 2012 16 2013 62 2014 180 2015 68 2016 46 2017 50 2018 85 2019 69 2020 15 2021 32 2022 7 2023 9 2024 0 2025 0 2026 0
OFF prices per quotation year, both sides. A slip is the publisher’s printed number differing from its own methodology’s value for its own published rate; it is not a refutation of the methodology.
titlequotedsiderate % a.a.printedthe rule’s value (T-6), at D1diff ¢under the other settlements
LTN 2029-01-012023-12-28buy10,16618.08617.84698724D0 2023-12-28: 617.609790
D0/pre 2023-12-28: 616.661912
D1/pre 2023-12-29: 616.898745
LTN 2024-07-012023-12-28buy10,60951.63951.25306238D0 2023-12-28: 950.872826
LTN 2025-01-012023-12-28buy9,91909.49909.15325934D0 2023-12-28: 908.812420
D0/pre 2023-12-28: 908.471710
D1/pre 2023-12-29: 908.812420
LTN 2026-01-012023-12-28buy9,69830.81830.51435030D0 2023-12-28: 830.209594
D0/pre 2023-12-28: 829.600417
D1/pre 2023-12-29: 829.904950
NTN-F 2033-01-012023-12-28buy10,32985.031033.445435-4841D0 2023-12-28: 1033.042736
D0/pre 2023-12-28: 1031.180287
D1/pre 2023-12-29: 1031.582260
NTN-F 2031-01-012023-12-28buy10,26990.501038.912495-4841D0 2023-12-28: 1038.509908
D0/pre 2023-12-28: 1036.830767
D1/pre 2023-12-29: 1037.232703
NTN-F 2027-01-012023-12-28buy9,831004.821053.241424-4842D0 2023-12-28: 1052.849610
D0/pre 2023-12-28: 1051.875345
D1/pre 2023-12-29: 1052.266797
NTN-F 2025-01-012023-12-28buy9,97999.941048.355370-4841D0 2023-12-28: 1047.960076
D0/pre 2023-12-28: 1047.600870
D1/pre 2023-12-29: 1047.996029
NTN-F 2029-01-012023-12-28buy10,10998.331046.739699-4840D0 2023-12-28: 1046.340109
D0/pre 2023-12-28: 1045.099695
D1/pre 2023-12-29: 1045.498812
LTN 2029-01-012022-12-29buy12,75488.13488.834672-70D0 2022-12-29: 488.601943
D0/pre 2022-12-29: 487.672137
D1/pre 2022-12-30: 487.904423
LTN 2024-07-012022-12-29buy12,93835.28834.88037240D0 2022-12-29: 834.477613
NTN-F 2025-01-012022-12-29buy12,60958.001006.726257-4872D0 2022-12-29: 1006.252282
D0/pre 2022-12-29: 1005.862822
D1/pre 2022-12-30: 1006.336613
NTN-F 2029-01-012022-12-29buy12,70895.69945.288906-4959D0 2022-12-29: 944.840528
D0/pre 2022-12-29: 943.610004
D1/pre 2022-12-30: 944.057797
NTN-F 2031-01-012022-12-29buy12,68875.21925.184370-4997D0 2022-12-29: 924.746180
D0/pre 2022-12-29: 923.152679
D1/pre 2022-12-30: 923.590115
NTN-F 2027-01-012022-12-29buy12,60924.80974.171817-4937D0 2022-12-29: 973.713169
D0/pre 2022-12-29: 972.692964
D1/pre 2022-12-30: 973.151131
NTN-F 2033-01-012022-12-29buy12,69857.69907.783619-5009D0 2022-12-29: 907.353351
D0/pre 2022-12-29: 905.641613
D1/pre 2022-12-30: 906.071070
NTN-F 2031-01-012021-08-16buy10,33995.01996.570310-156D0 2021-08-16: 996.181621
D0/pre 2021-08-16: 994.846431
D1/pre 2021-08-17: 995.234598
NTN-F 2031-01-012021-08-16sell10,45988.30989.477070-117D0/pre 2021-08-16: 988.139679
D1 2021-08-17: 989.867413
D1/pre 2021-08-17: 988.529494
LTN 2024-07-012021-07-08buy8,27790.64790.39641225D0 2021-07-08: 790.147232
LTN 2024-07-012021-07-08sell8,39788.06787.55694551D1 2021-07-09: 787.808771
LTN 2023-01-012021-07-08buy7,32900.96900.71573025D0 2021-07-08: 900.463261
LTN 2023-01-012021-07-08sell7,44899.48898.97103451D1 2021-07-09: 899.227072
LTN 2022-01-012021-07-08buy5,70973.73973.51948622D0 2021-07-08: 973.305356
LTN 2022-01-012021-07-08sell5,82973.20972.76647444D1 2021-07-09: 972.984867
NTN-F 2025-01-012021-07-08buy8,241052.841052.7676348D0 2021-07-08: 1052.436896
D0/pre 2021-07-08: 1052.186684
D1/pre 2021-07-09: 1052.517343
NTN-F 2025-01-012021-07-08sell8,361049.311048.90172241D0/pre 2021-07-08: 1048.648984
D1 2021-07-09: 1049.235962
D1/pre 2021-07-09: 1048.983144
NTN-F 2031-01-012021-07-08buy9,261048.391049.319311-92D0 2021-07-08: 1048.950614
D0/pre 2021-07-08: 1047.654814
D1/pre 2021-07-09: 1048.023056
NTN-F 2031-01-012021-07-08sell9,381041.021041.580911-56D0/pre 2021-07-08: 1040.281561
D1 2021-07-09: 1041.951556
D1/pre 2021-07-09: 1040.651744
NTN-F 2023-01-012021-07-08buy7,271038.371038.08588129D0 2021-07-08: 1037.796828
NTN-F 2023-01-012021-07-08sell7,391036.741036.15431959D1 2021-07-09: 1036.447513
NTN-F 2029-01-012021-07-08buy8,961057.471058.057836-58D0 2021-07-08: 1057.697609
D0/pre 2021-07-08: 1056.758303
D1/pre 2021-07-09: 1057.118210
NTN-F 2029-01-012021-07-08sell9,081051.091051.310937-22D0/pre 2021-07-08: 1050.366955
D1 2021-07-09: 1051.673582
D1/pre 2021-07-09: 1050.729275
NTN-F 2027-01-012021-07-08buy8,701056.471056.855672-38D0 2021-07-08: 1056.505871
D0/pre 2021-07-08: 1055.778627
D1/pre 2021-07-09: 1056.128187
NTN-F 2027-01-012021-07-08sell8,821051.381051.407915-2D0/pre 2021-07-08: 1050.675404
D1 2021-07-09: 1051.760634
D1/pre 2021-07-09: 1051.027877
LTN 2023-01-012021-01-22buy5,39903.71903.52306919D0 2021-01-22: 903.334864
LTN 2023-01-012021-01-22sell5,51901.73901.34637039D1 2021-01-25: 901.538232
LTN 2022-01-012021-01-22buy3,36969.65969.52445713D0 2021-01-22: 969.397320
LTN 2022-01-012021-01-22sell3,48968.60968.34004126D1 2021-01-25: 968.471499
NTN-F 2023-01-012021-01-22buy5,251089.921089.70405022D0 2021-01-22: 1089.482809
NTN-F 2023-01-012021-01-22sell5,371087.691087.24177845D1 2021-01-25: 1087.467480
NTN-F 2029-01-012021-01-22buy7,581145.341145.855017-51D0 2021-01-22: 1145.522837
D0/pre 2021-01-22: 1144.676041
D1/pre 2021-01-25: 1145.007975
NTN-F 2029-01-012021-01-22sell7,701137.951138.141456-19D0/pre 2021-01-22: 1137.288928
D1 2021-01-25: 1138.476532
D1/pre 2021-01-25: 1137.623753
NTN-F 2031-01-012021-01-22buy7,881147.521148.382952-86D0 2021-01-22: 1148.037353
D0/pre 2021-01-22: 1146.838905
D1/pre 2021-01-25: 1147.184143
NTN-F 2031-01-012021-01-22sell8,001138.961139.471338-51D0/pre 2021-01-22: 1138.267709
D1 2021-01-25: 1139.819387
D1/pre 2021-01-25: 1138.615390
NTN-F 2027-01-012021-01-22buy7,141138.741139.066314-32D0 2021-01-22: 1138.754622
D0/pre 2021-01-22: 1138.124835
D1/pre 2021-01-25: 1138.436355
NTN-F 2027-01-012021-01-22sell7,261132.781132.791962-1D0/pre 2021-01-22: 1132.156110
D1 2021-01-25: 1133.107055
D1/pre 2021-01-25: 1132.471027
NTN-F 2025-01-012021-01-22buy6,471123.501123.4331167D0 2021-01-22: 1123.153660
D0/pre 2021-01-22: 1122.949723
D1/pre 2021-01-25: 1123.229127
NTN-F 2025-01-012021-01-22sell6,591119.251118.89612236D0/pre 2021-01-22: 1118.689437
D1 2021-01-25: 1119.179521
D1/pre 2021-01-25: 1118.972784
LTN 2023-01-012020-12-30sell4,48916.39916.08057031D1 2020-12-31: 916.239900
LTN 2022-01-012020-12-30sell2,93971.64971.42272122D1 2020-12-31: 971.534052
NTN-F 2031-01-012020-12-30sell7,011207.211256.499394-4928D0/pre 2020-12-30: 1255.350877
D1 2020-12-31: 1256.837259
D1/pre 2020-12-31: 1255.688433
NTN-F 2029-01-012020-12-30sell6,691197.261246.226328-4896D0/pre 2020-12-30: 1245.430609
D1 2020-12-31: 1246.546616
D1/pre 2020-12-31: 1245.750692
NTN-F 2025-01-012020-12-30sell5,551152.911201.385300-4847D0/pre 2020-12-30: 1201.204118
D1 2020-12-31: 1201.642837
D1/pre 2020-12-31: 1201.461616
NTN-F 2027-01-012020-12-30sell6,301177.121225.925334-4880D0/pre 2020-12-30: 1225.343522
D1 2020-12-31: 1226.222584
D1/pre 2020-12-31: 1225.640631
NTN-F 2023-01-012020-12-30sell4,401102.921151.343609-4842D1 2020-12-31: 1151.540357
LTN 2022-01-012020-12-23sell2,97970.81970.59285622D1 2020-12-24: 970.705588
LTN 2023-01-012020-12-23sell4,52915.05914.73741932D1 2020-12-24: 914.897905
LTN 2021-01-012020-12-23sell2,07999.67999.51229316D1 2020-12-24: 999.593561
NTN-F 2023-01-012020-12-23sell4,451149.951149.56107539D1 2020-12-24: 1149.759703
NTN-F 2031-01-012020-12-23sell7,141244.591245.070237-48D0/pre 2020-12-23: 1243.915514
D1 2020-12-24: 1245.411029
D1/pre 2020-12-24: 1244.255990
NTN-F 2029-01-012020-12-23sell6,831235.511235.672339-16D0/pre 2020-12-23: 1234.869401
D1 2020-12-24: 1235.996346
D1/pre 2020-12-24: 1235.193197
NTN-F 2021-01-012020-12-23sell2,261048.431048.25092218D1 2020-12-24: 1048.343889
NTN-F 2025-01-012020-12-23sell5,671196.171195.83518934D0/pre 2020-12-23: 1195.651195
D1 2020-12-24: 1196.096929
D1/pre 2020-12-24: 1195.912895
LTN 2022-01-012019-12-30sell5,41900.36899.98728438D1 2019-12-31: 900.175470
LTN 2023-01-012019-12-30sell5,94841.62841.23927139D1 2019-12-31: 841.431919
LTN 2021-01-012019-12-30sell4,66955.64955.30219234D1 2019-12-31: 955.474871
NTN-F 2025-01-012019-12-30sell6,501143.161191.571598-4841D0/pre 2019-12-30: 1191.380179
D1 2019-12-31: 1191.869409
D1/pre 2019-12-31: 1191.677942
NTN-F 2021-01-012019-12-30sell4,641050.221098.635953-4841D1 2019-12-31: 1098.833706
NTN-F 2029-01-012019-12-30sell6,931198.071246.976459-4890D0/pre 2019-12-30: 1246.219326
D1 2019-12-31: 1247.308061
D1/pre 2019-12-31: 1246.550727
NTN-F 2027-01-012019-12-30sell6,811170.441219.184046-4874D0/pre 2019-12-30: 1218.612824
D1 2019-12-31: 1219.502824
D1/pre 2019-12-31: 1218.931452
NTN-F 2023-01-012019-12-30sell5,891108.241156.526053-4828D1 2019-12-31: 1156.788736
LTN 2022-01-012019-12-23sell5,47898.58898.20399338D1 2019-12-24: 898.393835
LTN 2020-01-012019-12-23sell4,54999.29998.94342535D1 2019-12-24: 999.119443
LTN 2023-01-012019-12-23sell6,04838.47838.08415839D1 2019-12-24: 838.279223
LTN 2021-01-012019-12-23sell4,71954.49954.14691335D1 2019-12-24: 954.321192
NTN-F 2025-01-012019-12-23sell6,621185.471185.06220041D0/pre 2019-12-23: 1184.868646
D1 2019-12-24: 1185.363681
D1/pre 2019-12-24: 1185.170078
NTN-F 2021-01-012019-12-23sell4,681097.841097.44527940D1 2019-12-24: 1097.644483
NTN-F 2029-01-012019-12-23sell7,081234.801234.899657-9D0/pre 2019-12-23: 1234.136771
D1 2019-12-24: 1235.234920
D1/pre 2019-12-24: 1234.471826
NTN-F 2027-01-012019-12-23sell6,941210.351210.2875367D0/pre 2019-12-23: 1209.711232
D1 2019-12-24: 1210.609832
D1/pre 2019-12-24: 1210.033373
NTN-F 2023-01-012019-12-23sell5,991153.181152.65517353D1 2019-12-24: 1152.921296

The first 80 of 887 rows; every row is in certs/pu-ledger.json (offRows). A difference of a few centavos with the sign of a later settlement is a settlement-day convention; a difference of about R$ 48 on an NTN-F quoted on the last business day of the year is a coupon gone ex because settlement crossed 1 January. Of the 887 rows, 664 are quotations whose next business day on the pinned calendar is a day the São Paulo exchange did not settle on — 25 January, 9 July and 20 November, which B3 observed as local holidays in those years, or 24 and 31 December — or sit in the last week of a year. The pattern says the settlement calendar is B3’s and not the bank calendar the methodology counts du on; B3’s historical trading calendar is not among the pinned sources, so these rows stay OFF here and the hypothesis is named for phase B. What is claimed: the printed number is not the methodology’s value for the printed rate on the pinned calendar under the pre-registered settlements. What is not claimed: that the publisher erred — a settlement rule or a calendar the publisher used and did not publish is a NEEDS DATA reading, and the pre-registration names it as such.

§4 · the certificate

One price, every step

The methodology’s own LTN example, re-decided here with every truncation shown. Maturity 01/07/2010, settlement 21/05/2008, rate 14,3600% a.a.

And the first OFF row of the ledger: LTN 2029-01-01 quoted 2023-12-28 (buy), rate 10,16%, printed R$ 618.08.

§5 · what this is, and is not

Scope, limits, and what comes next