Mobile API Reference  MicroStrategy 2019
financialFuncImplement.h
Go to the documentation of this file.
1 //
2 // financialFuncImplement.h
3 // ReportServiceCore
4 //
5 // Created by He Tengfei on 2/23/12.
6 // Copyright 2012 MicroStrategy, Inc. All rights reserved.
7 //
8 #ifndef _FINANCIALFUNCIMPLEMENT_
9 #define _FINANCIALFUNCIMPLEMENT_ 1
10 
11 #include "DSSFunctionUtility.h"
12 
13 
14 #ifdef WIN32
15 
16 #ifdef DFC_FINANCE_EXPORT
17 #define DFC_FINANCE_EXIM _declspec(dllexport)
18 #else
19 #define DFC_FINANCE_EXIM _declspec(dllimport)
20 #endif
21 #else
22 
23 #define DFC_FINANCE_EXIM
24 
25 #endif
26 
27 DFC_FINANCE_EXIM double _CUMIPMT(enum MathError *error, double rate, Int32 nper, double pv,
28  Int32 start_period, Int32 end_period, Int32 type);
29 DFC_FINANCE_EXIM double _CUMPRINC(enum MathError *error, double rate, Int32 nper, double pv,
30  Int32 start_period, Int32 end_period, Int32 type);
31 DFC_FINANCE_EXIM double _DB(enum MathError *error, double cost, double salvage, Int32 life, Int32 period,
32  Int32 month);
33 DFC_FINANCE_EXIM double _DDB(enum MathError *error, double cost, double salvage, double life, double period,
34  double factor);
35 DFC_FINANCE_EXIM double _DOLLARDE(enum MathError *error, double fractionalDollar, Int32 fraction);
36 DFC_FINANCE_EXIM double _DOLLARFR(enum MathError *error, double decimalDollar, Int32 fraction);
37 DFC_FINANCE_EXIM double _EFFECT(enum MathError *error, double nominal_rate, Int32 npery);
38 DFC_FINANCE_EXIM double _FV(enum MathError *error, double rate, double nper,double pmt, double pv,
39  Int32 type);
40 DFC_FINANCE_EXIM double _FVSCHEDULE(enum MathError *error, double pv, Int32 n, double schedule[]);
41 DFC_FINANCE_EXIM double _IPMT(enum MathError *error, double rate, double per, double nper, double pv,
42  double fv, Int32 type);
43 DFC_FINANCE_EXIM double _IRR(enum MathError *error, Int32 nValue, double values[], double guess, Int32 method, double precision);
44 DFC_FINANCE_EXIM double _MIRR(enum MathError *error, Int32 nValue, double values[], double financeRate,
45  double reinvestRate);
46 DFC_FINANCE_EXIM double _NOMINAL(enum MathError *error, double effect_rate, Int32 npery);
47 DFC_FINANCE_EXIM double _NPER(enum MathError *error, double rate, double pmt, double pv, double fv,
48  Int32 type);
49 DFC_FINANCE_EXIM double _NPV(enum MathError *error, double rate, Int32 nValue, double values[]);
50 DFC_FINANCE_EXIM double _PMT(enum MathError *error, double rate, double nper, double pv, double fv,
51  Int32 type);
52 DFC_FINANCE_EXIM double _PPMT(enum MathError *error, double rate, double per, double nper, double pv,
53  double fv, Int32 type);
54 DFC_FINANCE_EXIM double _PV(enum MathError *error, double rate, double nper, double pmt, double fv,
55  Int32 type);
56 DFC_FINANCE_EXIM double _RATE(enum MathError *error, double nper, double pmt, double pv, double fv,
57  Int32 type, double guess);
58 DFC_FINANCE_EXIM double _SLN(enum MathError *error, double cost, double salvage, double life);
59 DFC_FINANCE_EXIM double _SYD(enum MathError *error, double cost, double salvage, double life,
60  double per);
61 DFC_FINANCE_EXIM double _VDB(enum MathError *error, double cost, double salvage, double life,
62  Int32 period, double factor);
63 
64 // #include "DataType/DataType/DateTime.h"
65 #include "DSSDateTime.h"
66 
68 
69 DFC_FINANCE_EXIM double _ACCRINT(enum MathError *error, const Date & issue, const Date & firstInterest, const Date & settlement, double rate,
70  double par, Int32 frequency, Int32 basis);
71 DFC_FINANCE_EXIM double _ACCRINTM(enum MathError *error, const Date & issue, const Date & maturity, double rate, double par, Int32 basis);
72 DFC_FINANCE_EXIM Int32 _COUPDAYBS(enum MathError *error, const Date & settlement, const Date & maturity, Int32 frequency, Int32 basis);
73 DFC_FINANCE_EXIM double _COUPDAYS(enum MathError *error, const Date & settlement, const Date & maturity, Int32 frequency, Int32 basis);
74 DFC_FINANCE_EXIM Int32 _COUPDAYSNC(enum MathError *error, const Date & settlement, const Date & maturity, Int32 frequency, Int32 basis);
75 DFC_FINANCE_EXIM Int32 _COUPNUM(enum MathError *error, const Date & settlement, const Date & maturity, Int32 frequency, Int32 basis);
76 DFC_FINANCE_EXIM Date _COUPNCD(enum MathError *error, const Date & settlement, const Date & maturity, Int32 frequency, Int32 basis);
77 DFC_FINANCE_EXIM Date _COUPPCD(enum MathError *error, const Date & settlement, const Date & maturity, Int32 frequency, Int32 basis);
78 DFC_FINANCE_EXIM double _DISC(enum MathError *error, const Date & settlement, const Date & maturity, double pr,
79  double redemption, Int32 basis);
80 DFC_FINANCE_EXIM double _DURATION(enum MathError *error, const Date & settlement, const Date & maturity,
81  double couponRate, double yldRate, Int32 frequency, Int32 basis);
82 DFC_FINANCE_EXIM double _MDURATION(enum MathError *error, const Date & settlement, const Date & maturity,
83  double couponRate, double yldRate, Int32 frequency, Int32 basis);
84 DFC_FINANCE_EXIM double _INTRATE(enum MathError *error, const Date & settlement, const Date & maturity, double investment,
85  double redemption, Int32 basis);
86 DFC_FINANCE_EXIM double _ODDFPRICE(enum MathError *error, const Date & settlement, const Date & maturity, const Date & issue,
87  const Date & firstCoupon, double couponRate, double yld, double redemption,
88  Int32 frequency, Int32 basis);
89 DFC_FINANCE_EXIM double _ODDFYIELD(enum MathError *error, const Date & settlement, const Date & maturity, const Date & issue,
90  const Date & firstCoupon, double couponRate, double price, double redemption,
91  Int32 frequency, Int32 basis);
92 DFC_FINANCE_EXIM double _ODDLPRICE(enum MathError *error, const Date & settlement, const Date & maturity,
93  const Date & lastInterest, double couponRate, double yld, double redemption,
94  Int32 frequency, Int32 basis);
95 DFC_FINANCE_EXIM double _ODDLYIELD(enum MathError *error, const Date & settlement, const Date & maturity,
96  const Date & lastInterest, double couponRate, double price, double redemption,
97  Int32 frequency, Int32 basis);
98 DFC_FINANCE_EXIM double _PRICE(enum MathError *error, const Date & settlement, const Date & maturity,
99  double couponRate, double yldRate, double redemption,
100  Int32 frequency, Int32 basis);
101 DFC_FINANCE_EXIM double _PRICEDISC(enum MathError *error, const Date & settlement, const Date & maturity,
102  double discRate, double redemption, Int32 basis);
103 DFC_FINANCE_EXIM double _PRICEMAT(enum MathError *error, const Date & settlement, const Date & maturity,
104  const Date & issue, double rate, double yld, Int32 basis);
105 DFC_FINANCE_EXIM double _YIELD(enum MathError *error, const Date & settlement, const Date & maturity,
106  double couponRate, double price, double redemption,
107  Int32 frequency, Int32 basis);
108 DFC_FINANCE_EXIM double _RECEIVED(enum MathError *error, const Date & settlement, const Date & maturity, double investment,
109  double discount, Int32 basis);
110 DFC_FINANCE_EXIM double _TBILLEQ(enum MathError *error, const Date & settlement, const Date & maturity, double discount);
111 DFC_FINANCE_EXIM double _TBILLPRICE(enum MathError *error, const Date & settlement, const Date & maturity, double discount);
112 DFC_FINANCE_EXIM double _TBILLYIELD(enum MathError *error, const Date & settlement, const Date & maturity, double pr);
113 DFC_FINANCE_EXIM double _XNPV(enum MathError *error, double rate,Int32 n, double values[], Date dates[], Int32 valid[]);
114 DFC_FINANCE_EXIM double _XIRR(enum MathError *error, Int32 n, double values[], Date dates[], double guess, Int32 valid[]);
115 DFC_FINANCE_EXIM double _YIELDDISC(enum MathError *error, const Date &settlement, const Date & maturity, double price,
116  double redemption, Int32 basis);
117 DFC_FINANCE_EXIM double _YIELDMAT(enum MathError *error, const Date & settlement, const Date & maturity, const Date & issue,
118  double rate, double price, Int32 basis);
119 void adjustDate(Date & result, const Date & maturity);
120 
121 
122 #endif
DFC_FINANCE_EXIM double _CUMPRINC(enum MathError *error, double rate, Int32 nper, double pv, Int32 start_period, Int32 end_period, Int32 type)
DFC_FINANCE_EXIM double _XNPV(enum MathError *error, double rate, Int32 n, double values[], Date dates[], Int32 valid[])
DFC_FINANCE_EXIM double _IRR(enum MathError *error, Int32 nValue, double values[], double guess, Int32 method, double precision)
DFC_FINANCE_EXIM double _XIRR(enum MathError *error, Int32 n, double values[], Date dates[], double guess, Int32 valid[])
DFC_FINANCE_EXIM double _ODDFYIELD(enum MathError *error, const Date &settlement, const Date &maturity, const Date &issue, const Date &firstCoupon, double couponRate, double price, double redemption, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _NPV(enum MathError *error, double rate, Int32 nValue, double values[])
DFC_FINANCE_EXIM double _DDB(enum MathError *error, double cost, double salvage, double life, double period, double factor)
#define DFC_FINANCE_EXIM
Definition: financialFuncImplement.h:23
DFC_FINANCE_EXIM double _PPMT(enum MathError *error, double rate, double per, double nper, double pv, double fv, Int32 type)
DFC_FINANCE_EXIM double _PV(enum MathError *error, double rate, double nper, double pmt, double fv, Int32 type)
DFC_FINANCE_EXIM double _YIELDDISC(enum MathError *error, const Date &settlement, const Date &maturity, double price, double redemption, Int32 basis)
DFC_FINANCE_EXIM double _NOMINAL(enum MathError *error, double effect_rate, Int32 npery)
MathError
Definition: DSSFunctionUtility.h:344
Definition: DSSDateTime.h:81
DFC_FINANCE_EXIM double _RECEIVED(enum MathError *error, const Date &settlement, const Date &maturity, double investment, double discount, Int32 basis)
MDataType::DSSDateTime Date
Definition: financialFuncImplement.h:67
DFC_FINANCE_EXIM double _CUMIPMT(enum MathError *error, double rate, Int32 nper, double pv, Int32 start_period, Int32 end_period, Int32 type)
DFC_FINANCE_EXIM double _ODDFPRICE(enum MathError *error, const Date &settlement, const Date &maturity, const Date &issue, const Date &firstCoupon, double couponRate, double yld, double redemption, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _PMT(enum MathError *error, double rate, double nper, double pv, double fv, Int32 type)
DFC_FINANCE_EXIM Int32 _COUPDAYBS(enum MathError *error, const Date &settlement, const Date &maturity, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _VDB(enum MathError *error, double cost, double salvage, double life, Int32 period, double factor)
DFC_FINANCE_EXIM double _COUPDAYS(enum MathError *error, const Date &settlement, const Date &maturity, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _YIELD(enum MathError *error, const Date &settlement, const Date &maturity, double couponRate, double price, double redemption, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _TBILLYIELD(enum MathError *error, const Date &settlement, const Date &maturity, double pr)
DFC_FINANCE_EXIM double _MIRR(enum MathError *error, Int32 nValue, double values[], double financeRate, double reinvestRate)
#define Int32
Definition: BasicTypes.h:20
DFC_FINANCE_EXIM double _FV(enum MathError *error, double rate, double nper, double pmt, double pv, Int32 type)
DFC_FINANCE_EXIM double _SLN(enum MathError *error, double cost, double salvage, double life)
DFC_FINANCE_EXIM double _ODDLYIELD(enum MathError *error, const Date &settlement, const Date &maturity, const Date &lastInterest, double couponRate, double price, double redemption, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _MDURATION(enum MathError *error, const Date &settlement, const Date &maturity, double couponRate, double yldRate, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _PRICE(enum MathError *error, const Date &settlement, const Date &maturity, double couponRate, double yldRate, double redemption, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _DB(enum MathError *error, double cost, double salvage, Int32 life, Int32 period, Int32 month)
void adjustDate(Date &result, const Date &maturity)
DFC_FINANCE_EXIM Date _COUPPCD(enum MathError *error, const Date &settlement, const Date &maturity, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _ODDLPRICE(enum MathError *error, const Date &settlement, const Date &maturity, const Date &lastInterest, double couponRate, double yld, double redemption, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _DURATION(enum MathError *error, const Date &settlement, const Date &maturity, double couponRate, double yldRate, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _INTRATE(enum MathError *error, const Date &settlement, const Date &maturity, double investment, double redemption, Int32 basis)
DFC_FINANCE_EXIM Int32 _COUPNUM(enum MathError *error, const Date &settlement, const Date &maturity, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _TBILLPRICE(enum MathError *error, const Date &settlement, const Date &maturity, double discount)
DFC_FINANCE_EXIM double _RATE(enum MathError *error, double nper, double pmt, double pv, double fv, Int32 type, double guess)
DFC_FINANCE_EXIM double _PRICEMAT(enum MathError *error, const Date &settlement, const Date &maturity, const Date &issue, double rate, double yld, Int32 basis)
DFC_FINANCE_EXIM double _SYD(enum MathError *error, double cost, double salvage, double life, double per)
DFC_FINANCE_EXIM double _IPMT(enum MathError *error, double rate, double per, double nper, double pv, double fv, Int32 type)
DFC_FINANCE_EXIM Date _COUPNCD(enum MathError *error, const Date &settlement, const Date &maturity, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _NPER(enum MathError *error, double rate, double pmt, double pv, double fv, Int32 type)
DFC_FINANCE_EXIM Int32 _COUPDAYSNC(enum MathError *error, const Date &settlement, const Date &maturity, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _EFFECT(enum MathError *error, double nominal_rate, Int32 npery)
DFC_FINANCE_EXIM double _YIELDMAT(enum MathError *error, const Date &settlement, const Date &maturity, const Date &issue, double rate, double price, Int32 basis)
DFC_FINANCE_EXIM double _TBILLEQ(enum MathError *error, const Date &settlement, const Date &maturity, double discount)
DFC_FINANCE_EXIM double _ACCRINTM(enum MathError *error, const Date &issue, const Date &maturity, double rate, double par, Int32 basis)
DFC_FINANCE_EXIM double _PRICEDISC(enum MathError *error, const Date &settlement, const Date &maturity, double discRate, double redemption, Int32 basis)
DFC_FINANCE_EXIM double _DISC(enum MathError *error, const Date &settlement, const Date &maturity, double pr, double redemption, Int32 basis)
DFC_FINANCE_EXIM double _ACCRINT(enum MathError *error, const Date &issue, const Date &firstInterest, const Date &settlement, double rate, double par, Int32 frequency, Int32 basis)
DFC_FINANCE_EXIM double _DOLLARFR(enum MathError *error, double decimalDollar, Int32 fraction)
DFC_FINANCE_EXIM double _DOLLARDE(enum MathError *error, double fractionalDollar, Int32 fraction)
DFC_FINANCE_EXIM double _FVSCHEDULE(enum MathError *error, double pv, Int32 n, double schedule[])