Post Reply 
HP-92 Simulation Attempt
05-15-2017, 03:18 AM
Post: #1
HP-92 Simulation Attempt
Hi all,

Try as I might, I got about 95% working but the Bond/Note calculations as described in the manual and applications manual are not making any sense to me and I cannot get them to work.

As I am not much of a financial wizard, I think I failed on this one Sad

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-15-2017, 05:21 PM
Post: #2
RE: HP-92 Simulation Attempt
(05-15-2017 03:18 AM)teenix Wrote:  Hi all,

Try as I might, I got about 95% working but the Bond/Note calculations as described in the manual and applications manual are not making any sense to me and I cannot get them to work.

As I am not much of a financial wizard, I think I failed on this one Sad

cheers

Tony


Tony, thanks for doing this. If you give me the page number of the manual where you are stuck, and the specifics, I'll be happy to take a look and see if i can help. No guarantee, but I'll try.


Regards,
Bob
Find all posts by this user
Quote this message in a reply
05-16-2017, 12:28 AM
Post: #3
RE: HP-92 Simulation Attempt
(05-15-2017 05:21 PM)bshoring Wrote:  
(05-15-2017 03:18 AM)teenix Wrote:  Hi all,

Try as I might, I got about 95% working but the Bond/Note calculations as described in the manual and applications manual are not making any sense to me and I cannot get them to work.

As I am not much of a financial wizard, I think I failed on this one Sad

cheers

Tony

Tony, thanks for doing this. If you give me the page number of the manual where you are stuck, and the specifics, I'll be happy to take a look and see if i can help. No guarantee, but I'll try.

Just the formulas on pages 113 and 114, specifically the definitions for E and N

an example from the HP-92 applications book Pg 85 - a bond settlement date is 9/17/1976, maturity date is 12/15/1976

(from 1st formula Pg 113)
N - doesn't look to be used in the case, although its definition seems a bit vague, whole periods, fractions of periods
E - is used, days in coupon period before settlement
coupon = 6 month, 12 month assumptions ??
I assume the entire bond period in this case??
If it is the days between the last coupon period start and bond settlement.
When does a coupon period end?

DIM/b - is that DIM divided by b (basis Switch) or just that DIM relates to a 360 or 365 "days between" value.

Accrued Interest is also included in the answer, but no mention of the method involved, I assume just coupon interest divided by the days in question.

I have been asked to do night survey flying in pitch black conditions in very remote areas next week, so I will have to focus on that as it is risky. If I get time (and internet) I will try to do some study into bonds which may reveal some more clues.

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-17-2017, 09:45 PM (This post was last modified: 05-17-2017 09:47 PM by bshoring.)
Post: #4
RE: HP-92 Simulation Attempt
If N is the number of semi-annual coupons between settlement date and maturity date, then that would always be a whole number, no fractions. If I buy a bond with a maturity date of 15 Aug 2019, then there should be a coupon (interest payment) on 15 Feb and 15 Aug each year, between the settlement date and maturity date. Let's say I put in an order to buy it on 9 March of this year, then the settlement date would normally be 12 March (3 business days later), so I would get my first coupon on 15 Aug 2017 and additional ones on 15 Feb 2018, 15 Aug 2018, 15 Feb 2019 and 15 Aug 2019, so there would be a total of 5 coupons.

I'm not sure about E. It could be one of two things:
1. The number of days between the last coupon date (15 Feb) and my settlement date of
12 March, OR
2. It could be the number of days between my settlement date and the next coupon date
(15 Aug).

Hope this helps a little.


Regards,
Bob
Find all posts by this user
Quote this message in a reply
05-18-2017, 11:05 AM
Post: #5
RE: HP-92 Simulation Attempt
(05-17-2017 09:45 PM)bshoring Wrote:  If N is the number of semi-annual coupons between settlement date and maturity date, then that would always be a whole number, no fractions. If I buy a bond with a maturity date of 15 Aug 2019, then there should be a coupon (interest payment) on 15 Feb and 15 Aug each year, between the settlement date and maturity date. Let's say I put in an order to buy it on 9 March of this year, then the settlement date would normally be 12 March (3 business days later), so I would get my first coupon on 15 Aug 2017 and additional ones on 15 Feb 2018, 15 Aug 2018, 15 Feb 2019 and 15 Aug 2019, so there would be a total of 5 coupons.

I'm not sure about E. It could be one of two things:
1. The number of days between the last coupon date (15 Feb) and my settlement date of
12 March, OR
2. It could be the number of days between my settlement date and the next coupon date
(15 Aug).

Hope this helps a little.

Thanks for the info Bob, I will keep fiddling with it.

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-21-2017, 01:58 AM
Post: #6
RE: HP-92 Simulation Attempt
(05-17-2017 09:45 PM)bshoring Wrote:  I'm not sure about E. It could be one of two things:
1. The number of days between the last coupon date (15 Feb) and my settlement date of
12 March, OR
2. It could be the number of days between my settlement date and the next coupon date
(15 Aug).

Hope this helps a little.

Hi Bob,

Still scratching my head :-)

From page 87, example 1 of HP92 Investor Apps Manual...

Semi annual
30/360 basis
Issue date = JUL 6, 1976
Settlement = AUG 23, 1976 (47 days)
Maturity = DEC 20, 1976 (117 days)

My guesses...
Issue date = start of coupon period
End of coupon period = 180 - (47 + 117) = 16 days after maturity
E (seems) to be days between Issue and Maturity (164 days)

Using the HP-92 to manually key in the calculation on 113 of HP-92 manual, I get an answer of 100.036. (Rounded = 100.34) The manual states an answer of 100.03

There is a small discrepancy which I cannot account for, which could mean the method I am using is still in error.

I think I have the accrued interest calculations working now for both 30/360 and actual/360.

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-21-2017, 02:01 AM
Post: #7
RE: HP-92 Simulation Attempt
(05-21-2017 01:58 AM)teenix Wrote:  (Rounded = 100.34)

Sorry (Rounded = 100.04)

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-21-2017, 03:42 AM
Post: #8
RE: HP-92 Simulation Attempt
[/quote]

Hi Bob,

Still scratching my head :-)

From page 87, example 1 of HP92 Investor Apps Manual...

Semi annual
30/360 basis
Issue date = JUL 6, 1976
Settlement = AUG 23, 1976 (47 days)
Maturity = DEC 20, 1976 (117 days)

My guesses...
Issue date = start of coupon period
End of coupon period = 180 - (47 + 117) = 16 days after maturity
E (seems) to be days between Issue and Maturity (164 days)

Using the HP-92 to manually key in the calculation on 113 of HP-92 manual, I get an answer of 100.036. (Rounded = 100.34) The manual states an answer of 100.03

There is a small discrepancy which I cannot account for, which could mean the method I am using is still in error.

I think I have the accrued interest calculations working now for both 30/360 and actual/360.

cheers

Tony
[/quote]

Hi Tony,

Using my HP-80, I also get 100.03.

This one is not a bond, so the characteristics would be a little different. It's a certificate of deposit or a short term note. Issue date is July 6, 1976, and the end of the coupon period in this case I believe would be the maturity date, since this is not a true bond.

I tend to agree with you that E would likely be the number of days between Issue and Maturity.

On my HP-80, when I entered the settle date and maturity date, there was no 30/360 option given as with later calculators, so I only got 119, which is the calendar days, then I entered the yield as "i" and the coupon of 5.80 as "PMT" and pressed shift-Bond and still got the same result as in the 92 book. I don't know if the number of days got changed when i pressed shift "Bond". But certainly in the instructions for the illustration given here for HP-92 it stated clearly to set the day basis to 360. In the tape in the illustration I see 0.77 AI and later 0.76 AI, which I'm sure is accrued interest, but I am wondering why they show two amounts that differ by a penny. OK, it must be 0.76 on a 30/360 basis and 0.77 on a calendar day basis.

I don't know if any of these could account for the difference you're getting, but you might try them.


Regards,
Bob
Find all posts by this user
Quote this message in a reply
05-21-2017, 04:57 AM
Post: #9
RE: HP-92 Simulation Attempt
(05-21-2017 03:42 AM)bshoring Wrote:  In the tape in the illustration I see 0.77 AI and later 0.76 AI, which I'm sure is accrued interest, but I am wondering why they show two amounts that differ by a penny. OK, it must be 0.76 on a 30/360 basis and 0.77 on a calendar day basis.

It looks like I used the wrong formula.

The one on top of Pg 114 in the HP92 Manual, gave the correct answer of 100.03

Still a long way to go, because of determining which formula to use for the various key press entries for bond calculations, but getting somewhere at least.

the HP92 calculates two accrued interest answers, one using 30/360 and another using Actual/360.

Thanks

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-23-2017, 11:58 AM
Post: #10
RE: HP-92 Simulation Attempt
I'm not sure if I can complete this one.

I cannot get the formulas for Bond type 1 and 2 to work at all as presented in the applications manual.

I also tried to calculate the examples from HP80 manual using the formula at the back of the manual but that wont give the correct answer also.

I ran the same problem through the HP80 and got a trace which consisted of over 5000 code lines. I dissected all the procedures in this code and got a PC to run the same algorithm and the results matched. However, the code as dissected does not match what is published in the formula section.

An example is the last of the formula which states -(100 x Interest * J / 2)

The HP80 execution code for this part appears to be -(Yield * J / 2)

If the HP92 Bond Type 1 and 2 formulas are not as the code executes then there may not be a easy solution for this calculator.

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-23-2017, 11:41 PM
Post: #11
RE: HP-92 Simulation Attempt
Any HP-92 in germany for reading ROMs?

Bernhard

That's one small step for a man - one giant leap for mankind.
Find all posts by this user
Quote this message in a reply
05-27-2017, 04:00 PM
Post: #12
RE: HP-92 Simulation Attempt
(05-23-2017 11:41 PM)PANAMATIK Wrote:  Any HP-92 in germany for reading ROMs?

Bernhard

Might be the only way for this tricky beast :-)

cheers
Tony
Find all posts by this user
Quote this message in a reply
05-29-2017, 03:47 AM
Post: #13
RE: HP-92 Simulation Attempt
I appreciate all your efforts. The HP-92 is turning out to be a far more complex machine than previously thought.


Regards,
Bob
Find all posts by this user
Quote this message in a reply
05-29-2017, 08:04 AM
Post: #14
RE: HP-92 Simulation Attempt
(05-29-2017 03:47 AM)bshoring Wrote:  I appreciate all your efforts. The HP-92 is turning out to be a far more complex machine than previously thought.

Seems to be.
I will need to look into the mathematics of bonds a little deeper.

The problems always seem to focus on the 'E' value.
DIS = days between issue and settlement date
E = days in coupon period at settlement
DSC = E - DIS, and is supposed to be days between settlement and next 6 month coupon date (but DSC is not used with bond terms < 6 months)

The only dates given for these problems as far as I can tell are the settlement and maturity dates, so I'm not sure how the coupon dates and E fit in.
I think the issue date is where the coupon period starts from ??

cheers

Tony
Find all posts by this user
Quote this message in a reply
05-29-2017, 12:38 PM
Post: #15
RE: HP-92 Simulation Attempt
I got an offer to eventually get an HP-92 for reading its ROM's from c_d. If it will arrive here I will publish the ROMs hopefully soon.

Bernhard

That's one small step for a man - one giant leap for mankind.
Find all posts by this user
Quote this message in a reply
05-29-2017, 01:37 PM
Post: #16
RE: HP-92 Simulation Attempt
(05-29-2017 12:38 PM)PANAMATIK Wrote:  I got an offer to eventually get an HP-92 for reading its ROM's from c_d. If it will arrive here I will publish the ROMs hopefully soon.

Bernhard

That's awesome. If I can get a copy, I will get the calculator working ASAP.

cheers

Tony
Find all posts by this user
Quote this message in a reply
06-02-2017, 02:52 PM (This post was last modified: 06-02-2017 02:52 PM by PANAMATIK.)
Post: #17
RE: HP-92 Simulation Attempt
(05-29-2017 01:37 PM)teenix Wrote:  
(05-29-2017 12:38 PM)PANAMATIK Wrote:  I got an offer to eventually get an HP-92 for reading its ROM's from c_d. If it will arrive here I will publish the ROMs hopefully soon.

Bernhard

That's awesome. If I can get a copy, I will get the calculator working ASAP.

cheers

Tony

I'm sorry, but unfortunately it was a false alarm, he told me it was an HP-91 he could offer. Anyway this will at least lead to the HP-91 ROM code. :-)

Bernhard

That's one small step for a man - one giant leap for mankind.
Find all posts by this user
Quote this message in a reply
06-02-2017, 11:49 PM
Post: #18
RE: HP-92 Simulation Attempt
(06-02-2017 02:52 PM)PANAMATIK Wrote:  I'm sorry, but unfortunately it was a false alarm, he told me it was an HP-91 he could offer. Anyway this will at least lead to the HP-91 ROM code. :-)

Bernhard

That's a shame, but the 91 is still a good score.

Back to the maths then...... :-)

cheers
Tony
Find all posts by this user
Quote this message in a reply
06-06-2017, 11:34 PM
Post: #19
RE: HP-92 Simulation Attempt
Hi,

I think I found the meaning of "E" in the formulas.

It appears to be the same value as the result of the COUPDAY function in EXCEL.

This function has the same definition as that mentioned in the HP92 manuals and also from what I can find, on the web.

That means only values 180 and 182.5 should be used for E depending on how the 360/365 switch is set.

I also noticed that the math routines for bonds in the HP80 use both 180 and 182.5 in the calculations.

cheers

Tony
Find all posts by this user
Quote this message in a reply
06-20-2017, 01:00 AM
Post: #20
RE: HP-92 Simulation Attempt
Slow proceedings, but more progress :-)

After research and some frustration, I'm pretty sure I've worked out the 2 formulas for the [PRICE] button. The solution is as printed in the manual but is dependant on how the input data is represented and it produces the same answers for the examples shown in both HP92 finance manuals.

The [YIELD] calculations are more complicated so still a way to go

cheers

Tony
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 15 Guest(s)