This file contains 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
<p><strong>Last updated:</strong> March 19, 2013.</p> | |
<p>These Terms of Service ("Terms") govern your access to and use of STOIC ("STOIC", "we" or "our") websites, services, and applications (collectively the "Service"). Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.</p> | |
<h3>Your Use of the Service</h3> | |
<p>By accessing or using the Service you agree to be bound by these Terms. If you are using the Services on behalf of an organization or entity ("Organization"), then you are agreeing to these Terms on behalf of that Organization and you represent and warrant that you have the authority to bind the Organization to these Terms. In that case, "you" and "your" refers to you and that Organization.</p> | |
<p>You may use the Service only if you can form a binding contract with STOIC, and only in compliance with these Terms and all applicable local, state, national, and internat |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function TBILLYIELD(settlement, maturity, price) { | |
// Return error if either date is invalid | |
if (!moment(settlement).isValid() || !moment(maturity).isValid()) return '#VALUE!'; | |
// Return error if price is lower than or equal to zero | |
if (price <= 0) return '#NUM!'; | |
// Return error if settlement is greater than maturity |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function TBILLEQ(settlement, maturity, discount) { | |
// Return error if either date is invalid | |
if (!moment(settlement).isValid() || !moment(maturity).isValid()) return '#VALUE!'; | |
// Return error if discount is lower than or equal to zero | |
if (discount <= 0) return '#NUM!'; | |
// Return error if settlement is greater than maturity |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function SYD(cost, salvage, life, period) { | |
// Return error if any of the parameters is not a number | |
if (isNaN(cost) || isNaN(salvage) || isNaN(life) || isNaN(period)) return '#VALUE!'; | |
// Return error if life equal to 0 (zero) | |
if (life === 0) return '#NUM!'; | |
// Return error if period is lower than 1 or greater than life |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function SLN(cost, salvage, life) { | |
// Return error if any of the parameters is not a number | |
if (isNaN(cost) || isNaN(salvage) || isNaN(life)) return '#VALUE!'; | |
// Return error if life equal to 0 (zero) | |
if (life === 0) return '#NUM!'; | |
// Return straight-line depreciation |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function RRI(periods, present, future) { | |
// Return error if any of the parameters is not a number | |
if (isNaN(periods) || isNaN(present) || isNaN(future)) return '#VALUE!'; | |
// Return error if periods or present is equal to 0 (zero) | |
if (periods === 0 || present === 0) return '#NUM!'; | |
// Return equivalent interest rate |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function PDURATION(rate, present, future) { | |
// Return error if any of the parameters is not a number | |
if (isNaN(rate) || isNaN(present) || isNaN(future)) return '#VALUE!'; | |
// Return error if rate <=0 | |
if (rate <= 0) return '#NUM!'; | |
// Return number of periods |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function MIRR(values, finance_rate, reinvest_rate) { | |
// Initialize number of values | |
var n = values.length; | |
// Lookup payments (negative values) and incomes (positive values) | |
var payments = []; | |
var incomes = []; | |
for (var i = 0; i < n; i++) { |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function ISPMT(rate, period, periods, value) { | |
// Evaluate rate and periods (TODO: replace with secure expression evaluator) | |
rate = eval(rate); | |
periods = eval(periods); | |
// Return interest | |
return value * rate * (period / periods - 1); | |
} |
This file contains 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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function FVSCHEDULE(principal, schedule) { | |
// Initialize future value | |
var future = principal; | |
// Apply all interests in schedule | |
for (var i = 0; i < schedule.length; i++) { | |
// Return error if schedule value is not a number | |
if (isNaN(schedule[i])) return '#VALUE!'; |