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

Add conversion transaction examples #63

Merged
merged 10 commits into from
Jan 24, 2022
Merged

Add conversion transaction examples #63

merged 10 commits into from
Jan 24, 2022

Conversation

pjohnmeyer
Copy link
Member

@pjohnmeyer pjohnmeyer commented Jan 20, 2022

Part 1 of #55

"security_id": "2936wa8yefhdsvcn",
"date": "2022-01-20",
"comments": ["comment-one", "comment-two", "..."]
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general approach I took was to have two versions of each transaction, a -minimal and a -all-fields example.

"security_id": "test-security-id",
"date": "2019-01-31",
"amount": {
"amount": "53.09",
"currency": "USD"
},
"reason_text": "for testing",
"comments": ["just a comment"]
"balance_security_id": "new-security",
"comments": ["comment-one", "comment-two", "..."]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional fields are always added after the required fields to hopefully make maintaining the two easier.

I am curious if some kind of generator exists.

"rounding_type": "NORMAL",
"description": "Trigger",
"converts_to_future_round": false
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For complex sub-objects like this one, I put in minimal examples -- figuring that more complex examples of more complex sub-types would come later.

Although I did find myself wondering if conversion triggers might possibly be a reference-able object with its own ID, instead of a type? It seems likely some of these things are going to be repeated over and over again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pjohnmeyer, I agree, but why don't we add that as a discussion point for the comment period? Don't think we have the bandwidth to change this right now unless someone wants to volunteer ;-)

}
],
"seniority": 1,
"interest_rate": "3.11",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The schema does not specify if interest rate should be 3.11 for 3.11%, or 0.0311 for 3.11%.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use percentage schema here as well

"pro_rata": "2500",
"conversion_valuation_cap": { "amount": "8000000", "currency": "USD" },
"conversion_discount": "0.1",
"conversion_fixed_ownership": "0.05",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For conversion_discount and conversion_fixed_ownership, the schema does specify the representation:

(as decimal percent - e.g. .12 for 12%, - if applicable)

However, I found myself wondering if we need a different schema for percentages, at least when the value should be constrained to 0-100.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should create a different schema for percentages and use it here and in other similar places.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#68

"pro_rata": "2500",
"conversion_valuation_cap": { "amount": "8000000", "currency": "USD" },
"conversion_discount": "0.1",
"conversion_fixed_ownership": "0.05",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to have a discount and a fixed ownership, or should it really be one or the other?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear if this should be a oneof relationship. Need to create issue for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#69

"date": "2018-06-07",
"resulting_security_ids": ["new-security-1", "..."],
"amount": {
"amount": "-867.53",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice the negative amount here. Do we need to allow negatives in the schema? Or, do we need to be more precise about when positives and negatives are allowed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of work to support positive and negative currencies as specific schemas. Won't change this to anything else for now

"date": "2021-03-15",
"quantity": "100",
"balance_security_id": "new-security",
"reason_text": "for testing"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually new, just moved down as I order the transactions in the same order they are in ObjectType.

@JSv4
Copy link
Contributor

JSv4 commented Jan 20, 2022

Part 1 of #55

Niiicce. I needed example transactions for the JSONL work, so I can take a closer look at these.

@pjohnmeyer
Copy link
Member Author

Issues are written up, believe this can be reviewed and merged @JSv4 @tmccnnll

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.

None yet

3 participants