Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Enable clean up call in multiple locations #218

Closed
yellowbean opened this issue Sep 29, 2024 · 2 comments
Closed

[Feature] Enable clean up call in multiple locations #218

yellowbean opened this issue Sep 29, 2024 · 2 comments

Comments

@yellowbean
Copy link
Owner

yellowbean commented Sep 29, 2024

current implementation

The clean up test only was performed at beginning of bond waterfall execution (which is defined by "bond payment frequency"

Propose

The clean up test should be performed in multiple locations

  • a DatePattern to be tested
  • with optional a test range for clean up

Location of changes:

in Deal Run assumption

Syntax

current syntax

The statement will be executed right before each waterfall/liability payment day

("call", ("if", `<Condition>`))

new syntax

 # backward compatible -> test on each day of waterfall/liability payment day (before waterfall execution)
 ("call", ("if", `<Condition>` ))

 # test on dates described by <DatePattern>, the `if` is redundant.
 ("callWhen", ("onDates", `<DatePattern>`, `<Condition 1>`, `<Condition 2>`, `<Condition 3>` )
             , ("if", `<Condition 1>`, `<Condition 2 >`)
 )
@yellowbean yellowbean linked a pull request Oct 8, 2024 that will close this issue
@yellowbean yellowbean removed a link to a pull request Oct 12, 2024
@yellowbean
Copy link
Owner Author

yellowbean commented Nov 3, 2024

Step 1 , clean up current code

current logic:

case fruit of 
   Just apple ->
       if testSweet apple then 
           <ProcessA>
       else
           <ProcessB>
   Nothing ->
           <ProcessB>

Done with : https://stackoverflow.com/questions/79152742/how-to-factor-out-duplication-code-haskell-maybe-if-else

@yellowbean
Copy link
Owner Author

d49fbaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant