PROTECTED SOURCE SCRIPT
Cập nhật

Curva de Rendimiento AR | Argentina Yield Curve

1 506
Real-time Argentine fixed-income yield curve terminal. Four curve families plotted on a single canvas with Nelson-Siegel smoothing.

🔵 **LECAP** — 9 discount letters (Letras de Capitalización) via EcoValores library
🟢 **BONCAP** — 6 capitalisation bonds via EcoValores library
🟠 **BONCER** — 7 CER-adjusted zero-coupon bonds (TZX series) with inflation-projected yields
🟡 **Dollar Futures** — 12 MatbaRofex contracts with implied devaluation spread

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**How it works**

Add the indicator to any daily chart — the underlying symbol doesn't matter. All prices are fetched independently via `request.security()`. Yields are computed on a **T+1 settlement** basis (Plazo 24hs) and can be displayed as **TEM**, **TNA**, or **TEA**.

BONCER yields are projected by compounding a hardcoded valor técnico (VT) at a reference date forward to maturity using a monthly CPI assumption. CPI can be set manually or pulled live from `ECONOMICS:ARIRMM`.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**Features**

• **Nelson-Siegel curve fitting** with configurable λ grid search
• **Broker fee adjustment** (% of purchase price) on LECAP, BONCAP, and BONCER yields
• **Historical ghost curves** — overlay the curve from N bars ago with faded, color-matched dots and ticker labels
• **BCRA auction markers** — show cut rates from the last 1–3 licitación dates, with overlap grouping
• **Implied devaluation curve** — spread between Dollar Futures and LECAP Nelson-Siegel fits
• **Curve slope** — long minus short rate from the LECAP NS fit
• **Instrument data table** — optional per-bond breakdown showing yield, price, face, maturity, and days to maturity
• **DTM vertical lines** — dashed lines at each instrument's tenor, color-matched to curve type
• **Info table** — summary stats, NS parameters, USD spot rate, and legend

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**Inputs**

Curve Selection — toggle each curve family and the Nelson-Siegel fit independently
BONCER CER Projection — set projected monthly CPI % or enable ECONOMICS:ARIRMM live feed
Rate Convention — TEM / TNA / TEA selector and broker fee %
USD Spot Rate — MEP via AL30/AL30D arbitrage, FX_IDC:ARSUSD, or manual entry
BCRA Auctions — show 0–3 most recent licitación dates (hardcoded, update periodically)
Historical Comparison — ghost curve bars-ago offset and optional NS fill
Derived Metrics — slope and implied devaluation toggles
Visual — canvas width, max tenor, ticker labels, DTM lines, data table, label size
Nelson-Siegel Tuning — λ grid range and steps (defaults work for most cases)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**Maintenance**

Two data sets require periodic manual updates:

1. **BCRA Auctions** — add `array.push()` entries under the "BCRA AUCTION DATA" section with TEM yield, maturity date, label, and licitación timestamp.
2. **BONCER Valor Técnico** — update `CER_VT_REF_TS` and each `CER_VT_*` value from bonistas.com or your broker's daily report.

Both follow the same pattern: edit the hardcoded values in the script and save. Expired instruments are filtered automatically.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**Data sources**

LECAP / BONCAP prices and metadata: `EcoValores/Letras_Library/1`
BONCER prices: `BCBA:TZXM6`, `BCBA:TZX26`, `BCBA:TZXO6`, `BCBA:TZXD6`, `BCBA:TZX27`, `BCBA:TZXD7`, `BCBA:TZX28`
Argentina monthly CPI: `ECONOMICS:ARIRMM`
USD spot: `BCBA:AL30` / `BCBA:AL30D` or `FX_IDC:ARSUSD`
Dollar Futures: MatbaRofex contracts via EcoValores library

Total `request.security()` calls: 38 (limit ~40).

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**⚠️ Disclaimer**

This indicator is provided for **informational and educational purposes only**. It does NOT constitute investment advice, a recommendation, or an offer to buy or sell any security. BONCER yields are projections based on assumed future inflation and may differ substantially from realized returns. Data may be incomplete, delayed, or inaccurate. The authors assume no responsibility for any financial losses or decisions made based on this indicator. Always consult a licensed financial advisor before investing.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Curva de rendimiento de renta fija argentina en tiempo real. LECAP, BONCAP, BONCER cupón cero y Futuros de Dólar con ajuste Nelson-Siegel. Rendimientos calculados en base T+1 (Plazo 24hs). Soporta TEM, TNA y TEA, comisión de broker, marcadores de licitaciones BCRA, curvas históricas fantasma, devaluación implícita y tabla de datos por instrumento.
Phát hành các Ghi chú
Added BONCER CER zero-coupon curve (7 TZX bonds) as a fourth curve family. Yields projected from hardcoded valor tecnico + monthly CPI assumption, sourced manually or live from ECONOMICS:ARIRMM (enabled by default). Update VT periodically from bonistas.com or broker reports.

Added optional instrument data table (bottom-left) with per-bond yield, price, face value, maturity date, and days. Shows the active rate convention (TEM/TNA/TEA) and respects broker fee.

All yields now use T+1 settlement (Plazo 24hs) instead of trade date.

Broker fee renamed to "Broker Fee Letras/BONCER %" and now applies to BONCER in addition to LECAP and BONCAP. Futures unaffected.

New color scheme — brighter palette, BONCAP now red, BONCER green: LECAP #00bfff, BONCAP #ff1744, BONCER #00e676, Futures #ffd740.

Total request.security() calls: 38 (was 30).

---

Se agrego la curva BONCER cupon cero (7 bonos TZX) con rendimientos proyectados desde valor tecnico + IPC mensual (manual o ECONOMICS:ARIRMM). Nueva tabla de datos por instrumento. Rendimientos calculados en base T+1. Comision de broker extendida a BONCER. Nueva paleta de colores.
Phát hành các Ghi chú
ES:

Terminal de curva de rendimiento para renta fija argentina. Visualiza en tiempo real cuatro familias de curvas sobre un único canvas con estética Bloomberg:

LECAP (9 instrumentos) y BONCAP (5 instrumentos) vía librería EcoValores/Letras_Library
BONCER cupón cero (7 bonos TZX) con rendimientos proyectados desde valor técnico + IPC mensual (manual o ECONOMICS:ARIRMM)
Futuros de Dólar MatbaRofex (11 contratos) con tasa de devaluación implícita
Incluye ajuste Nelson-Siegel (optimización lambda por grilla), convenciones TEM/TNA/TEA, comisión de broker configurable, marcadores de licitaciones BCRA (últimas 1-3 fechas), comparación histórica con curvas fantasma y relleno NS, pendiente de curva, spread de devaluación implícita, líneas DTM por instrumento y tabla de datos detallada.

Todos los rendimientos calculados en base liquidación T+1 (Plazo 24hs). Tipo de cambio USD configurable: MEP (AL30/AL30D), FX_IDC:ARSUSD o manual.

Requiere la librería EcoValores/Letras_Library (datos de instrumentos actualizados periódicamente).

⚠️ Solo para fines informativos y educativos. No constituye asesoramiento de inversión.

EN:

Real-time Argentine fixed-income yield curve terminal. Renders four curve families on a single Bloomberg-style canvas with Nelson-Siegel smoothing, auction markers, and historical comparison:

LECAP (Letras de Capitalización): 9 discount bonds via EcoValores/Letras_Library
BONCAP (Bonos de Capitalización): 5 discount bonds via EcoValores/Letras_Library
BONCER zero-coupon (CER-adjusted): 7 TZX bonds with yields projected from hardcoded valor técnico + user-configurable monthly CPI assumption (or live ECONOMICS:ARIRMM feed)
Dollar Futures (MatbaRofex): 11 contracts showing implied devaluation rates vs. ARS spot
Features include Nelson-Siegel curve fitting via grid-search lambda optimization with OLS beta estimation (Cramer's rule), support for TEM/TNA/TEA rate conventions, configurable broker fee deduction from bond yields, BCRA auction yield markers filtered by the N most recent licitacion dates (0-3) with overlap grouping for same-maturity instruments, historical ghost curve overlay with color-matched dots and optional NS-based fill between current and past curves, LECAP curve slope indicator (long minus short), implied devaluation spread curve, per-instrument DTM vertical lines, and a detailed instrument data table showing yield, price, face value, maturity date, and days to maturity.

All yields computed on a T+1 settlement basis (Plazo 24hs). USD spot rate configurable via MEP (AL30/AL30D bond arbitrage), FX_IDC:ARSUSD cross-rate, or manual entry. Canvas width, max tenor, label size, and all visual elements are fully configurable.

Requires the EcoValores/Letras_Library (instrument data updated periodically after each public treasury auction).

⚠️ For informational and educational purposes only. Does not constitute investment advice. Consult a licensed financial advisor before making investment decisions.
Phát hành các Ghi chú
Resumen rápido (ES)
DTM ajustado a días hábiles BYMA: La liquidación T+1 ahora salta fines de semana y feriados nacionales (hardcodeados desde argentinadatos.com/v1/feriados/2026). Mejora la precisión del rendimiento los viernes y previo a feriados largos.
Nueva LECAP S17L6 (vto 17-Jul-2026, emitida en la licitación del 27-Mar-2026, TEM 2.16%) — la curva LECAP pasa de 9 a 10 instrumentos.
DLRH2026 removida — el contrato venció el 31-Mar-2026; la curva de futuros ahora tiene 10 contratos activos.
Marcador de licitación 27-Mar-2026 agregado al array de auctions.
What's new in this update (EN)
🗓️ T+1 settlement now uses BYMA trading days
DTM (days-to-maturity) calculations now skip weekends and Argentine national holidays when computing the settlement date for Plazo 24hs. Previously the script used a fixed +1 calendar day offset, which over-counted days when the trade fell on a Friday or before a feriado, slightly distorting yields. The new logic walks forward to the next real BYMA business day before computing DTM. Holidays are hardcoded from the official argentinadatos.com/v1/feriados/2026 feed and used as a proxy for BYMA non-trading days. Update annually at year-start by replacing the BYMA_HOLIDAYS array.

📊 New LECAP S17L6 added to the curve
Added the new LECAP S17L6 (maturity 17-Jul-2026), issued in the Tesoro auction of 27-Mar-2026 with a TEM cut-off of 2.16% / TIREA 29.23%. The LECAP curve now plots 10 instruments (was 9), providing a denser short-end of the peso fixed-rate curve.

💵 Removed expired dollar future DLRH2026
The MatbaRofex contract DLRH2026 (expiry 31-Mar-2026) has been removed since it has already settled. The dollar futures curve now shows 10 active contracts (DLRJ2026 → DLRF2027) instead of 11.

🔨 New BCRA auction marker — Licitación 27-Mar-2026
Added the latest auction entry to the BCRA AUCTION DATA array. With "Show last N auctions" set to 3, the most recent auctions visible are now: 27-Mar, 12-Mar, and 11-Feb. The auction yield markers now correctly anchor to the new S17L6 maturity point.

📦 Library dependency
This release depends on a new version of the EcoValores/Letras_Library (LECAP/BONCAP/Futures data backbone) which has been republished with the same set of additions and removals. The import line was bumped accordingly.
Phát hành các Ghi chú
Resumen rápido (ES)
DTM ajustado a días hábiles BYMA: La liquidación T+1 ahora salta fines de semana y feriados nacionales (hardcodeados desde argentinadatos.com/v1/feriados/2026). Mejora la precisión del rendimiento los viernes y previo a feriados largos.
Nueva LECAP S17L6 (vto 17-Jul-2026, emitida en la licitación del 27-Mar-2026, TEM 2.16%) — la curva LECAP pasa de 9 a 10 instrumentos.
DLRH2026 removida — el contrato venció el 31-Mar-2026; la curva de futuros ahora tiene 10 contratos activos.
Marcador de licitación 27-Mar-2026 agregado al array de auctions.
What's new in this update (EN)
🗓️ T+1 settlement now uses BYMA trading days
DTM (days-to-maturity) calculations now skip weekends and Argentine national holidays when computing the settlement date for Plazo 24hs. Previously the script used a fixed +1 calendar day offset, which over-counted days when the trade fell on a Friday or before a feriado, slightly distorting yields. The new logic walks forward to the next real BYMA business day before computing DTM. Holidays are hardcoded from the official argentinadatos.com/v1/feriados/2026 feed and used as a proxy for BYMA non-trading days. Update annually at year-start by replacing the BYMA_HOLIDAYS array.

📊 New LECAP S17L6 added to the curve
Added the new LECAP S17L6 (maturity 17-Jul-2026), issued in the Tesoro auction of 27-Mar-2026 with a TEM cut-off of 2.16% / TIREA 29.23%. The LECAP curve now plots 10 instruments (was 9), providing a denser short-end of the peso fixed-rate curve.

💵 Removed expired dollar future DLRH2026
The MatbaRofex contract DLRH2026 (expiry 31-Mar-2026) has been removed since it has already settled. The dollar futures curve now shows 10 active contracts (DLRJ2026 → DLRF2027) instead of 11.

🔨 New BCRA auction marker — Licitación 27-Mar-2026
Added the latest auction entry to the BCRA AUCTION DATA array. With "Show last N auctions" set to 3, the most recent auctions visible are now: 27-Mar, 12-Mar, and 11-Feb. The auction yield markers now correctly anchor to the new S17L6 maturity point.

📦 Library dependency
This release depends on a new version of the EcoValores/Letras_Library (LECAP/BONCAP/Futures data backbone) which has been republished with the same set of additions and removals. The import line was bumped accordingly.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.