Hi,

On 2023/05/02 15:59:01 Vijay Vardhan wrote:
> Correct formula is as follows:
> RECEIVED = PurchaseValue*(1/( 1 -
> (DiscountRate*days_difference/days_in_year))).

You're right. For a zero coupon bond [1]:

received = purchasevalue + received * discountrate * ( days_to_maturity / 
days_in_year )

or

received = purchasevalue  / ( 1 - discountrate * days_to_maturity / 
days_in_year )

It follows that the function
RECEIVED(settlementdate; maturitydate; purchasevalue; discountrate; basis)
should return the same value as the formula
= purchasevalue * ( 1 - discountrate * 
YEARFRAC(settlementdate;maturitydate;basis) ) 


Regards,
Czesław

[1]
Documentation/How Tos/Calc: RECEIVED function
https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_RECEIVED_function

[2] source code, file: financial.cxx
.getReceived
http://openoffice-vm1-he-de.apache.org/xref/aoo41x/main/scaddins/source/analysis/financial.cxx?r=a06b8d1b#87


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org

Reply via email to