lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Input-sequence editor testing


From: Vaclav Slavik
Subject: Re: [lmi] Input-sequence editor testing
Date: Sun, 11 Jul 2010 19:08:15 +0200

Hi,

On Sun, 2010-07-04 at 22:01 +0000, Greg Chicares wrote:
> * Cannot reenter "..." with a sequence produced by "..."
> 
>   alt-F N I
>   "Individual payment"
>   "..."
>   choose "until age"
>   OK
>   "..."
> messagebox:
>   The sequence is invalid and cannot be edited visually.
>   Interval [ 55, 56 ) is improper: it ends after the last possible
> duration.
> The default "until age" is 100; 99 would be better, but much better
> would be DBDictionary::MaturityAge. 

I must be doing something wrong in my duration and age calculations,
because the code is supposed to do what you suggest. When you change the
mode form "maturity" to "age" or "duration", the number should be
updated to the respective representation of the same point in time.

Can you see where I made the mistake? The relevant parts are:
 1. duration_scalars_ vector, with "absolute" durations for the rows
 2. compute_duration_scalar() to compute 1. for a row
 3. adjust_duration_num(), to fill the numeric field correctly

In compute_duration_scalar(), e_maturity is converted to duration scalar
by calling input_.years_to_maturity() (this yields 55 in your example).

In adjust_duration_num(), numeric field for e_attained_age ("until age")
is set to the scalar (55) plus input_.issue_age().

Is (any of) this wrong?

Thanks in advance,
Vaclav




reply via email to

[Prev in Thread] Current Thread [Next in Thread]