This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calc_derivative(principal, apr, gas, t=days_between_compounds): | |
return (principal*((-gas/principal) + ((apr/100)/365) * t + 1)(365/t)) * ( ((apr/100)/( t( (-gas/principal) + t(apr/100)/365 + 1) )) - (365np.log( (-gas/principal) + t(apr/100)/365 + 1))/t2 ) | |
def calc_final_value(principal, apr, gas, num_days): | |
return principal(1+(num_days(apr/100)/365 - gas/principal))**(365/num_days) | |
def find_ideal_compound_rate(principal, apr, gas): | |
der = 99999999999999999 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aaaa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function poisson(k, landa) { | |
exponentialPower = Math.exp(-landa); // negative power k | |
landaPowerK = Math.pow(landa, k); // Landa elevated k | |
numerator = exponentialPower * landaPowerK; | |
denominator = fact(k); // factorial of k. | |
return (numerator / denominator); | |
} | |
function fact(x) { |