-
Notifications
You must be signed in to change notification settings - Fork 225
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
Behaviour of cross asset simulation configuration (FX) #235
Comments
Absolutely, a bug or at least an unnecessary restriction. We should fix this. |
Thanks for checking, after looking into the source, I found that actually the currencies defined in the Market section are irrelevant (at least in their order) for the Cross asset model. The problem is only within the CrossAssetModel node. Checking the validation code, considering the build methods, it is assumed that
as the
and the
Considering the validation code above, this can only work if the first currency is the domestic currency, if it is not, then the fxConfigs_ vector will always miss the domestic currency at the wrong place. I don't have a clever idea that generalizes this without probably breaking a lot of other dependent code (e.g. a possibility might be to move the skipping of the domestic currency in I think a better and simpler solution (in addition to documenting this in the user guide) might be to simply assert that the first currency has to be the domestic currency and failing if it is not, e.g.:
|
After trying a base currency change, I've discovered some irritating behaviour in the simulation configuration validity checking:


I tried to change the base currency to USD by simply changing the BaseCurrency tag in both CrossAssetModel and Market to USD:
However, unless the FIRST currency is not set to the base currency, ORE fails checking this config by passing back


an error occurred: currency mismatch between IR and FX config vectors
as an error. So this is actually working:I'm tempted to add a detailed explanation in the user guide, but I'm not sure whether this behaviour shouldn't be rather treated as a bug (as the definition of the currency sequence should be free as long as it is consistent between CrossAssetModel and Market)...
The text was updated successfully, but these errors were encountered: