-
Notifications
You must be signed in to change notification settings - Fork 289
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
FxBarrierOption scenario pricing #1412
Comments
For future reference, our primary channel for user questions is our forum. Are you looking to just remove these two lines of validation? |
If the barrier is Knock-Out than option value is 0, if barrier is Knock-In than option value is equals to value of vanilla option. These validations should be replaced by following code
so that the following additional test in
|
The equivalent handling can be implemented in |
In
BlackBarrierPriceFormulaRepository
there are some conditions on spot vs barrier level relation, namelyArgChecker.isFalse(isDown && spot <= barrier.getBarrierLevel(), "The Data is not consistent with an alive barrier (DOWN and spot<=barrier).");
ArgChecker.isFalse(!isDown && spot >= barrier.getBarrierLevel(),"The Data is not consistent with an alive barrier (UP and spot>=barrier).");
However, when pricing using scenario framework, I'd like to shift fx spot value, which might lead to shifted spot breaching a barrier (for example resulting in zero value in case of knock out). Instead a get a Failure result, which is unexpected.
The text was updated successfully, but these errors were encountered: