OPEN-SOURCE SCRIPT
已更新 Argentina Bonds TIR - Sovereign Bond Yield Curves Indicator

# 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.
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.
發行說明
Version 1.1 Update - New FeaturesOHLC 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.
發行說明
Version 1.2 UpdateNew 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
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
Eco Valores S.A.
Agente de Liquidación y Compensación (ALyC) n° 109/CNV
Agente de Colocación y Distribución Integral de Fondos Comunes de Inversión (ACyDI FCI) n°45/CNV.
Miembro de A3 Mercados S.A., MAV S.A. y Bolsas y Mercados Argentinos S.A. (ByMA).
Agente de Liquidación y Compensación (ALyC) n° 109/CNV
Agente de Colocación y Distribución Integral de Fondos Comunes de Inversión (ACyDI FCI) n°45/CNV.
Miembro de A3 Mercados S.A., MAV S.A. y Bolsas y Mercados Argentinos S.A. (ByMA).
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
Eco Valores S.A.
Agente de Liquidación y Compensación (ALyC) n° 109/CNV
Agente de Colocación y Distribución Integral de Fondos Comunes de Inversión (ACyDI FCI) n°45/CNV.
Miembro de A3 Mercados S.A., MAV S.A. y Bolsas y Mercados Argentinos S.A. (ByMA).
Agente de Liquidación y Compensación (ALyC) n° 109/CNV
Agente de Colocación y Distribución Integral de Fondos Comunes de Inversión (ACyDI FCI) n°45/CNV.
Miembro de A3 Mercados S.A., MAV S.A. y Bolsas y Mercados Argentinos S.A. (ByMA).
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。