Macro Library finance
A library of Financial Functions. Version 1. May 22, 2014
Author: William Meacham
Scottsdale Community College
function futureValue(Interest, bigN, littleN, payment, principal)
Returns the Future Value of an investment or loan based on periodicconstant payments and a constant Interest Value
Params
- interest: Annual Interest Rate as a percent. Example: For 7.5%, $interest should = 7.5
- bigN: The total number of periods for the investment/loan
- littleN: The number of compounding periods per year. Example: For quarterly, $littleN = 4
- payment: The periodic amount paid into or withdrawn from the account. Should be a negative valueif paid into the account. Should be a positive value if withdrawn fro mthe account
- principal: The Initial Value of the account. Should be a negative valueif paid into the account. Should be a positive value if withdrawn from the account
ReturnsReturns the Future Value of the account. Returns a positive value if the investment/loan resulted ina positive return. Returns a negative value if the investment/loan resulted in an amount owed.
function presentValue(Interest, bigN, littleN, payment, accruedVal)
Returns the Present Value of an investment or loan based on periodicconstant payments and a constant Interest Value
Params
- interest: Annual Interest Rate as a percent. Example: For 7.5%, $interest should = 7.5
- bigN: The total number of periods for the investment/loan
- littleN: The number of compounding periods per year. Example: For quarterly, $littleN = 4
- payment: The periodic amount paid into or withdrawn from the account. Should be a negative valueif paid into the account. Should be a positive value if withdrawn fro mthe account
- accruedVal: The Future Value of the Investment. Should be a positive value of if the investment/loan resulted ina positive return. Should be a negative value if the investment/loan resulted in an amount owed.
ReturnsReturns the Present Value of the account. Returns a positive value if the initial principal was withdrawn fromthe account (Loan).Returns a negative value if the initial principal was invested into the account (Savings)
function payment(Interest, bigN, littleN, principal, accruedVal)
Returns the Present Value of an investment or loan based on periodicconstant payments and a constant Interest Value
Params
- interest: Annual Interest Rate as a percent. Example: For 7.5%, $interest should = 7.5
- bigN: The total number of periods for the investment/loan
- littleN: The number of compounding periods per year. Example: For quarterly, $littleN = 4
- principal: The Present Value of the Investment. Should be a positive value if the account is a lona. Negative if theaccount is savings.
- accruedVal: The Future Value of the Investment. Should be a positive value of if the investment/loan resulted ina positive return. Should be a negative value if the investment/loan resulted in an amount owed.
ReturnsReturns the Periodic Payment or Withdrawal for the Loan or Investment. Positive Value if withdrawn from the account. Negative ifdepositied into the account.
function numberOfPeriods(Interest, littleN, payment, principal, accruedVal)
Returns the Present Value of an investment or loan based on periodicconstant payments and a constant Interest Value
Params
- interest: Annual Interest Rate as a percent. Example: For 7.5%, $interest should = 7.5
- littleN: The number of compounding periods per year. Example: For quarterly, $littleN = 4
- payment: The periodic amount paid into or withdrawn from the account. Should be a negative valueif paid into the account. Should be a positive value if withdrawn fro mthe account
- principal: The Present Value of the Investment. Should be a positive value if the account is a lona. Negative if theaccount is savings.
- accruedVal: The Future Value of the Investment. Should be a positive value of if the investment/loan resulted ina positive return. Should be a negative value if the investment/loan resulted in an amount owed.
ReturnsReturns the number of Payments or Withdrawals for the Loan or Investment rounded to two decimal places.
function interest(bigN, littleN, payment, principal, accruedVal)
Returns the Interest Rate of the Investment/Loan as a percentage based on periodicconstant payments and a constant Interest Value.
Params
- bigN: The total number of periods for the investment/loan
- littleN: The number of compounding periods per year. Example: For quarterly, $littleN = 4
- payment: The periodic amount paid into or withdrawn from the account. Should be a negative valueif paid into the account. Should be a positive value if withdrawn fro mthe account
- principal: The Present Value of the Investment. Should be a positive value if the account is a lona. Negative if theaccount is savings.
- accruedVal: The Future Value of the Investment. Should be a positive value of if the investment/loan resulted ina positive return. Should be a negative value if the investment/loan resulted in an amount owed.
ReturnsReturns the Interest Rate of the Investment/Loan as a percentage rounded to two decimal places.
function TVM()
Returns an iframe for displaying a Time Value of Money Financial Calculator. Provides Students with a Virtual Manipulativethey can use to calculate various values of an Investment or Loan.
Params:None
ReturnsReturns the embeded iframe code for inserting the applet into a MathAS Question.