Skip to content

Fix missing validation for binomial_steps in API#54

Merged
JohannesMeyerYC merged 1 commit into
Quant-Enthusiasts:mainfrom
si-ddh:fix/binomial-steps-validation
May 3, 2026
Merged

Fix missing validation for binomial_steps in API#54
JohannesMeyerYC merged 1 commit into
Quant-Enthusiasts:mainfrom
si-ddh:fix/binomial-steps-validation

Conversation

@si-ddh

@si-ddh si-ddh commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds validation for binomial_steps to ensure it is a positive integer.

Changes

  • Validate binomial_steps in validate_portfolio_item()
  • Validate binomial_steps in /price_option

Result

Invalid input now returns HTTP 400 instead of reaching the C++ layer.

Closes #53

@si-ddh

si-ddh commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

I checked the latest CI runs on main, and the same checks are failing there as well, so this seems unrelated to this PR.
If that’s expected, would it be possible to re-run the checks or proceed with merging once CI is fixed?

@JohannesMeyerYC
JohannesMeyerYC merged commit c5f23bc into Quant-Enthusiasts:main May 3, 2026
6 of 18 checks passed
@si-ddh
si-ddh deleted the fix/binomial-steps-validation branch May 3, 2026 15:23
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.

Missing validation for binomial_steps allows invalid values to reach C++ core

2 participants