Why do I receive unexpected results using the DISC2RATE function in Financial Derivatives Toolbox 4.0.2 (R2007a)?

1 次查看(过去 30 天)
I would like to compute an interest rate from a discount rate using continuous compounding. I execute the following code:
r=disc2rate(-1, 0.851746813, 734489, 733040)
to compute the annual interest rate using starting and ending dates of Dec-29-2006 and Dec-17-2010. I would expect to obtain an interest rate slightly above 4%. However, I receive the following result:
r =
1.1074e-004
What am I doiing wrong?

采纳的回答

MathWorks Support Team
This is because you do not enter any valuation date input argument. Without a valuation date the input arguments 734489, 733040 are not treated as date strings but as periodic units.
Using Componding =365 (daily) and Compounding=-1 (continuous) leads to similar results. This is the case if you use a valuation date (assumed equal to the start date).
When I execute the following:
r=disc2rate(365, 0.851746813, 734489, 733040,733040)
I receive:
r =
4.0423e-002
When I execute the following:
r=disc2rate(-1, 0.851746813, 734489, 733040,733040)
I receive:
r =
4.0450e-002
Both values are near 4%.
However, if I do not specify a valuation date, the result I receive is completely different:
r=disc2rate(-1, 0.851746813, 734489, 733040)
r =
1.1074e-004
Entering a ValuationDate invokes the date interpretation; omitting a valuationDate invokes the default time interpretations.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Java Client Programming 的更多信息

标签

尚未输入任何标签。

产品


版本

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by