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

DB: Add trigger on split #5

Open
victorbrun opened this issue Jan 24, 2021 · 0 comments
Open

DB: Add trigger on split #5

victorbrun opened this issue Jan 24, 2021 · 0 comments
Labels
bug Something isn't working database Issue concerning the database

Comments

@victorbrun
Copy link
Collaborator

victorbrun commented Jan 24, 2021

When new split is introduced the holdings of that instrument needs to be updated to counter the effect of adjusting prices. The trigger ought to be implemented as follows:
New split of instrument that is in holding table -> new transaction is created for each old transaction before split date. These transactions are on the same date as respective original transaction but at price 0 and quantity n*split_factor, n is quantity of original split.

Furthermore, transaction to holding trigger needs to be changed so the above, retroactive transactions, effect the holdings even though if they are closed.

@victorbrun victorbrun changed the title Add trigger on split DB: Add trigger on split Jan 28, 2021
@victorbrun victorbrun added the bug Something isn't working label Feb 2, 2021
@victorbrun victorbrun added the database Issue concerning the database label Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working database Issue concerning the database
Projects
None yet
Development

No branches or pull requests

1 participant