PINE LIBRARY
ArgentinaBondsLib - Argentina Sovereign Bonds Cashflow Library

ArgentinaBondsLib
A Pine Script v6 library providing cashflow data and financial calculation functions for Argentine sovereign bonds (Bonares and Globales).
## Supported Bonds
**Bonares** (Argentina legislation, USD MEP): AE38, AL29, AL30, AL35, AL41, AN29
**Globales** (Foreign legislation, USD Cable): GD29, GD30, GD35, GD38, GD41, GD46
## Exported Functions
### Cashflow Data
- `getCashflows_[TICKER]()` - Returns timestamps, cashflows, and count for each bond
### Bond Identification
- `getBondType(ticker)` - Returns BONAR() or GLOBAL()
- `getBaseTicker(ticker)` - Extracts base ticker without prefix/suffix
- `getCurrencyType(ticker)` - Returns 0=ARS, 1=MEP, 2=Cable
- `isSupported(baseTicker)` - Checks if bond is supported
### Financial Calculations
- `calcPV()` - Present Value calculation
- `calcIRR()` - Internal Rate of Return using Newton-Raphson method
- `calcPriceFromIRR()` - Calculate price from target IRR
### Currency Conversion
- `convertToNativeCurrency()` - Converts price to cashflow currency (MEP for Bonares, Cable for Globales)
### Utilities
- `getSettlementDate()` - Returns T+1 timestamp
- `BONAR()` / `GLOBAL()` - Bond type constants
## Methodology
- Day count convention: Actual/365
- Settlement: T+1
- IRR solver: Newton-Raphson iterative method
## Usage Example
```
import EcoValores/ArgentinaBondsLib/1 as Bonds
[ts, cf, count] = Bonds.getCashflows_AL30()
settlementDate = Bonds.getSettlementDate()
irr = Bonds.calcIRR(ts, cf, count, settlementDate, close)
```
---
## Español
Librería Pine Script v6 con datos de flujos de fondos y funciones de cálculo financiero para bonos soberanos argentinos.
### Bonos Soportados
- **Bonares** (Legislación argentina, USD MEP): AE38, AL29, AL30, AL35, AL41, AN29
- **Globales** (Legislación extranjera, USD Cable): GD29, GD30, GD35, GD38, GD41, GD46
### Metodología
- Convención de días: Actual/365
- Liquidación: T+1
- Solver TIR: Método iterativo Newton-Raphson
---
**DISCLAIMER**: This library 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**: Esta librería 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 Pine Script v6 library providing cashflow data and financial calculation functions for Argentine sovereign bonds (Bonares and Globales).
## Supported Bonds
**Bonares** (Argentina legislation, USD MEP): AE38, AL29, AL30, AL35, AL41, AN29
**Globales** (Foreign legislation, USD Cable): GD29, GD30, GD35, GD38, GD41, GD46
## Exported Functions
### Cashflow Data
- `getCashflows_[TICKER]()` - Returns timestamps, cashflows, and count for each bond
### Bond Identification
- `getBondType(ticker)` - Returns BONAR() or GLOBAL()
- `getBaseTicker(ticker)` - Extracts base ticker without prefix/suffix
- `getCurrencyType(ticker)` - Returns 0=ARS, 1=MEP, 2=Cable
- `isSupported(baseTicker)` - Checks if bond is supported
### Financial Calculations
- `calcPV()` - Present Value calculation
- `calcIRR()` - Internal Rate of Return using Newton-Raphson method
- `calcPriceFromIRR()` - Calculate price from target IRR
### Currency Conversion
- `convertToNativeCurrency()` - Converts price to cashflow currency (MEP for Bonares, Cable for Globales)
### Utilities
- `getSettlementDate()` - Returns T+1 timestamp
- `BONAR()` / `GLOBAL()` - Bond type constants
## Methodology
- Day count convention: Actual/365
- Settlement: T+1
- IRR solver: Newton-Raphson iterative method
## Usage Example
```
import EcoValores/ArgentinaBondsLib/1 as Bonds
[ts, cf, count] = Bonds.getCashflows_AL30()
settlementDate = Bonds.getSettlementDate()
irr = Bonds.calcIRR(ts, cf, count, settlementDate, close)
```
---
## Español
Librería Pine Script v6 con datos de flujos de fondos y funciones de cálculo financiero para bonos soberanos argentinos.
### Bonos Soportados
- **Bonares** (Legislación argentina, USD MEP): AE38, AL29, AL30, AL35, AL41, AN29
- **Globales** (Legislación extranjera, USD Cable): GD29, GD30, GD35, GD38, GD41, GD46
### Metodología
- Convención de días: Actual/365
- Liquidación: T+1
- Solver TIR: Método iterativo Newton-Raphson
---
**DISCLAIMER**: This library 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**: Esta librería 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.
Libreria Pine
Nello spirito di TradingView, l'autore ha pubblicato questo codice Pine come libreria open source affinché altri programmatori della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open source, ma il riutilizzo di questo codice nelle pubblicazioni è soggetto al Regolamento.
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).
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Libreria Pine
Nello spirito di TradingView, l'autore ha pubblicato questo codice Pine come libreria open source affinché altri programmatori della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open source, ma il riutilizzo di questo codice nelle pubblicazioni è soggetto al Regolamento.
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).
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.