FunctionCompoundInterest

Method for compound interest.
simple_compound(principal, rate, duration) Computes compound interest for given duration.
Parameters:
principal: float, the principal or starting value.
rate: float, the rate of interest.
duration: float, the period of growth.
Returns: float.
variable_compound(principal, rates, duration) Computes variable compound interest for given duration.
Parameters:
principal: float, the principal or starting value.
rates: float array, the rates of interest.
duration: int, the period of growth.
Returns: float array.
simple_compound_array(principal, rates, duration) Computes variable compound interest for given duration.
Parameters:
principal: float, the principal or starting value.
rates: float array, the rates of interest.
duration: int, the period of growth.
Returns: float array.
variable_compound_array(principal, rates, duration) Computes variable compound interest for given duration.
Parameters:
principal: float, the principal or starting value.
rates: float array, the rates of interest.
duration: int, the period of growth.
Returns: float array.
Added:
compound_interest_periods(principal, final, rate) compound interest periods
Parameters:
principal: float, value of investment.
final: float, target final value.
rate: float, interest rate.
compound_interest_principal(final, rate, period) compound interest principal
Parameters:
final: float, target final value.
rate: float, interest rate.
period: float, period of investment.
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine 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 in una pubblicazione è regolato dal nostro Regolamento.
Declinazione di responsabilità
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine 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 in una pubblicazione è regolato dal nostro Regolamento.