{"action":"created","issue":{"url":"https://api.github.com/repos/lballabio/QuantLib/issues/415","repository_url":"https://api.github.com/repos/lballabio/QuantLib","labels_url":"https://api.github.com/repos/lballabio/QuantLib/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/lballabio/QuantLib/issues/415/comments","events_url":"https://api.github.com/repos/lballabio/QuantLib/issues/415/events","html_url":"https://github.com/lballabio/QuantLib/issues/415","id":299487986,"number":415,"title":"Lazy evaluation in FloatingRateCoupon?","user":{"login":"pcaspers","id":2605997,"avatar_url":"https://avatars2.githubusercontent.com/u/2605997?v=4","gravatar_id":"","url":"https://api.github.com/users/pcaspers","html_url":"https://github.com/pcaspers","followers_url":"https://api.github.com/users/pcaspers/followers","following_url":"https://api.github.com/users/pcaspers/following{/other_user}","gists_url":"https://api.github.com/users/pcaspers/gists{/gist_id}","starred_url":"https://api.github.com/users/pcaspers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcaspers/subscriptions","organizations_url":"https://api.github.com/users/pcaspers/orgs","repos_url":"https://api.github.com/users/pcaspers/repos","events_url":"https://api.github.com/users/pcaspers/events{/privacy}","received_events_url":"https://api.github.com/users/pcaspers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-22T19:59:03Z","updated_at":"2018-03-02T10:05:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Why again isn't FloatingRateCoupon evaluating ```pricer_->swapletRate()``` lazily? Some coupon pricers are quite heavy (CMS, CMS Spread, ...), so I wonder if we could change that? As far as I can see we'd have to\r\n\r\n- make ```FloatingRateCoupon``` a ```LazyObject```, compute ```pricer_->swapletRate()``` in ```performCalculations()``` instead of ```rate()```\r\n- make ```CappedFlooredCoupon``` a ```LazyObject```, compute ```underlying_->pricer()->floorletRate(effectiveFloor())``` and ```underlying_->pricer()->capletRate(effectiveCap())``` in ```performCalculations()``` instead of ```rate()```\r\n\r\nWould that work? Or am I missing something that forbids doing that?"},"comment":{"url":"https://api.github.com/repos/lballabio/QuantLib/issues/comments/369878890","html_url":"https://github.com/lballabio/QuantLib/issues/415#issuecomment-369878890","issue_url":"https://api.github.com/repos/lballabio/QuantLib/issues/415","id":369878890,"user":{"login":"lballabio","id":170560,"avatar_url":"https://avatars2.githubusercontent.com/u/170560?v=4","gravatar_id":"","url":"https://api.github.com/users/lballabio","html_url":"https://github.com/lballabio","followers_url":"https://api.github.com/users/lballabio/followers","following_url":"https://api.github.com/users/lballabio/following{/other_user}","gists_url":"https://api.github.com/users/lballabio/gists{/gist_id}","starred_url":"https://api.github.com/users/lballabio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lballabio/subscriptions","organizations_url":"https://api.github.com/users/lballabio/orgs","repos_url":"https://api.github.com/users/lballabio/repos","events_url":"https://api.github.com/users/lballabio/events{/privacy}","received_events_url":"https://api.github.com/users/lballabio/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T10:05:15Z","updated_at":"2018-03-02T10:05:15Z","author_association":"OWNER","body":"I see. It could be a configuration flag..."}}
{"actor":{"display_login":"lballabio"}}