Login    Register

XLeratorDB/financial Documentation

ODDFPRICE


ODDFPRICE
 
Updated: 5 August 2010

Use ODDFPRICE to calculate the price per $100 face value of a security with an odd first period
Syntax
SELECT [westclintech].[wct].[ODDFPRICE] (
  <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Issue, datetime,>
 ,<@First_coupon, datetime,>
 ,<@Rate, float,>
 ,<@Yld, float,>
 ,<@Redemption, float,>
 ,<@Frequency, float,>
 ,<@Basis, nvarchar(4000),>)
 
Arguments
@Settlement
the settlement date of the security. @Settlement is an expression that returns a datetime or smalldatetime value, or a character string in date format. 
@Maturity
the maturity date of the security. @Maturity is an expression that returns a datetime or smalldatetime value, or a character string in date format. 
@Issue
the issue date of the security; the date from which the security starts accruing interest. @Issue is an expression that returns a datetime or smalldatetime value, or a character string in date format. 
@First_coupon
the first coupon date of the security. The period from the issue date until the first coupon date defines the odd interest period. All subsequent coupon dates are assumed to occur at regular periodic intervals as defined by @Frequency. @First_coupon is an expression that returns a datetime or smalldatetime value, or a character string in date format. 
@Rate
the security’s annual coupon rate. @Rate is an expression of type float or of a type that can be implicitly converted to float.
@Yld
the security’s annual yield. @Yld is an expression of type float or of a type that can be implicitly converted to float.
@Frequency
the number of coupon payments per year. For annual payments, @Frequency = 1; for semi-annual, @Frequency = 2; for quarterly, @Frequency = 4; for monthly, @Frequency = 12. @Frequency is an expression of type float or of a type that can be implicitly converted to float.
@Basis
is the type of day count to use. @Basis is an expression of the character string data type category.
 
@Basis
Day count basis 
0 or omitted
US (NASD) 30/360
1
Actual/Actual
2
Actual/360
3
Actual/365
4
European 30/360
 
Return Type
float
Remarks
·         If @Rate < 0 or if @Yld < 0, then ODDFPRICE returns an error
·         If @Basis < 0 or if @Basis >4, then ODDFPRICE returns an error
·         If @Maturity <= @First_coupon, then ODDFPRICE returns an error
·         If @Frequency is any number other than 1, 2, 4, or 12, ODDFPRICE returns an error
Example 
SELECT wct.ODDFPRICE('5/12/2007'
,'6/1/2008'
,'5/11/2007'
,'12/1/2007'
,0.08
,0.09
,100
,2
,1)
Here is the result set
----------------------

99.003204571979



  Comments
Add Comment
No Comments Yet


 |  View Topic History  |
Copyright 2010 WestClinTech LLC         Privacy Policy        Terms of Service