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

Support for OptionletAtm in CapFloorVolatility Configuration #276

Open
xiangwang456 opened this issue Nov 1, 2024 · 0 comments
Open

Support for OptionletAtm in CapFloorVolatility Configuration #276

xiangwang456 opened this issue Nov 1, 2024 · 0 comments

Comments

@xiangwang456
Copy link

Hi,

We encountered an issue when trying to build a CapFloorVolatility object with Type::OptionletAtm in version v1.8.12.2. It seems that OptionletAtm quotes are not being populated.

In the file OREData/ored/configuration/capfloorvolcurveconfig.cpp at line 368, the populateQuotes() function only checks for Type::TermAtm and Type::TermSurfaceWithAtm but does not include Type::OptionletAtm. This appears to prevent the use of OptionletAtm in our configuration.

Code snippet:

populateQuotes() {
    ...
    // ATM quotes. So, ATM flag is true i.e. 1 and RELATIVE flag is true with strike set to 0.
    if (type_ == Type::TermAtm || type_ == Type::TermSurfaceWithAtm) {
        for (const string& t : atmTenors_) {
            quotes_.push_back(stem + t + "/" + tenor + "/1/1/0");
        }
    ...
}

Proposed Solution:

Adding Type::OptionletAtm to the conditional statement might resolve this issue:

populateQuotes() {
    ...
    // ATM quotes. So, ATM flag is true i.e. 1 and RELATIVE flag is true with strike set to 0.
    if (type_ == Type::TermAtm || type_ == Type::TermSurfaceWithAtm || type_ == Type::OptionletAtm) {
        for (const string& t : atmTenors_) {
            quotes_.push_back(stem + t + "/" + tenor + "/1/1/0");
        }
    ...
}

Could you confirm if this change would be acceptable or if there's an alternative approach?

Thank you!

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

No branches or pull requests

1 participant