<jupyter_start><jupyter_text>- Simple - Compuesto - Continuo<jupyter_code># interes, i, C0, capital inicial, k, periodos
def intSimpleCapital(capital, periodos, inetres):
    return capital * (1+periodos*interes)
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
listaDeInteres = [.05,.1,.15,.2,.5]
# capital = 10000
periodos = 12
for interes in listaDeInteres:
    print(intSimpleCapital(10000, periodos, interes), end = " ")
periodos = [3,6,12,18]
colores = ["black", "red", "blue", "orange"]
plt.figure(figsize = (4,2))
for indx, periodo in enumerate (periodos):
    for interes in listaDeInteres:
        capitalx = intSimpleCapital(10000, periodo, interes)
        plt.scatter([periodo], [capitalx], color = colores[indx], s= 5)
def intCompuestoCapital(capital, periodos, inetres):
    return capital * (1+interes)**periodos
listaDeInteres = [.05,.1,.15,.2,.5]
# capital = 10000
periodos = 12
for interes in listaDeInteres:
    print(intCompuestoCapital(10000, periodos, interes), end = " ")
periodos = [3,6,12,18]
colores = ["black", "red", "blue", "orange"]
plt.figure(figsize = (4,2))
for indx, periodo in enumerate (periodos):
    for interes in listaDeInteres:
        capitalx = intCompuestoCapital(10000, periodo, interes)
        plt.scatter([periodo], [capitalx], color = colores[indx], s= 5)
def Nper(c0, ck, interes):
    nper = (ck/c0 - 1 )/interes
    if (nper - int(nper)) == 0:
        return nper
    else:
        return int(nper) + 1
Nper(11000, 12000, .08 )
c = C0 (1-i)** periodos
log(C/ c0) = log((1+i)**periodos)
= periodos * log(1+i)
periodos = log(C/c0)/log(1+i)
import numpy as np
def periodosC(capital, meta, interes):
    return np.log(meta/capital) / np.log(1+interes)
periodosC(1000, 1500,.005)
def NperComp(c0, ck, interes):
    nper = np.log(ck/c0)/np.log(1 + interes)
    if (nper - int(nper)) == 0:
        return nper
    else:
        return int(nper) + 1
NperComp(1000, 1500,.005)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15474378488077117, 'fraction_numerical': 0.061390157280568236, 'mean_word_length': 4.135416666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '171570', 'license': 'MIT', 'n_tokens_mistral': 833, 'n_tokens_neox': 758, 'n_words': 185, 'path': 'ModeloDeAhorro.ipynb', 'repo_name': 'ferbarbosa19/simulacionNotas', 'size': '1971'}