Thursday, September 09, 2010 Register
XLeratorDB/financial Online Documentation
ODDFYIELD
No Comments Yet
wct.ODDFYIELD
 
Updated: 09 April 2010

Use wct.ODDFYIELD to calculate the yield of a security with an odd first period
Syntax
SELECT [westclintech].[wct].[ODDFYIELD] (
  <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Issue, datetime,>
 ,<@First_coupon, datetime,>
 ,<@Rate, float,>
 ,<@Pr, 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.
@Pr
the price of the security. @Pr 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 @Pr < 0, then wct.ODDFYIELD returns an error
·         If @Basis < 0 or if @Basis >4, then wct.ODDFYIELD returns an error
·         If @Maturity <= @First_coupon, then wct.ODDFYIELD returns an error
·         If @Frequency is any number other than 1, 2, 4, or 12, wct.ODDFYIELD returns an error
Example 
SELECT wct.ODDFPRICE('5/12/2007'
,'6/1/2008'
,'5/11/2007'
,'12/1/2007'
,0.08
,99.003204572
,100
,2
,1)
Here is the result set
----------------------

0.0619340794713853



  Comments

 |  View Topic History  |
Print  
Privacy StatementTerms Of UseCopyright 2010 WestClinTech LLC

BorderBoxedGrayBoxedGreenBlue Small width layoutMedium width layoutMaximum width layoutMaximum textMedium textSmall textBack Top!