Financial Type
A wrapper class to expose the Excel financial functions API to .NET clients
Static members
Static member | Description |
Full Usage:
Financial.AccrInt(issue, firstInterest, settlement, rate, par, frequency, basis)
Parameters:
DateTime
firstInterest : DateTime
settlement : DateTime
rate : float
par : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
ACCRINT function The accrued interest for a security that pays periodic interest, using "FromIssueToSettlement" calculation method
|
Full Usage:
Financial.AccrInt(issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod)
Parameters:
DateTime
firstInterest : DateTime
settlement : DateTime
rate : float
par : float
frequency : Frequency
basis : DayCountBasis
calcMethod : AccrIntCalcMethod
Returns: float
|
|
Full Usage:
Financial.AccrIntM(issue, settlement, rate, par, basis)
Parameters:
DateTime
settlement : DateTime
rate : float
par : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.AmorDegrc(cost, datePurchased, firstPeriod, salvage, period, rate, basis, excelCompliant)
Parameters:
float
datePurchased : DateTime
firstPeriod : DateTime
salvage : float
period : float
rate : float
basis : DayCountBasis
excelCompliant : bool
Returns: float
|
AMORDEGRC function The depreciation for each accounting period by using a depreciation coefficient ExcelCompliant is used because Excel stores 13 digits. AmorDegrc algorithm rounds numbers and returns different results unless the numbers get rounded to 13 digits before rounding them. I.E. 22.49999999999999 is considered 22.5 by Excel, but 22.4 by the .NET framework
|
Full Usage:
Financial.AmorLinc(cost, datePurchased, firstPeriod, salvage, period, rate, basis)
Parameters:
float
datePurchased : DateTime
firstPeriod : DateTime
salvage : float
period : float
rate : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.CoupDays(settlement, maturity, frequency, basis)
Parameters:
DateTime
maturity : DateTime
frequency : Frequency
basis : DayCountBasis
Returns: float
|
COUPDAYS function The number of days in the coupon period that contains the settlement date The Excel algorithm seems wrong in that it doesn't respect `coupDays = coupDaysBS + coupDaysNC` This equality should stand. The differs from Excel by +/- one or two days when the date spans a leap year.
|
Full Usage:
Financial.CoupDaysBS(settlement, maturity, frequency, basis)
Parameters:
DateTime
maturity : DateTime
frequency : Frequency
basis : DayCountBasis
Returns: float
|
COUPDAYBS function The number of days from the beginning of the coupon period to the settlement date
|
Full Usage:
Financial.CoupDaysNC(settlement, maturity, frequency, basis)
Parameters:
DateTime
maturity : DateTime
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.CoupNCD(settlement, maturity, frequency, basis)
Parameters:
DateTime
maturity : DateTime
frequency : Frequency
basis : DayCountBasis
Returns: DateTime
|
|
Full Usage:
Financial.CoupNum(settlement, maturity, frequency, basis)
Parameters:
DateTime
maturity : DateTime
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.CoupPCD(settlement, maturity, frequency, basis)
Parameters:
DateTime
maturity : DateTime
frequency : Frequency
basis : DayCountBasis
Returns: DateTime
|
|
Full Usage:
Financial.CumIPmt(rate, nper, pv, startPeriod, endPeriod, typ)
Parameters:
float
nper : float
pv : float
startPeriod : float
endPeriod : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.CumPrinc(rate, nper, pv, startPeriod, endPeriod, typ)
Parameters:
float
nper : float
pv : float
startPeriod : float
endPeriod : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.Db(cost, salvage, life, period)
Parameters:
float
salvage : float
life : float
period : float
Returns: float
|
DB function The depreciation of an asset for a specified period by using the fixed-declining balance method
|
Full Usage:
Financial.Db(cost, salvage, life, period, month)
Parameters:
float
salvage : float
life : float
period : float
month : float
Returns: float
|
DB function The depreciation of an asset for a specified period by using the fixed-declining balance method
|
Full Usage:
Financial.Ddb(cost, salvage, life, period)
Parameters:
float
salvage : float
life : float
period : float
Returns: float
|
DDB function The depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify
|
Full Usage:
Financial.Ddb(cost, salvage, life, period, factor)
Parameters:
float
salvage : float
life : float
period : float
factor : float
Returns: float
|
DDB function The depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify Excel Ddb has two interesting characteristics: 1. It special cases ddb for fractional periods between 0 and 1 by considering them to be 1 2. It is inconsistent with VDB(..., True) for fractional periods, even if VDB(..., True) is defined to be the same as ddb. The algorithm for VDB is theoretically correct. This function makes the same 1. adjustment.
|
Full Usage:
Financial.Disc(settlement, maturity, pr, redemption, basis)
Parameters:
DateTime
maturity : DateTime
pr : float
redemption : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.DollarDe(fractionalDollar, fraction)
Parameters:
float
fraction : float
Returns: float
|
DOLLARDE function Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number
|
Full Usage:
Financial.DollarFr(decimalDollar, fraction)
Parameters:
float
fraction : float
Returns: float
|
DOLLARFR function Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction
|
Full Usage:
Financial.Duration(settlement, maturity, coupon, yld, frequency, basis)
Parameters:
DateTime
maturity : DateTime
coupon : float
yld : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.Effect(nominalRate, npery)
Parameters:
float
npery : float
Returns: float
|
|
Full Usage:
Financial.Fv(rate, nper, pmt, pv, typ)
Parameters:
float
nper : float
pmt : float
pv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.FvSchedule(principal, schedule)
Parameters:
float
schedule : float seq
Returns: float
|
FVSCHEDULE function The future value of an initial principal after applying a series of compound interest rates
|
Full Usage:
Financial.IPmt(rate, per, nper, pv, fv, typ)
Parameters:
float
per : float
nper : float
pv : float
fv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.ISPmt(rate, per, nper, pv)
Parameters:
float
per : float
nper : float
pv : float
Returns: float
|
|
Full Usage:
Financial.IntRate(settlement, maturity, investment, redemption, basis)
Parameters:
DateTime
maturity : DateTime
investment : float
redemption : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.Irr(values)
Parameters:
float seq
Returns: float
|
|
Full Usage:
Financial.Irr(values, guess)
Parameters:
float seq
guess : float
Returns: float
|
|
Full Usage:
Financial.MDuration(settlement, maturity, coupon, yld, frequency, basis)
Parameters:
DateTime
maturity : DateTime
coupon : float
yld : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.Mirr(values, financeRate, reinvestRate)
Parameters:
float seq
financeRate : float
reinvestRate : float
Returns: float
|
MIRR function The internal rate of return where positive and negative cash flows are financed at different rates
|
Full Usage:
Financial.NPer(rate, pmt, pv, fv, typ)
Parameters:
float
pmt : float
pv : float
fv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.Nominal(effectRate, npery)
Parameters:
float
npery : float
Returns: float
|
|
Full Usage:
Financial.Npv(rate, values)
Parameters:
float
values : float seq
Returns: float
|
NPV function The net present value of an investment based on a series of periodic cash flows and a discount rate
|
Full Usage:
Financial.OddFPrice(settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
issue : DateTime
firstCoupon : DateTime
rate : float
yld : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.OddFYield(settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
issue : DateTime
firstCoupon : DateTime
rate : float
pr : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.OddLPrice(settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
lastInterest : DateTime
rate : float
yld : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.OddLYield(settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
lastInterest : DateTime
rate : float
pr : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.PPmt(rate, per, nper, pv, fv, typ)
Parameters:
float
per : float
nper : float
pv : float
fv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.Pduration(rate, pv, fv)
Parameters:
float
pv : float
fv : float
Returns: float
|
PDURATION function Returns the number of periods required by an investment to reach a specified value.
|
Full Usage:
Financial.Pmt(rate, nper, pv, fv, typ)
Parameters:
float
nper : float
pv : float
fv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.Price(settlement, maturity, rate, yld, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
rate : float
yld : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.PriceAllowNegativeYield(settlement, maturity, rate, yld, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
rate : float
yld : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.PriceDisc(settlement, maturity, discount, redemption, basis)
Parameters:
DateTime
maturity : DateTime
discount : float
redemption : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.PriceMat(settlement, maturity, issue, rate, yld, basis)
Parameters:
DateTime
maturity : DateTime
issue : DateTime
rate : float
yld : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.Pv(rate, nper, pmt, fv, typ)
Parameters:
float
nper : float
pmt : float
fv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.Rate(nper, pmt, pv, fv, typ)
Parameters:
float
pmt : float
pv : float
fv : float
typ : PaymentDue
Returns: float
|
|
Full Usage:
Financial.Rate(nper, pmt, pv, fv, typ, guess)
Parameters:
float
pmt : float
pv : float
fv : float
typ : PaymentDue
guess : float
Returns: float
|
|
Full Usage:
Financial.Received(settlement, maturity, investment, discount, basis)
Parameters:
DateTime
maturity : DateTime
investment : float
discount : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.Rri(nper, pv, fv)
Parameters:
float
pv : float
fv : float
Returns: float
|
|
Full Usage:
Financial.Sln(cost, salvage, life)
Parameters:
float
salvage : float
life : float
Returns: float
|
|
Full Usage:
Financial.Syd(cost, salvage, life, per)
Parameters:
float
salvage : float
life : float
per : float
Returns: float
|
|
|
|
|
|
|
|
Full Usage:
Financial.Vdb(cost, salvage, life, startPeriod, endPeriod)
Parameters:
float
salvage : float
life : float
startPeriod : float
endPeriod : float
Returns: float
|
VDB function The depreciation of an asset for a specified or partial period by using a declining balance method
|
Full Usage:
Financial.Vdb(cost, salvage, life, startPeriod, endPeriod, factor)
Parameters:
float
salvage : float
life : float
startPeriod : float
endPeriod : float
factor : float
Returns: float
|
VDB function The depreciation of an asset for a specified or partial period by using a declining balance method
|
Full Usage:
Financial.Vdb(cost, salvage, life, startPeriod, endPeriod, factor, noSwitch)
Parameters:
float
salvage : float
life : float
startPeriod : float
endPeriod : float
factor : float
noSwitch : VdbSwitch
Returns: float
|
VDB function The depreciation of an asset for a specified or partial period by using a declining balance method. In the excel version of this algorithm the depreciation in the period (0,1) is not the same as the sum of the depreciations in periods (0,0.5) (0.5,1) `VDB(100,10,13,0,0.5,1,0) + VDB(100,10,13,0.5,1,1,0) != VDB(100,10,13,0,1,1,0)` Notice that in Excel by using '1' (no_switch) instead of '0' as the last parameter everything works as expected. In truth, the last parameter should have no influence in the calculation given that in the first period there is no switch to sln depreciation. Overall, I think my algorithm is correct, even if it disagrees with Excel when startperiod is fractional.
|
Full Usage:
Financial.XIrr(values, dates)
Parameters:
float seq
dates : DateTime seq
Returns: float
|
XIRR function The internal rate of return for a schedule of cash flows that is not necessarily periodic
|
Full Usage:
Financial.XIrr(values, dates, guess)
Parameters:
float seq
dates : DateTime seq
guess : float
Returns: float
|
XIRR function The internal rate of return for a schedule of cash flows that is not necessarily periodic
|
Full Usage:
Financial.XNpv(rate, values, dates)
Parameters:
float
values : float seq
dates : DateTime seq
Returns: float
|
|
Full Usage:
Financial.YearFrac(startDate, endDate, basis)
Parameters:
DateTime
endDate : DateTime
basis : DayCountBasis
Returns: float
|
YEARFRAC function Calculates the fraction of the year represented by the number of whole days between two dates - not a financial function
|
Full Usage:
Financial.Yield(settlement, maturity, rate, pr, redemption, frequency, basis)
Parameters:
DateTime
maturity : DateTime
rate : float
pr : float
redemption : float
frequency : Frequency
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.YieldDisc(settlement, maturity, pr, redemption, basis)
Parameters:
DateTime
maturity : DateTime
pr : float
redemption : float
basis : DayCountBasis
Returns: float
|
|
Full Usage:
Financial.YieldMat(settlement, maturity, issue, rate, pr, basis)
Parameters:
DateTime
maturity : DateTime
issue : DateTime
rate : float
pr : float
basis : DayCountBasis
Returns: float
|
|