[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    TBILLPRICE in kspread - bug or my error?
From:       <a.celli () infinito ! it>
Date:       2003-07-28 20:50:57
[Download RAW message or body]

I'm translating Kspread.po and i found some trouble to 
understand what
tbillprice and tbillyield actually do.
For my naif approach they seem wrong !

To explain the problem I'll report messages describing 
these functions

The TBILLPRICE functions returns the price per $100 value 
for a treasury 
bill. The maturity date must be after the settlement date 
but within 365 
days. The discount rate must be positive.
TBILLPRICE(settlement; maturity; discount):
TBILLPRICE(\"2/28/2001\"; \"8/31/2001\"; 200) returns 
-10122.22

Then I'll pay a negative price (= I'll receive money) to 
buy 
the right to receive 100$ after 6 months. 
If I'm right, I'll receive 10,222.22$ for free. 
Too good to be true!!

"The TBILLYIELD functions returns the yield for a treasury 
bill. The maturity 
"date must be after the settlement date but within 365 
days. The price must "
"be positive."
  "TBILLYIELD(settlement; maturity; price)"
  "TBILLYIELD(\"2/28/2001\"; \"8/31/2001\"; 600) returns 
-1.63"

A bit inconsistent ;-)
TBILLPRICE computes negative prices,
  but TBILLYIELD requires positive prices !!!!

May the problem is related to unrealistic values for the 
discount rate (200%)
and the price payed (600$) to receive 100$ .

Then i looked for more realistic examples and i found 
http://www.mtsu.edu/~dgraddy/webda9.htm

                
   Average    Price Issue    Maturity     Discount 
      Per
   Term          Date             Date             Rate 
        $100

364 days      12/12/96     12/11/97       5.16% 
      94.783
182 days      12/05/96     06/05/97       5.04% 
      97.452
  90 days      11/29/96     02/27/97       5.03% 
      98.743
181 days      11/29/96     05/29/97       5.07% 
      97.451
  91 days      11/21/96     02/20/97       5.03% 
      98.729
....

but i was not able to reproduce the same results :-(((
I get allways negative prices or yields.

Did i something wrong or there is a bug ?

bye, Andrea Celli

La tua casella email ti va stretta?
Prova Infinito XmaiL: 60MB di spazio
e 10MB di allegati a solo 1 Euro al mese!

http://www.infinito.it/xmail

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic