yellowbean / Hastructure

ABS/MBS cashflow engine written in Haskell, with API to Python and C/Java (on the way)
https://deal-bench.xyz
Other
16 stars 4 forks source link

[Break] Combine `Deal Status` with `Deal Date` #207

Open yellowbean opened 1 month ago

yellowbean commented 1 month ago

Context

The Dates from deal is actually highly coupled with Deal Status

for example,

deal status = "preClosing", then, there has to be a "closing date" in the Dates , otherwise engine will break. deal status = "amortising", then "first payment date" doesn't really make sense any more

The new propose syntax from the engine will be:

DealStatus = Amortizing Last(PayDay, CollectionDay) Next(PayDay, CollectionDay) StatedDate
           | PreClosing ClosingDay DatePattern DatePattern StatedDate
                    .....

In this way, the Deal Status is coupled with the Dates

Consequence

This will break the code