Difference between revisions of "Manuals/calci/ODDFPRICE"

From ZCubes Wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div style="font-size:30px">'''ODDFPRICE(s,m,iss,fc,r,yld,rdm,f,b)'''</div><br/>
+
<div style="font-size:23px">'''ODDFPRICE (SettlementDate,MaturityDate,IssueDate,FirstCouponDate,Rate,Yield,Redemption,Frequency,Basis)
*<math> s </math> is the settlement.
+
'''</div><br/>
*<math> m </math> is the maturity.
 
*<math> iss </math> is the issue date.
 
*<math> fc </math> is the first coupon date.
 
*<math> r </math> is the rate of interest.
 
*<math> yld </math> is the security's yield.
 
*<math> rdm </math> is the security's redemption.
 
*<math> f </math> is the frequency.
 
*<math> b  </math> is the basis.
 
  
 +
*<math> SettlementDate </math> is the settlement.
 +
*<math> MaturityDate </math> is the maturity.
 +
*<math> IssueDate </math> is the issue date.
 +
*<math> FirstCouponDate </math> is the first coupon date.
 +
*<math> Rate </math> is the rate of interest.
 +
*<math> Yield </math> is the security's yield.
 +
*<math> Redemption </math> is the security's redemption.
 +
*<math> Frequency </math> is the frequency.
 +
*<math> Basis  </math> is the basis.
 +
**ODDFPRICE(), returns the price per $100 face value of a security with an odd first period
  
 
==Description==
 
==Description==
 
*This function gives the price of a security that pays interest periodically, but has an odd first period.
 
*This function gives the price of a security that pays interest periodically, but has an odd first period.
 
*This function is the inverse of the related OddFYield function.
 
*This function is the inverse of the related OddFYield function.
*In <math> ODDFPRICE(s,m,iss,fc,r,yld,rdm,f,b)</math>,<math> s </math> is the security's settlementDate. It  is a Date or DateTime specifying when the security was purchased.
+
*In <math> ODDFPRICE (SettlementDate,MaturityDate,IssueDate,FirstCouponDate,Rate,Yield,Redemption,Frequency,Basis)
*<math> m </math> is the security's maturity date. This date is  after the settlement date specifying when the security matures.
+
</math>,<math> SettlementDate </math> is the security's settlementDate. It  is a Date or DateTime specifying when the security was purchased.
*<math> iss </math> is the date which is specifying when the security was issued.
+
*<math> MaturityDate </math> is the security's maturity date. This date is  after the settlement date specifying when the security matures.
*<math> fc </math>  is the date which is specifying when the security has its first interest payment. This date must be after the settlement date but before the maturity date.  
+
*<math> IssueDate </math> is the date which is specifying when the security was issued.
*<math> r </math>  is a non-negative number specifying the interest rate for the coupons that the security pays.
+
*<math> FirstCouponDate </math>  is the date which is specifying when the security has its first interest payment. This date must be after the settlement date but before the maturity date.  
*<math> pr </math>  is a non-negative number or currency specifying the security’s purchase price per $100 of face value.
+
*<math> Rate </math>  is a non-negative number specifying the interest rate for the coupons that the security pays.
*<math> rdm </math>  is a number or currency specifying the security’s value at redemption per $100 of face value.
+
*<math> Yield </math>  is a non-negative number or currency specifying the security’s purchase price per $100 of face value.
*<math> f </math> is  is a number specifying the number of coupons per year.  
+
*<math> Redemption </math>  is a number or currency specifying the security’s value at redemption per $100 of face value.
 +
*<math> Frequency </math> is  is a number specifying the number of coupons per year.  
 
ODDFPRICE is calculated as:
 
ODDFPRICE is calculated as:
 
<math>\left [\frac{redemption}{\left (1+\frac{yld}{frequency}\right )^{\left (N-1+\frac{DSC}{E}\right )}}\right ] +
 
<math>\left [\frac{redemption}{\left (1+\frac{yld}{frequency}\right )^{\left (N-1+\frac{DSC}{E}\right )}}\right ] +
Line 33: Line 36:
 
   2 -semiannual payments
 
   2 -semiannual payments
 
   4 -quarterly.
 
   4 -quarterly.
*<math> b </math> is is an optional number specifying the day basis system to use.  
+
*<math> Basis </math> is is an optional number specifying the day basis system to use.  
 
*The following types are supported
 
*The following types are supported
 
{| class="wikitable"
 
{| class="wikitable"
Line 52: Line 55:
  
 
*<math> ODDFPRICE </math>  is calculated as follows:
 
*<math> ODDFPRICE </math>  is calculated as follows:
 +
<math>\left [\frac{redemption}{\left (1+\frac{yld}{frequency}\right )^{\left (N+N_3+\frac{DSC}{E}\right )}}\right ] +
 +
\left [\dfrac{100*\frac{rate}{frequency}* \sum_{i=1}^{NC}\dfrac{DC_i}{NL_i}}{\left (1+\dfrac{yld}{frequency}\right )^{\left (N_3+\frac{DSC}{E}\right )}}\right ]
 +
+
 +
\left [\sum_{k=1}^N\dfrac{100*\frac{rate}{frequency}}{\left (1+\dfrac{yld}{frequency}\right )^{\left (k-N_2+\dfrac{DSC}{E}\right )}}\right ]
 +
-
 +
\left [100*\frac{rate}{frequency}* \sum_{i=1}^{NC}\frac{A_i}{NL_i}\right ] </math>
 +
 
*Odd short first coupon:
 
*Odd short first coupon:
 
*<math> ODDFPRICE</math>=
 
*<math> ODDFPRICE</math>=
Line 70: Line 80:
 
*<math>Nq</math> = number of whole quasi-coupon periods between settlement date and first coupon.
 
*<math>Nq</math> = number of whole quasi-coupon periods between settlement date and first coupon.
 
*The date arguments must satisfy the following conditions:  
 
*The date arguments must satisfy the following conditions:  
       iss(issue)<s(settlement) <fc(first coupon) < m(maturity).  
+
       IssueDate<SettlementDate <FirstCouponDate < MaturityDate.  
*Also <math>s</math>, <math>m</math>,<math>iss</math>,<math>fc</math> and <math>b</math> are truncated in to integers.
+
*Also <math>SettlementDate</math>, <math>MaturityDate</math>,<math>IssueDate</math>,<math>FirstCouponDate</math> and <math>Basis</math> are truncated in to integers.
 
*This function gives the result as error when  
 
*This function gives the result as error when  
     1.The date arguments s,m and fc are not a valid date.
+
     1.The date arguments SettlementDate,MaturityDate and FirstCouponDate are not a valid date.
     2.r<0 or yld<0
+
     2.Rate<0 or Yield<0
     3.b<0 or b>4
+
     3.Basis<0 or Basis>4
  
 
==Examples==
 
==Examples==
#'''Example 1'''
+
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|+Spreadsheet
 
|+Spreadsheet
Line 114: Line 124:
 
#=ODDFPRICE(B1,B2,B3,B4,B5,B6,B7,B8,B9)= 98.2709210000
 
#=ODDFPRICE(B1,B2,B3,B4,B5,B6,B7,B8,B9)= 98.2709210000
 
#=ODDFPRICE(B1,B2,B3,B4,B5,B6,B7,2,2) =98.3610959065
 
#=ODDFPRICE(B1,B2,B3,B4,B5,B6,B7,2,2) =98.3610959065
 +
 +
==Related Videos==
 +
 +
{{#ev:youtube|v=vh7wCl-LAyc|280|center|ODDFPRICE}}
  
 
==See Also==
 
==See Also==
Line 121: Line 135:
  
 
==References==
 
==References==
 +
*[https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_ODDFPRICE_function Oddfprice]
  
==See Also==
 
==References==
 
 
 
 
 
 
 
 
s is the settlement,m is the maturity, , fc ,r is the rate of interest,  is the  security’s , rdm is the security's redemption,f is the frequency and b is the basis.
 
 
 
 
 
<div id="6SpaceContent" class="zcontent" align="left"> <font color="#000000"><font face="Arial, sans-serif">'''<font size="2">ODDFPRICE(settle, M, I, FC, R, yield, redem, F, basis)</font>'''</font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''Where 'settle''''</font><font size="2"> is the security's settlement date, 'M' is the security's maturity date, 'I' is the security's issue date, 'FC' is the security's first coupon date, 'R' is the security's interest rate, 'Yield' is the security's annual yield, 'redem' is the security's redemption value, 'F' is the number of coupon payments per year and 'basis' is the type of day count basis to use.</font></font></font>
 
 
</div>
 
----
 
<div id="1SpaceContent" class="zcontent" align="left"> 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">This function calculates the price per $100 face value of a security having an odd first period.</font></font></font>
 
 
</div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left"> 
 
 
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">ODDFPRICE shows the error value, when 'settle', 'M', 'I', or 'FC' is not a valid date or 'R' or 'Yield' &lt; 0.</font></font></font>
 
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">Basis must be between 0 and 4. </font></font></font>
 
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">M &gt;FC &gt; settle &gt; I</font></font></font>
 
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">ODDFPRICE is calculated as follows: </font></font></font>
 
 
<br /><br />
 
  
<br /><br />
 
  
</div>
+
*[[Z_API_Functions | List of Main Z Functions]]
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
 
ODDFPRICE
 
 
 
</div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left"><font color="#000000"><font face="Arial, sans-serif"><font size="2">'''Lets see an example,'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''ODDFPRICE(settle, M, I, FC, R, yield, redem, F, basis)'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''B'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''10-15- 2010'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''01-10-2023'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''09-15-2010'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''01-10-2011'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''8.35%'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''5.25%'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''100'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''2'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''1'''</font></font></font>
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''UNIQ274ac2406bae61f2-nowiki-00000002-QINU'''</font></font></font>
 
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="5SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE1" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| class="  " | Column1
 
| class="      " | Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f" | 10-15- 2010
 
| class="sshl_f" | 127.7338
 
| class="                                                                      " |
 
| class="                        sshl_f  " |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 01-10-2023
 
| class="                                                                                sshl_f  " |
 
| class=" " |
 
| class=" " |
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 09-15-2010
 
| class="          " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class="sshl_f" | 01-10-2011
 
| class=" " |
 
| class="  " |
 
<div id="5Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
| class="sshl_f" | 8.35%
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| class="sshl_f" | Row6
 
| class="sshl_f" | 5.25%
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="odd"
 
| class="sshl_f" | Row7
 
| class="sshl_f" | 100
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| class="sshl_f" | Row8
 
| class="sshl_f" | 2
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="odd"
 
| class="sshl_f" | Row9
 
| class="sshl_f" | 1
 
| class="                                              " |
 
| class=" " |
 
| class="    SelectTD  SelectTD" |
 
<div id="5Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
|}
 
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 15:53, 16 November 2018

ODDFPRICE (SettlementDate,MaturityDate,IssueDate,FirstCouponDate,Rate,Yield,Redemption,Frequency,Basis)


  • is the settlement.
  • is the maturity.
  • is the issue date.
  • is the first coupon date.
  • is the rate of interest.
  • is the security's yield.
  • is the security's redemption.
  • is the frequency.
  • is the basis.
    • ODDFPRICE(), returns the price per $100 face value of a security with an odd first period

Description

  • This function gives the price of a security that pays interest periodically, but has an odd first period.
  • This function is the inverse of the related OddFYield function.
  • In , is the security's settlementDate. It is a Date or DateTime specifying when the security was purchased.
  • is the security's maturity date. This date is after the settlement date specifying when the security matures.
  • is the date which is specifying when the security was issued.
  • is the date which is specifying when the security has its first interest payment. This date must be after the settlement date but before the maturity date.
  • is a non-negative number specifying the interest rate for the coupons that the security pays.
  • is a non-negative number or currency specifying the security’s purchase price per $100 of face value.
  • is a number or currency specifying the security’s value at redemption per $100 of face value.
  • is is a number specifying the number of coupons per year.

ODDFPRICE is calculated as:

  • The supported values are
 1 -annual payments
 2 -semiannual payments
 4 -quarterly.
  • is is an optional number specifying the day basis system to use.
  • The following types are supported
Basis Day count basis
0 or omitted American 30/360 (default)
1 actual/actual
2 actual/360
3 actual/365
4 European 30/360
  • is calculated as follows:

  • Odd short first coupon:
  • =
  • = number of days from the beginning of the coupon period to the settlement date (accrued days).
  • = number of days from the settlement to the next coupon date.
  • = number of days from the beginning of the odd first coupon to the first coupon date.
  • = number of days in the coupon period.
  • = number of coupons payable between the settlement date and the redemption date. (If this number contains a fraction, it is raised to the next whole number.)
  • Odd long first coupon:
  • =
  • = number of days from the beginning of the ith, or last, quasi-coupon period within odd period.
  • = number of days from dated date (or issue date) to first quasi-coupon (i = 1) or number of days in quasi-coupon (i = 2,..., i = NC).
  • = number of days from settlement to next coupon date.
  • = number of days in coupon period.
  • = number of coupons payable between the first real coupon date and redemption date. (If this number contains a fraction, it is raised to the next whole number.)
  • = number of quasi-coupon periods that fit in odd period. (If this number contains a fraction, it is raised to the next whole number.)
  • = normal length in days of the full ith, or last, quasi-coupon period within odd period.
  • = number of whole quasi-coupon periods between settlement date and first coupon.
  • The date arguments must satisfy the following conditions:
     IssueDate<SettlementDate <FirstCouponDate < MaturityDate. 
  • Also , ,, and are truncated in to integers.
  • This function gives the result as error when
    1.The date arguments SettlementDate,MaturityDate and FirstCouponDate are not a valid date.
    2.Rate<0 or Yield<0
    3.Basis<0 or Basis>4

Examples

Spreadsheet
A B
1 5/1/2001 4/30/1999
2 3/29/2030 1/5/2015
3 4/10/2001 3/10/1999
4 8/16/2005 2/1/2000
5 8.1% 9.35%
6 6.9% 8.76%
7 150 75
8 1 1
9 0 0
  1. =ODDFPRICE(A1,A2,A3,A4,A5,A6,A7,A8,A9) = 118.7679606261
  2. =ODDFPRICE(B1,B2,B3,B4,B5,B6,B7,B8,B9)= 98.2709210000
  3. =ODDFPRICE(B1,B2,B3,B4,B5,B6,B7,2,2) =98.3610959065

Related Videos

ODDFPRICE

See Also

References