Two yield curvesDuas curvas de juros

Building the US surface from FRED and the Brazilian one from Tesouro Direto, then reading what the shape is saying. Every chart on this page is drawn from real cached data, and the full Python is here. Como montar a superfície americana a partir do FRED e a brasileira a partir do Tesouro Direto, e depois ler o que o formato está dizendo. Todo gráfico desta página vem de dado real em cache, e o Python completo está aqui.

My YouTube channel

My channel is where quantitative finance models get built from scratch, in Python, with real data and nothing hidden. Option pricing and the Greeks, volatility surfaces, portfolio optimisation, machine learning on market data, and rates work like this page. Each video walks through the reasoning first, then the code, then what the numbers actually said, including when they disagreed with the paper.

Most recent one is below, on volatility convexity. Different subject from this page, it sits here only as a sample of what the channel looks like.

Meu canal no YouTube

No meu canal os modelos de finanças quantitativas são construídos do zero, em Python, com dado real e nada escondido. Precificação de opções e as gregas, superfícies de volatilidade, otimização de carteira, machine learning sobre dado de mercado, e trabalho de juros como o desta página. Cada vídeo passa primeiro pelo raciocínio, depois pelo código, e depois pelo que os números de fato disseram, inclusive quando discordaram do paper.

O mais recente está abaixo, sobre convexidade de volatilidade. Assunto diferente do desta página, está aqui só como amostra de como o canal é.

Subscribe on YouTube Se inscrever no YouTube

A yield curve is one picture of the price of time. On the horizontal axis sits maturity, from one month to thirty years. On the vertical axis sits the annual rate a government pays to borrow for that long. Plot every month since 2016 side by side and the curve becomes a surface, which is what the two reels behind this page animate.

Both countries are covered here, and in a deliberate order. United States first, because the data arrives clean and the concepts are easier to see. Brazil second, because getting the same picture requires work that the American case hides from you completely.

Curva de juros é uma fotografia do preço do tempo. No eixo horizontal fica o prazo, de um mês a trinta anos. No eixo vertical fica a taxa anual que o governo paga para tomar emprestado por aquele prazo. Empilhando todos os meses desde 2016 a curva vira uma superfície, que é o que os dois reels por trás desta página animam.

Os dois países estão aqui, e a ordem é proposital. Estados Unidos primeiro, porque o dado chega limpo e os conceitos ficam fáceis de enxergar. Brasil depois, porque conseguir a mesma imagem exige um trabalho que o caso americano esconde por completo.

Part one, the American dataParte um, o dado americano

Federal Reserve Economic Data, known as FRED, is a public database run by the St. Louis Fed. It carries the Treasury constant maturity series, updated every business day, free, with no registration beyond an API key that takes a minute to request.

Two words in that sentence do the heavy lifting: constant maturity. No bond in the market actually has exactly ten years left. Treasury takes the bonds that do trade, fits a curve through them, and publishes what a hypothetical bond with exactly ten years to run would yield today. Tomorrow it publishes another one, also exactly ten years. Keep that idea in mind, because Brazil does not give it to you and the whole second half of this page is about rebuilding it by hand.

Federal Reserve Economic Data, o FRED, é um banco público mantido pelo Fed de St. Louis. Ele carrega as séries de constant maturity do Tesouro americano, atualizadas todo dia útil, de graça, sem cadastro além de uma chave de API que leva um minuto para pedir.

Duas palavras ali carregam o peso todo: constant maturity, prazo constante. Nenhum título no mercado tem exatamente dez anos pela frente. O Tesouro pega os papéis que de fato negociam, ajusta uma curva por cima deles, e publica quanto renderia hoje um título hipotético com exatamente dez anos de prazo. Amanhã publica outro, também de exatamente dez anos. Guarde essa ideia, porque o Brasil não entrega isso, e a segunda metade desta página é justamente reconstruir isso na mão.

What each field isO que é cada campo

SeriesSérie MaturityPrazo What it holdsO que carrega
DGS1MO1mShortest point. Tracks the Fed funds target almost exactly, so it is effectively the policy rate.Ponto mais curto. Acompanha quase exatamente a meta do Fed funds, então é na prática a taxa de política monetária.
DGS3MO3mStandard short leg of the recession spread the New York Fed publishes.Ponta curta padrão do spread de recessão que o Fed de Nova York publica.
DGS6MO, DGS16m, 1yWhere the market prices the next few meetings.Onde o mercado precifica as próximas reuniões.
DGS22yMost policy sensitive point on the whole curve. Moves on every dot plot.Ponto mais sensível à política monetária em toda a curva. Mexe a cada dot plot.
DGS3, DGS5, DGS73y, 5y, 7yBelly of the curve. Carries most of the curvature.Barriga da curva. Concentra quase toda a curvatura.
DGS1010yGlobal benchmark. Prices mortgages, discounts equities, anchors everything.Referência global. Precifica hipoteca, desconta ação, ancora todo o resto.
DGS20, DGS3020y, 30yLong end. Term premium and fiscal expectations live here, not policy.Ponta longa. Prêmio de prazo e expectativa fiscal moram aqui, política monetária não.
VIXCLS—Equity volatility close. Not a rate. Useful as context for why a month moved.Fechamento da volatilidade de ações. Não é taxa. Serve de contexto para explicar por que um mês se mexeu.
T10Y3M, T10Y2Y—Spreads FRED already computes. Handy for checking your own subtraction.Spreads que o FRED já calcula. Úteis para conferir a sua própria subtração.

Three practical notes. Values come as annual percent, so 4.55 means 4.55 percent and not 0.0455. Series are business daily and carry gaps on federal holidays, which arrive as missing values rather than as a repeated previous close. And a value of zero is never a real rate, it is a placeholder, so filter it out before it poisons a monthly average.

Três observações práticas. Os valores vêm em percentual ao ano, então 4,55 quer dizer 4,55 por cento e não 0,0455. As séries são diárias em dias úteis e têm buracos em feriado federal, que chegam como valor ausente e não como repetição do fechamento anterior. E valor zero nunca é taxa de verdade, é marcador de vazio, então filtre antes que ele contamine a média mensal.

Pulling itPuxando o dado

Whole download is nine calls and one resample. Monthly last observation is the right frequency for a surface: daily data would give a noisy mesh where each ridge is a single auction rather than a regime.

O download inteiro são nove chamadas e um resample. Última observação de cada mês é a frequência certa para uma superfície: dado diário daria uma malha nervosa, onde cada crista é um leilão isolado em vez de um regime.

from fredapi import Fred
import pandas as pd, numpy as np

MATS   = [1, 3, 6, 12, 24, 36, 60, 84, 120]          # months
SERIES = ["DGS1MO", "DGS3MO", "DGS6MO", "DGS1", "DGS2",
          "DGS3", "DGS5", "DGS7", "DGS10"]
START  = "2016-01-01"

fred = Fred(api_key=key)
df = pd.DataFrame({m: fred.get_series(s, observation_start=START)
                   for m, s in zip(MATS, SERIES)})
df["VIX"] = fred.get_series("VIXCLS", observation_start=START)

# Month end last print. interpolate covers holidays, it does not invent regimes.
df = (df.resample("ME").last()
        .interpolate(limit_direction="both")
        .dropna(how="all"))

# 10y minus 3m, the spread the NY Fed uses for its recession model
slope = df[120] - df[3]

That is the entire American pipeline. Nine series, one resample, one subtraction. Remember this length, because the Brazilian equivalent is about eighty lines and needs a nonlinear optimiser.

Esse é o pipeline americano inteiro. Nove séries, um resample, uma subtração. Guarde esse tamanho, porque o equivalente brasileiro tem umas oitenta linhas e precisa de um otimizador não linear.

Curve by monthA curva mês a mês

Drag the slider. Each frame is one month of the real FRED data, from January 2016 to the last cached observation. Watch 2019, then the flat floor of 2020 and 2021, then the whole thing lifting and folding over on itself through 2023.

Arraste o controle. Cada quadro é um mês real do FRED, de janeiro de 2016 até a última observação em cache. Repare em 2019, depois no chão achatado de 2020 e 2021, e depois em tudo subindo e dobrando sobre si mesmo ao longo de 2023.

MonthMês
US Treasury constant maturity, FRED. Ghost lines are the twelve preceding months. Constant maturity do Tesouro americano, FRED. As linhas fantasma são os doze meses anteriores.

InversionInversão

Normally longer money costs more, because lending for ten years carries more of everything that can go wrong than lending for three months. When that ordering breaks and the three month rate sits above the ten year, the curve is inverted.

Inversion is not a prophecy, it is an arithmetic statement about expectations. Long rates are roughly an average of expected short rates plus a premium. For the ten year to sit below the three month, the market has to believe short rates will be materially lower later, which usually means it expects the central bank to be cutting into a slowdown.

Shaded regions below are every month where the spread was negative.

Normalmente dinheiro mais longo custa mais caro, porque emprestar por dez anos carrega mais de tudo que pode dar errado do que emprestar por três meses. Quando essa ordem quebra e a taxa de três meses fica acima da de dez anos, a curva está invertida.

Inversão não é profecia, é uma afirmação aritmética sobre expectativa. Juro longo é aproximadamente uma média dos juros curtos esperados mais um prêmio. Para o dez anos ficar abaixo do três meses, o mercado precisa acreditar que o juro curto vai estar bem mais baixo lá na frente, o que em geral quer dizer que ele espera o banco central cortando dentro de uma desaceleração.

As faixas sombreadas abaixo são todos os meses em que o spread ficou negativo.

Ten year minus three month. Shaded where negative. Dez anos menos três meses. Sombreado onde negativo.

Part two, the four movementsParte dois, os quatro movimentos

Curves rarely shift in parallel. Almost every real move is a twist, and the market names twists with two words. First word says where rates went, second says what happened to the gap between long and short.

Bull means rates fell, because falling yields mean rising bond prices and bond traders name the move after the price. Bear means rates rose. Steepening means the long minus short gap widened. Flattening means it narrowed.

Curva quase nunca anda em paralelo. Praticamente todo movimento real é uma torção, e o mercado nomeia torção com duas palavras. A primeira diz para onde a taxa foi, a segunda diz o que aconteceu com a distância entre longo e curto.

Bull quer dizer que a taxa caiu, porque taxa caindo é preço de título subindo, e o operador de renda fixa batiza o movimento pelo preço. Bear quer dizer que a taxa subiu. Steepening é a distância entre longo e curto aumentando. Flattening é ela diminuindo.

MovementMovimento MechanicsMecânica Usually meansCostuma significar
Bull steepening Short falls more than longCurto cai mais que o longo Central bank is cutting or about to. Classic start of an easing cycle.Banco central cortando ou prestes a cortar. Começo clássico de ciclo de afrouxamento.
Bear flattening Short rises more than longCurto sobe mais que o longo Central bank is hiking and the market believes it will work. Path to inversion.Banco central subindo juro e o mercado acreditando que vai funcionar. Caminho para a inversão.
Bear steepening Long rises more than shortLongo sobe mais que o curto Fiscal risk, heavy issuance, long run inflation doubt. Policy is not driving this one.Risco fiscal, oferta pesada de dívida, dúvida sobre inflação de longo prazo. Aqui não é política monetária que manda.
Bull flattening Long falls more than shortLongo cai mais que o curto Flight to quality, or growth expectations deteriorating faster than policy responds.Fuga para qualidade, ou expectativa de crescimento piorando mais rápido do que a política reage.

Curve below is a Nelson Siegel, the same functional form used later to rebuild Brazil. Three parameters carry all four movements. Level sets the whole curve up or down, slope controls the gap between long and short, and curvature bows the belly. Press a movement and watch which handle turns.

A curva abaixo é uma Nelson Siegel, a mesma forma funcional usada mais adiante para reconstruir o Brasil. Três parâmetros carregam os quatro movimentos. Nível sobe ou desce a curva inteira, inclinação controla a distância entre longo e curto, e curvatura arqueia a barriga. Aperte um movimento e observe qual botão gira.

β0 levelnível
β1 slopeinclinação
β2 curvaturecurvatura
Nelson Siegel with τ fixed at 1.8 years. Dotted line is where the curve started, so you can see the twist rather than only the result. Nelson Siegel com τ fixo em 1,8 ano. A linha pontilhada é onde a curva estava, para você ver a torção e não só o resultado.
def ns(tau, b0, b1, b2, lam=1.8):
    """Nelson Siegel. Three betas, one decay.

    b0 is the level, the rate a very long bond converges to.
    b1 is the slope, and it loads hardest on the short end.
    b2 is the curvature, and it loads on the belly around lam.
    """
    x  = tau / lam
    g1 = np.where(x > 1e-9, (1 - np.exp(-x)) / x, 1.0)   # slope loading
    g2 = g1 - np.exp(-x)                                    # curvature loading
    return b0 + b1 * g1 + b2 * g2

Reason this form matters is that g1 starts at one and decays to zero, so b1 moves the short end and leaves the thirty year almost untouched. Meanwhile g2 starts at zero, peaks near lam, and returns to zero, so b2 bends the middle without moving either end. Three numbers, and the whole vocabulary of the previous table falls out of them.

Essa forma importa porque g1 começa em um e decai para zero, então b1 mexe na ponta curta e deixa o trinta anos quase intocado. Já g2 começa em zero, tem pico perto de lam, e volta a zero, então b2 entorta o meio sem mover nenhuma das duas pontas. Três números, e todo o vocabulário da tabela anterior sai deles.

Part three, BrazilParte três, o Brasil

No Brazilian FRED exists. There is no single endpoint that hands you a clean constant maturity series, and that absence changes the whole shape of the work.

What you get instead is Tesouro Direto, which publishes a daily file of every retail government bond with its price and its rate. It is real, it is free, it goes back years, and it is not a curve. It is a list of individual bonds.

Não existe FRED brasileiro. Não há um endpoint único que entregue uma série limpa de prazo constante, e essa ausência muda a forma do trabalho inteiro.

O que existe é o Tesouro Direto, que publica um arquivo diário com cada título público de varejo, com preço e taxa. É real, é de graça, tem anos de histórico, e não é uma curva. É uma lista de títulos individuais.

Why that is harderPor que isso é mais difícil

ProblemProblema What it does to youO que ele te causa
Fixed maturity dates, not fixed tenorsVencimento fixo, não prazo fixo Tesouro Prefixado 2029 has 3.4 years left today and 3.397 tomorrow. Your ten year column would drift down the curve over time. This is the single biggest difference from FRED.O Tesouro Prefixado 2029 tem 3,4 anos hoje e 3,397 amanhã. Sua coluna de dez anos escorregaria curva abaixo com o tempo. É a maior diferença em relação ao FRED.
Few points, unevenly spacedPoucos pontos, mal distribuídos Some days offer four usable prefixado maturities. FRED gives eleven tenors every single day.Alguns dias oferecem quatro vencimentos prefixados aproveitáveis. O FRED entrega onze prazos todo dia.
Brazilian CSV conventionsConvenções do CSV brasileiro Semicolon separator, comma decimal, day first dates. Read it with the default settings and every rate becomes text.Separador ponto e vírgula, decimal com vírgula, data com dia primeiro. Leia com o padrão e toda taxa vira texto.
Nothing at the very short endNada na ponta bem curta Retail bonds do not cover three months well, and the short end is exactly where policy lives. Selic has to be fetched separately and used as an anchor.Título de varejo não cobre bem três meses, e a ponta curta é justamente onde mora a política monetária. A Selic precisa ser buscada à parte e usada como âncora.
Central bank API has its own rulesA API do Banco Central tem regras próprias SGS caps a daily series at ten years per request, so you chunk. It also rejects a request with no browser style User Agent.O SGS limita série diária a dez anos por consulta, então você fatia. E recusa requisição sem User Agent de navegador.

Fetching SelicBuscando a Selic

Series 432 is the Selic target set by Copom. Two details will cost you an afternoon if nobody mentions them: the ten year cap per query, and the header.

A série 432 é a meta Selic definida pelo Copom. Dois detalhes custam uma tarde se ninguém avisa: o teto de dez anos por consulta, e o cabeçalho.

# SGS 432 = Selic target. Daily series is capped at 10y per query, so chunk it.
UA  = {"User-Agent": "Mozilla/5.0", "Accept": "application/json",
       "Referer": "https://www3.bcb.gov.br/"}
url = "https://api.bcb.gov.br/dados/serie/bcdata.sgs.432/dados"

chunks = [("01/01/2015", "31/12/2019"),
          ("01/01/2020", date.today().strftime("%d/%m/%Y"))]

parts = []
for di, dfim in chunks:
    for _ in range(4):                       # SGS drops requests under load
        r = requests.get(url, params={"formato": "json",
                         "dataInicial": di, "dataFinal": dfim},
                         headers=UA, timeout=60)
        if r.status_code == 200 and r.text.strip().startswith("["):
            d = pd.DataFrame(r.json())
            d["data"]  = pd.to_datetime(d["data"], dayfirst=True)
            d["valor"] = d["valor"].astype(float)
            parts.append(d.set_index("data")["valor"]); break
        time.sleep(3)

Fitting the curveAjustando a curva

Here is the step FRED performs for the United States and nobody performs for you in Brazil. For each date, take every prefixado bond trading that day, compute how many years each one has left, and fit a Nelson Siegel Svensson through the cloud. Svensson adds a second hump to Nelson Siegel, which matters because Brazilian curves bend twice more often than American ones.

Then read the fitted function at fixed tenors. Three months, six, one year, two, three, five, seven, ten. Those columns are your constant maturity, rebuilt.

Aqui está o passo que o FRED executa para os Estados Unidos e que ninguém executa para você no Brasil. Para cada data, pegue todo prefixado negociando naquele dia, calcule quantos anos faltam para cada um, e ajuste uma Nelson Siegel Svensson pela nuvem de pontos. A Svensson acrescenta uma segunda corcova à Nelson Siegel, o que importa porque curva brasileira dobra duas vezes com mais frequência que a americana.

Depois leia a função ajustada em prazos fixos. Três meses, seis, um ano, dois, três, cinco, sete, dez. Essas colunas são o seu prazo constante, reconstruído.

td = pd.read_csv(TESOURO, sep=";", decimal=",")          # BR conventions
td["Data Base"]       = pd.to_datetime(td["Data Base"], dayfirst=True)
td["Data Vencimento"] = pd.to_datetime(td["Data Vencimento"], dayfirst=True)

pref = td[td["Tipo Titulo"].isin(["Tesouro Prefixado",
          "Tesouro Prefixado com Juros Semestrais"])].copy()

# Time to maturity in years. This is the number FRED hides from you.
pref["ttm"]   = (pref["Data Vencimento"] - pref["Data Base"]).dt.days / 365.25
pref["yield"] = pref["Taxa Compra Manha"]
pref = pref[pref["ttm"] > 0.05]        # about to mature, price is noise

# One observation per month: the last trading day.
pref["ym"] = pref["Data Base"].dt.to_period("M")
last = pref.groupby("ym")["Data Base"].max()
pref = pref[pref["Data Base"].isin(last.values)]

rows = {}
for d, g in pref.groupby("Data Base"):
    pts = g[["ttm", "yield"]].drop_duplicates("ttm").sort_values("ttm").values
    if len(pts) < 4:                  # fewer than 4 points cannot pin 6 params
        continue
    st = selic.loc[selic.index <= d].iloc[-1]    # anchor the short end
    p  = fit_nss(pts[:, 0], pts[:, 1], st)
    rows[d] = nss(np.array(MATS) / 12.0, *p)      # read at fixed tenors

Selic anchor deserves a sentence of its own. Retail prefixado bonds thin out badly under one year, so a fit left to its own devices will send the three month point wherever the optimiser feels like. Adding the current Selic as a weighted observation at the very short end pins that corner to something real, and the rest of the curve stops swinging month to month for no reason.

A âncora da Selic merece uma frase própria. Prefixado de varejo rareia muito abaixo de um ano, então um ajuste solto manda o ponto de três meses para onde o otimizador quiser. Colocar a Selic corrente como observação ponderada na ponta bem curta prende aquele canto em algo real, e o resto da curva para de balançar de mês para mês sem motivo.

Final adjustmentsOs ajustes finais

Four smaller decisions separate a chart that looks right from one that is right.

  • Minimum four points per date. Svensson has six parameters. Fitting six parameters through three observations produces a curve that passes through every point and means nothing between them.
  • Drop anything under 0.05 years. A bond two weeks from maturity has a price driven by settlement mechanics, and its implied rate can be wildly off the curve.
  • Interpolate the monthly grid, do not extrapolate it. Missing months get filled between known months. Nothing is invented past either end.
  • Stop at the last closed month. An open month carries only a handful of trading days, and with that few observations the fit wanders: the August 2026 three month point came out at 12.97 against 14.16 at the July close, which is thin data reading as a move. Both countries end in July here, which also keeps the side by side comparison honest.

Quatro decisões menores separam um gráfico que parece certo de um que está certo.

  • Mínimo de quatro pontos por data. A Svensson tem seis parâmetros. Ajustar seis parâmetros com três observações produz uma curva que passa por todos os pontos e não significa nada entre eles.
  • Descartar qualquer coisa abaixo de 0,05 ano. Título a duas semanas do vencimento tem preço governado por mecânica de liquidação, e a taxa implícita pode sair muito fora da curva.
  • Interpolar a grade mensal, nunca extrapolar. Mês faltante é preenchido entre meses conhecidos. Nada é inventado além das pontas.
  • Parar no último mês fechado. Mês aberto tem um punhado de pregões, e com tão poucas observações o ajuste vagueia: o ponto de três meses de agosto de 2026 saiu em 12,97 contra 14,16 no fechamento de julho, que é dado ralo se passando por movimento. Aqui os dois países terminam em julho, o que também mantém honesta a comparação lado a lado.

Brazilian curve by monthA curva brasileira mês a mês

MonthMês
Tesouro Prefixado fitted with Nelson Siegel Svensson, anchored on Selic. Ghost lines are the twelve preceding months. Tesouro Prefixado ajustado com Nelson Siegel Svensson, ancorado na Selic. As linhas fantasma são os doze meses anteriores.

Steepening and fiscal eventsSteepening e eventos fiscais

Bear steepening is the Brazilian signature, and it is worth being precise about why. Copom controls the short end directly. Nobody controls the long end. When debt to GDP accelerates or a spending rule is bent, the ten year rises on its own, with the central bank touching nothing at all.

Watch for that in the panel below. Selic is the step function. Slope is the line. Whenever the line climbs while the steps stay flat, the long end moved without policy, and that is fiscal risk being repriced rather than monetary policy working.

Reverse pattern is equally readable. Through late 2021 and 2022, Copom was hiking hard and the slope collapsed into inversion, which is bear flattening: the market accepted that the tightening would be delivered and that rates would eventually come back down.

Bear steepening é a assinatura brasileira, e vale ser preciso sobre o motivo. O Copom controla a ponta curta diretamente. Ninguém controla a ponta longa. Quando a dívida sobre PIB acelera ou uma regra de gasto é flexibilizada, o dez anos sobe sozinho, sem o Banco Central tocar em absolutamente nada.

Procure isso no painel abaixo. A Selic é a função escada. A inclinação é a linha. Sempre que a linha sobe enquanto os degraus ficam parados, a ponta longa se mexeu sem política monetária, e ali é risco fiscal sendo reprecificado, não política monetária funcionando.

O padrão inverso é igualmente legível. Ao longo do fim de 2021 e de 2022 o Copom subia juro com força e a inclinação desabou até inverter, que é bear flattening: o mercado aceitou que o aperto seria entregue e que a taxa acabaria voltando a cair.

Brazil, ten year minus three month against the Selic target. Shaded where inverted. Brasil, dez anos menos três meses contra a meta Selic. Sombreado onde invertida.

Part four, side by sideParte quatro, lado a lado

Same measure, both countries, same window. Ten year minus three month. Mesma medida, os dois países, mesma janela. Dez anos menos três meses.
Since January 2016Desde janeiro de 2016 United StatesBrasil

Numbers in that table are computed from the same arrays the charts draw, so prose and picture cannot drift apart. Inversion episodes count entries into negative territory, not months spent there, which is why a long single inversion counts once.

Two contrasts carry the whole comparison. Brazilian rates move in a range several times wider, which is why the surface looks like terrain rather than a gentle slope. And Brazil spends noticeably more of its time inverted, which weakens the American reading of inversion as a rare recession signal. Here it is closer to a resting state, produced by a policy rate held high against a long end that carries a permanent fiscal premium.

Os números dessa tabela são calculados a partir dos mesmos vetores que desenham os gráficos, então texto e imagem não podem divergir. Episódios de inversão contam entradas em terreno negativo, e não meses passados lá, e é por isso que uma inversão longa e única conta uma vez só.

Dois contrastes carregam a comparação inteira. A taxa brasileira anda numa faixa várias vezes mais larga, e é por isso que a superfície parece relevo em vez de rampa suave. E o Brasil passa sensivelmente mais tempo invertido, o que enfraquece a leitura americana de inversão como sinal raro de recessão. Aqui é mais perto de um estado de repouso, produzido por um juro de política mantido alto contra uma ponta longa que carrega prêmio fiscal permanente.

SourcesFontes

  • Treasury constant maturity and VIX, FRED, St. Louis Fed.
  • Tesouro Prefixado daily prices and rates, Tesouro Direto.
  • Selic target, Banco Central do Brasil, SGS series 432.
  • Ibovespa and USDBRL, Yahoo Finance.
  • Curve fitting, Nelson Siegel Svensson via least squares.

Data on this page is cached, and the window is stated under each chart. Rerun the scripts to refresh.

  • Constant maturity do Tesouro americano e VIX, FRED, Fed de St. Louis.
  • Preços e taxas diárias do Tesouro Prefixado, Tesouro Direto.
  • Meta Selic, Banco Central do Brasil, série SGS 432.
  • Ibovespa e dólar, Yahoo Finance.
  • Ajuste de curva, Nelson Siegel Svensson por mínimos quadrados.

O dado desta página está em cache, e a janela está declarada sob cada gráfico. Rode os scripts de novo para atualizar.

On X

Follow me on X, my models are there

I post the models as I build them, the changes I make to them, and the results that did not work. Shorter than these write ups, and there are a lot more of them.

Follow me on X
Newsletter

Get exclusive models, prompts and code

One short email when there's something new. finance models, code walkthroughs, agentic prompts. No spam.

Built with
Anthropic Claude Python R ChatGPT GitHub Jupyter Excel PowerPoint VS Code SQL MATLAB