OPEN-SOURCE SCRIPT
ที่อัปเดต:

Argentina Bonds TIR - Sovereign Bond Yield Curves Indicator

1 422
# Argentina Bonds TIR

A comprehensive indicator that calculates the Internal Rate of Return (IRR/TIR) for Argentine sovereign bonds and projects future price curves at fixed yield levels.

## Features

**Real-time TIR Calculation**
- Calculates current yield based on market price and expected cashflows
- Uses Newton-Raphson iterative method for precise IRR calculation
- Day count convention: Actual/365 with T+1 settlement

**Automatic Currency Conversion**
- Works with any trading currency: ARS, USD MEP (D suffix), USD Cable (C suffix)
- Automatically converts prices using AL30/AL30D/AL30C ratios
- Bonares use MEP conversion, Globales use Cable conversion

**Yield Curve Projections**
- Projects price curves 150 bars into the future (configurable)
- Fixed TIR lines at 7%, 8%, 9%, 10%, 11%, 12% (each toggleable)
- Current TIR line showing price trajectory at current yield
- Custom TIR line with user-defined yield value

**Clear Labeling**
- Labels positioned near current date for easy reading (configurable offset)
- Color-coded lines for quick identification
- Info panel showing bond details, prices, TIR, and exchange rates

## Supported Bonds

**Bonares** (Argentina legislation, USD MEP): AE38, AL29, AL30, AL35, AL41, AN29

**Globales** (Foreign legislation, USD Cable): GD29, GD30, GD35, GD38, GD41, GD46

## How to Use

1. Apply indicator to any supported bond symbol (e.g., BCBA:AL30D, BCBA:GD35C)
2. The indicator auto-detects bond type and currency
3. View current TIR in the info panel
4. Use projected lines to visualize price targets at different yield levels
5. Toggle individual TIR lines on/off as needed
6. Add a custom TIR line for specific yield analysis

## Settings

**Display**: Show/hide current TIR line, projection bars (30-300), label offset in days

**Fixed TIR Lines**: Individual toggles for 7%, 8%, 9%, 10%, 11%, 12%

**Custom TIR**: Enable custom TIR line, set value (%), choose color

**Colors**: Customize colors for all lines

## Info Panel

Shows bond ticker, type (Bonar/Global), trading currency, current price, native price, current TIR percentage, MEP and CCL exchange rates.

---

## Español

Indicador que calcula la Tasa Interna de Retorno (TIR) para bonos soberanos argentinos y proyecta curvas de precios futuros a niveles fijos de rendimiento.

### Características
- Cálculo de TIR en tiempo real usando método Newton-Raphson
- Conversión automática de moneda (ARS, USD MEP, USD Cable)
- Líneas de TIR fijas al 7%, 8%, 9%, 10%, 11%, 12%
- Línea de TIR personalizada configurable
- Panel informativo con detalles del bono y tipos de cambio

### Bonos Soportados
- **Bonares** (USD MEP): AE38, AL29, AL30, AL35, AL41, AN29
- **Globales** (USD Cable): GD29, GD30, GD35, GD38, GD41, GD46

---

**DISCLAIMER**: This indicator is for informational and educational purposes only. Eco Valores S.A. does NOT provide investment advice or recommendations. Consult a qualified financial advisor before making investment decisions.

**AVISO LEGAL**: Este indicador es solo para fines informativos y educativos. Eco Valores S.A. NO brinda asesoramiento ni recomendaciones de inversión. Consulte con un asesor financiero calificado antes de invertir.
Release Note
Version 1.1 Update - New Features

OHLC TIR Lines
Added the ability to display TIR projection lines based on the current bar's Open, High, Low, and Close prices. Enable in settings under "OHLC TIR Lines". Shows dotted lines with labels displaying the TIR percentage for each price level. Helps visualize the yield range within the current trading session.

Target Price TIR Line
Added the ability to input a custom target price and see its corresponding TIR projection. Enable in settings under "Target Price". Supports price values from 10 to 200,000 for ARS-denominated bonds. Shows a solid line with label displaying the calculated TIR at your target price. Use this to analyze potential entry and exit points.

Both features include customizable colors and update the info panel with the calculated TIR values when enabled.

---

Actualizacion Version 1.1

Lineas TIR OHLC: Muestra proyecciones TIR basadas en precios de Apertura, Maximo, Minimo y Cierre.

Linea TIR Precio Objetivo: Permite ingresar un precio objetivo y ver su TIR correspondiente. Soporta precios de 10 a 200,000.
Release Note
Version 1.2 Update

New Features:

OHL TIR Lines
Added Open, High, Low TIR projection lines based on the current bar's prices. Enable in settings under "OHL TIR Lines". Each line shows the price trajectory if the bond maintained that TIR level. Labels display at 60 days forward with the calculated TIR percentage. Close label included for consistency (uses same color as Current TIR since they represent the same value).

Target Price TIR Line
Input any target price (supports 10 to 200,000 for ARS-denominated bonds) to see its corresponding TIR projection line. Useful for analyzing potential entry and exit points and their expected yields.

Visual Improvements:
- Current TIR line now draws on top of all other lines for better visibility
- Current TIR line is 100% opaque yellow with dashed style
- OHL labels positioned to reduce overlap (O and C extend left, H and L extend right)
- Info panel updates dynamically to show OHL TIR values when enabled

---

Actualizacion Version 1.2

Nuevas Funciones:

Lineas TIR OHL
Se agregaron lineas de proyeccion TIR para Apertura, Maximo y Minimo basadas en los precios de la barra actual. La etiqueta de Cierre se incluye por consistencia (usa el mismo color que TIR Actual ya que representan el mismo valor).

Linea TIR Precio Objetivo
Ingrese cualquier precio objetivo (soporta 10 a 200,000 para bonos en ARS) para ver su linea de proyeccion TIR correspondiente.

Mejoras Visuales:
- Linea TIR Actual ahora se dibuja encima de todas las otras lineas
- Linea TIR Actual es amarillo 100% opaco con estilo discontinuo
- Etiquetas OHL posicionadas para reducir superposicion
- Panel informativo se actualiza dinamicamente
Release Note
EN:

Update Notes:

New Bond: AO27
Added support for the AO27 (Bonar 2027) bond, bringing the total to 13 supported instruments. AO27 features monthly cashflow payments with bullet principal repayment at maturity.

Fixed: Discontinuous Price Jumps at Payment Dates
TIR projection curves now display correctly at coupon and amortization dates. Previously, the curves showed a misleading downward slope through payment dates. Now they show a clean discontinuous jump — the line ends just before the payment and resumes at the new (lower) price level after it, accurately reflecting the ex-coupon price drop.

Supported Bonds (13):

Bonares (USD MEP, Argentine law): AE38, AL29, AL30, AL35, AL41, AN29, AO27
Globales (USD Cable, New York law): GD29, GD30, GD35, GD38, GD41, GD46
This indicator is for informational and educational purposes only. Eco Valores S.A. does NOT provide investment advice or recommendations. Consult a qualified financial advisor before making investment decisions.

ES:

Notas de Actualizacion:

Nuevo Bono: AO27
Se agrego soporte para el bono AO27 (Bonar 2027), llevando el total a 13 instrumentos soportados. El AO27 cuenta con pagos mensuales de flujo de fondos y devolucion de capital bullet al vencimiento.

Correccion: Saltos Discontinuos en Fechas de Pago
Las curvas de proyeccion de TIR ahora se muestran correctamente en las fechas de pago de cupones y amortizaciones. Anteriormente, las curvas mostraban una pendiente descendente a traves de las fechas de pago. Ahora muestran un salto discontinuo limpio — la linea termina justo antes del pago y se reanuda en el nuevo nivel de precio (mas bajo), reflejando con precision la caida de precio ex-cupon.

Bonos Soportados (13):

Bonares (USD MEP, ley argentina): AE38, AL29, AL30, AL35, AL41, AN29, AO27
Globales (USD Cable, ley Nueva York): GD29, GD30, GD35, GD38, GD41, GD46
Este indicador es solo para fines informativos y educativos. Eco Valores S.A. NO brinda asesoramiento ni recomendaciones de inversion. Consulte con un asesor financiero calificado antes de invertir.

AE38 AL30 AL29 AL35 AL41 AN29 GD30 GD29 GD35 GD38 GD41 GD46
Release Note
Argentina Sovereign Bonds — Yield Curve

This indicator plots a real-time yield curve for Argentine sovereign bonds, showing each bond as a scatter point with TIR (IRR) on the Y-axis and Modified Duration on the X-axis. Two separate logarithmic regression curves are fitted for Bonares (Argentine law) and Globales (NY law) families.

Supported Bonds (14):

Bonares: AE38, AL29, AL30, AL35, AL41, AN29, AO27, AO28
Globales: GD29, GD30, GD35, GD38, GD41, GD46
Key Features:

Logarithmic regression: TIR = a + b × ln(Modified Duration), with R² displayed
Three pricing modes: ARS → USD (via AL30 ratios), Direct USD (MEP + Cable), Direct USD MEP
Historical yield curve overlay: compare the current curve against X trading days ago
Optional fill between current and historical curves to visualize spread compression/expansion
Cash-Flow Schedule table: per-bond breakdown of future coupons, amortizations, and remaining principal
AO28 plotted with a distinct color (purple) — currently using auction price (USD 94.20) until market data becomes available
Methodology:

Day count: Actual/365 | Settlement: T+1
IRR: Newton-Raphson iterative method (50 iterations, tolerance 1e-6)
Modified Duration = Macaulay Duration / (1 + TIR)
Currency conversion via AL30/AL30D/AL30C ratios
Curva de Rendimientos — Bonos Soberanos Argentinos

Este indicador grafica la curva de rendimientos en tiempo real para bonos soberanos argentinos. Cada bono se muestra como un punto con TIR en el eje Y y Duración Modificada en el eje X, con regresiones logarítmicas separadas para Bonares y Globales.

AO28 (nuevo — licitación marzo 2026) se muestra en color púrpura con precio de licitación USD 94.20 hasta que comience a cotizar en BCBA.

⚠️ Disclaimer / Aviso Legal
This indicator is for informational and educational purposes only. Eco Valores S.A. does NOT provide investment advice or recommendations. Consult a qualified financial advisor before making investment decisions.

Este indicador es solo para fines informativos y educativos. Eco Valores S.A. NO brinda asesoramiento ni recomendaciones de inversión.
Release Note
Argentina Bonds TIR — TradingView Publication Description

Descripción (ES)
Indicador overlay que calcula la TIR (Tasa Interna de Retorno) del bono soberano argentino que tenés en pantalla y proyecta curvas de precio futuro a niveles fijos de TIR (7%, 8%, 9%, 10%, 11% y 12%) durante los próximos meses, dibujando además una línea TIR actual dinámica basada en el precio de mercado vigente. Soporta los 14 bonos hard-dollar del canje 2020 (Bonares: AE38, AL29, AL30, AL35, AL41, AN29, AO27, AO28 — Globales: GD29, GD30, GD35, GD38, GD41, GD46) en sus tres variantes de cotización (ARS, sufijo D para USD MEP, sufijo C para USD Cable), con conversión automática vía ratios AL30/AL30D/AL30C según el ticker que detecte. Las proyecciones incluyen saltos discontinuos en cada fecha de pago de cupón/amortización (los flujos salen del PV al cruzar la fecha), línea TIR personalizada configurable, líneas TIR para Open/High/Low/Close, línea TIR para un precio objetivo arbitrario, etiquetas con valores y tabla informativa con TIR actual, precio nativo y tipos de cambio MEP/CCL.

Description (EN)
Argentina Bonds TIR is a price-chart overlay indicator that computes the Internal Rate of Return (TIR / IRR) of an Argentine sovereign hard-dollar bond from its current market price and projects forward price curves at fixed TIR levels so you can visually identify the price the instrument needs to trade at on any future date to lock in a given yield. The indicator auto-detects the bond and currency variant from the chart's ticker, fetches the embedded cashflow schedule (coupons + amortizations + final principal), runs Newton-Raphson IRR per bar, and draws everything on top of the candlesticks.

Bonds covered (14):

Bonares (8): AE38, AL29, AL30, AL35, AL41, AN29, AO27, AO28
Globales (6): GD29, GD30, GD35, GD38, GD41, GD46
Each bond is supported in three currency variants that the indicator detects automatically from the ticker suffix:

No suffix → ARS (e.g. BCBA:AL30) — converted to native USD via AL30 ratios
D suffix → USD MEP (e.g. BCBA:AL30D) — direct USD MEP quote
C suffix → USD Cable (e.g. BCBA:AL30C) — direct USD CCL quote
Methodology:

TIR calculation: Newton-Raphson iterative IRR over the full remaining cashflow schedule, with the rate clamped to [0.001, 0.50] for numerical stability and 50 iterations max
Day-count convention: Actual/365
Settlement: T+1
Currency conversion via live AL30 / AL30D / AL30C ratios for ARS↔MEP and MEP↔Cable
Visual features:

Six fixed TIR projection lines at 7%, 8%, 9%, 10%, 11%, and 12%, each toggleable independently with a customizable color. Each curve extends 30–300 bars forward (configurable) and discontinuously jumps at every coupon/amortization date — the flows exit the present value when settlement crosses the cashflow date, so the projected price drops by exactly the cashflow amount. This makes the curves accurate representations of how the price should move to maintain the yield.
Current TIR line (dashed, yellow) — drawn on top of all other curves so the live yield is always visible
Custom TIR line — user-configurable single TIR level (e.g. 9.5%) for quick what-if scenarios
OHL TIR lines — projects four additional lines based on the current bar's Open, High, and Low prices, each with its own TIR label, plus a Close label that matches the Current TIR. Useful for intraday traders to see the yield range carved out by today's range.
Target Price TIR line — enter any arbitrary target price and the indicator computes and draws the corresponding TIR projection. Lets you ask "at what TIR is $65 priced?"
Per-line labels anchored a few days forward of the current bar, showing each TIR level next to the projection
Compact info table in the top-right corner showing the bond ticker, type (Bonar MEP / Global Cable), currency variant (ARS / USD MEP / USD Cable), current chart price, native USD price, current TIR%, optional OHL TIR breakdown, optional target price TIR, plus the live MEP and CCL exchange rates derived from the AL30 family
Use cases: identifying entry/exit prices that lock in a desired yield, building "what-if" scenarios for target TIRs, monitoring how the daily price range maps to a yield range, watching how the yield curve drifts as coupons get paid out, and quickly cross-checking the current TIR of a single bond at a glance.

Disclaimer: for informational and educational purposes only. Not investment advice. Calculations assume hold-to-maturity and ignore transaction costs, taxes, withholdings, and liquidity risk. Eco Valores S.A. does not provide investment advice. Data may be delayed or inaccurate. Consult a licensed financial advisor before trading.

AL30D AL30 AO28D AO28 GD30 GD30D
Release Note
[ES]

Indicador de Tasa Interna de Retorno (TIR) para bonos soberanos argentinos (Bonares y Globales). Calcula la TIR actual a partir del precio de mercado y proyecta curvas de precio futuras a niveles fijos de TIR entre 5% y 11%.

Bonos soportados (14): AE38, AL29, AL30, AL35, AL41, AN29, AO27, AO28, GD29, GD30, GD35, GD38, GD41, GD46.

Características:
• Conversión automática de precios entre ARS, USD MEP y USD Cable usando los ratios AL30 / AL30D / AL30C
• Curvas fijas de proyección a 5%, 6%, 7%, 8%, 9%, 10% y 11% de TIR, con saltos en cada fecha de pago
• TIR personalizada y TIR objetivo (target price) configurables
• TIR de apertura, máximo y mínimo de la barra actual (opcional)
• Líneas verticales punteadas en cada fecha futura de pago de cupón / capital, con etiqueta del tipo de flujo ("Pago Cupón" o "Pago Cupón+Capital") y monto por cada 100 VNO
• Fechas de pago que caen en fin de semana o feriado argentino se desplazan automáticamente al próximo día hábil. Calendario 2025-2047 con feriados nacionales fijos más fechas móviles derivadas de Pascua (Carnaval, Jueves y Viernes Santo) vía algoritmo de Butcher
• Panel informativo con tipo de bono, moneda, precio nativo, TIR actual y tipos de cambio MEP / CCL

Metodología: conteo Actual/365, liquidación T+1, TIR resuelta por Newton-Raphson iterativo.

Eco Valores S.A. — Uso informativo y educativo. No constituye asesoramiento ni recomendación de inversión.

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

[EN]

Internal Rate of Return (TIR / IRR) indicator for Argentine sovereign bonds (Bonares and Globales). The script calculates the bond's current TIR from its market price and projects future price curves at fixed TIR levels between 5% and 11%, using the bond's scheduled cashflows.

Supported bonds (14): AE38, AL29, AL30, AL35, AL41, AN29, AO27, AO28, GD29, GD30, GD35, GD38, GD41, GD46.

Key features:
• Automatic currency conversion between ARS, USD MEP and USD Cable via the AL30 / AL30D / AL30C price ratios. The script detects the loaded ticker suffix (— / D / C) and converts the quoted price to the bond's native currency — USD MEP for Bonares (AL/AE/AN prefix, Argentine jurisdiction) and USD Cable for Globales (GD prefix, foreign jurisdiction)
• Fixed TIR projection curves at 5%, 6%, 7%, 8%, 9%, 10% and 11%, each drawn with discontinuous jumps at payment dates so the pre- and post-coupon prices are visible
• Configurable custom TIR line and target-price TIR line — pick any yield or any price and see where the implied counterpart falls
• Optional Open / High / Low TIR lines showing the IRR implied by the current bar's OHL prices
• Vertical dashed lines at each future cashflow payment date, labeled with payment type ("Pago Cupón" for pure interest, "Pago Cupón+Capital" for interest + principal amortization) and the cashflow amount per 100 VNO
• Payment dates that fall on weekends or Argentine holidays are auto-shifted to the next business day. The holiday calendar covers 2025-2047 and includes the fixed national holidays plus Easter-derived dates (Carnaval Lunes/Martes, Jueves Santo, Viernes Santo) computed via Butcher's Gregorian algorithm
• Info panel on every bar with bond type, quoting currency, chart price, native price, current TIR and live MEP / CCL exchange rates

Methodology: Actual/365 day count, T+1 settlement, IRR solved by iterative Newton-Raphson.

Eco Valores S.A. — For informational and educational purposes only. Does not constitute investment advice or recommendations. Consult a qualified financial advisor before making investment decisions.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน