Login    Register

XLeratorDB/financial Documentation

ODDLYIELD


ODDLYIELD
 
Updated: 5 August 2010

Use ODDLYIELD to calculate the yield of a security settling during an odd last period.
Syntax
SELECT [westclintech].[wct].[ODDLYIELD] (
  <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Last_interest, 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. 
@Last_interest
the last coupon date of the security prior to the maturity. The period from the last interest date until the maturity date defines the odd interest period. All previous coupon dates are assumed to occur at regular periodic intervals as defined by @Frequency. @Last_interest 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 Types
float
Remarks
·         If @Rate < 0 or if @Pr < 0, then ODDLYIELD returns an error
·         If @Basis < 0 or if @Basis > 4, then ODDLYIELD returns an error
·         If @Frequency is any number other than 1, 2, 4, or 12, ODDLYIELD returns an error
Example 
SELECT wct.ODDLYIELD('2/7/2008'
,'6/15/2008'
,'10/15/2007'
,0.0375
,99.8782860147213
,100
,2
,0)
Here is the result set
----------------------
0.0405000000000013


  Comments
Add Comment
No Comments Yet


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