Login    Register

XLeratorDB/financial Documentation

YIELD


YIELD
 
Updated: 5 August 2010
Use YIELD to calculate the yield on a security that pays periodic interest.
 
Syntax
SELECT [westclintech].[wct].[YIELD] (
  <@Settlement, datetime,>
 ,<@Maturity, 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. 
@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 security’s price per 100 face value. @Pr is an expression of type float or of a type that can be implicitly converted to float.
@Redemption
the security’s redemption value per 100 face value. @Redemption 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
·         YIELD is calculated iteratively, by calling PRICE and substituting values for @Yld such that the calculated @Price minus the supplied @Price is equal to zero. If a solution has not been found within 100 iterations YIELD returns an error.
·         If the @Frequency is any number other than 1, 2, 4, or 12, YIELD returns an error
·         If the @Basis < 0 or the @Basis > 4, YIELD returns an error
Example 
SELECT wct.YIELD('12/22/2007'
,'12/15/2009'
,0.05
,98.1593552470866
,100
,2
,0)
Here is the result set
----------------------

0.0599876514919673



  Comments
Add Comment
No Comments Yet


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