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

DateModel #152

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft

DateModel #152

wants to merge 30 commits into from

Conversation

alecloudenback
Copy link
Member

@alecloudenback alecloudenback commented Jul 10, 2023

Contracts already use FinanceCore.Timepoint... which is simply Union{Date,<:Real). This PR on the main PR would:

  • Define a DateModel which has two fields: a model (same model you would otherwise use in a Projection and valuation_date
  • in various logic, use dispatch combining the underlying type within the contract and the model to determine the decimal time (yearfrac) relative to the val date in the DateModel
  • Use BusinessDays, DayCounts, and logic from Miletus to determine dates of cashflows for real date bonds

Edit: the above won't work because each asset individually needs a day count convention. Make Timepoint a tuple of (Date,DayCount) instead?

Misc:

  • Would FinanceCore.Timepoint better be defined as a SumType?

@alecloudenback alecloudenback marked this pull request as draft July 10, 2023 04:00
Base automatically changed from FM-Transducers to master July 30, 2023 14:21
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

Successfully merging this pull request may close these issues.

1 participant