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

Design of Ledger, Valuation Basis, and Asset/Liability Types #19

Open
alecloudenback opened this issue May 17, 2020 · 1 comment
Open

Comments

@alecloudenback
Copy link

alecloudenback commented May 17, 2020

Transferring the following from a Slack post:

Hi all... I am interested in an interface to be a way to extend asset and liability modeling (planned packages in JuliaActuary) but as the interface may be more applicable generally, maybe JuliaFinance is the right home for it:
https://github.com/alecloudenback/Ledger

There is overlap with, e.g. JuliaFinance/GeneralLedger, but that (I think) is designed more around reflecting a real balance sheet (with account codes, etc) whereas I am more interested in a simplified modeling interface to track assets/liabilities/surplus

My vision is that by extending this package, different developers/users could plug into a way to value their own custom types and valuation bases, have it interface with other packages/types... similar to how things talk together so well with the Tables.jl interface

if anyone has thoughts on such an interface in general, I'd be happy to discuss.

Some specific discussion points:

  • How well does this fit into the existing JuliaFinance set of packages?
    My initial view: Not really, as the type hierarchy and dependencies in the existing GeneralLedgers.jl is pretty tightly linked with the other packages and requires defining a lot of parameters on the types. I think the fundamental concept to my proposed interface is that you tell it 1) what assets/liabilities there are and 2) a way to value them and it will glue them together.
  • I'm not sure if this should extend to tracking ledger entries/transactions if I'm mainly interested in modeling purposes?
  • How to track ledger over model projection time? One ledger that keeps up

My end goal is an integrated actuarial asset/liability modeling set of packages:
I'd define:

  • packages with basic types and assumptions on how they project (ie future expected insurance claims, or simple fixed income instruments)
  • packages with valuation basis that would say under basis A, value them at book value, or under basis B, value them at market value

Some things I think I need to solidify after typing this out:

  • In the repo linked above, value is very simply defined, but really needs a context to be valued in (time reference, yield structure, etc). Maybe the signature to value should be value(basis::ValuationBasis,myType, context) instead of value(basis::ValuationBasis,myType) ?
  • I think instead of extending by subclassing, it should be via traits instead?
@EricForgy
Copy link
Member

Copying over my intiial thought from Slack:

Hi Alec 👋

Your outline sounds good and is inline with my vision for JuliaFinance (of which you are now an owner 😊) so it makes sense to me to contribute there.

I've continued to develop GeneralLedgers.jl and other packages in private. I suppose I can see how much of that to open source, but I am - as you know - planning to build a business around almost exactly what you outlined 😊

I think it is important to be able to tie an ALM model to a balance sheet (and that is the whole point), so if you design something distinct from GeneralLedgers, it would be nice if we can think about how to at least link the two together.

For example, accompanying GeneralLedgers, there should be various modules that do the work to calculate what eventually appears in a ledger account, e.g. an investments module, reserves module, etc.

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

2 participants