-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Problem
Some Instrument Type fields do not accept None as a valid value. During Instrument creation, this causes None to be replaced with a default numeric value (commonly 0).
Why this is an issue
0 is treated as a meaningful value, not as “unset”. As a result, downstream pricing and recalculation logic may not trigger, leading to incorrect persisted values.
Example
- Create a Bond instrument with an accrual schedule
- A field that should be
None(meaning “derive from schedule”) is set to0 - During pricing:
- The engine sees a numeric value (
0or any number) - Recalculation is skipped
- The engine sees a numeric value (
- The system writes
0instead of the correct calculated value
Expected behavior
- Instrument Type fields that represent “unset / derive / calculate” must allow
None - On creation, these fields should remain
Noneunless explicitly provided - Pricing logic should treat:
None→ value must be calculated- numeric value → explicit override
Actual behavior
- Validation rejects
None(“None is not a valid value for Instrument Types”) Noneis coerced into0(or another numeric default)- Pricing logic does not recalculate and persists incorrect values
Impact
- Incorrect pricing results (e.g. bonds with accrual schedules)
- Silent data corruption risk: stored values look valid but are wrong
Suggested fix
- Allow
Nonefor affected Instrument Type fields at validation/schema level - Ensure
Noneis preserved through serialization/deserialization (no coercion to0) - (Optional safety) If accrual schedule exists and value was not explicitly set, force recalculation during pricing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels