-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 error functions with arguments #2131
Support error functions with arguments #2131
Conversation
5c41ac0
to
085536d
Compare
085536d
to
4df4f0c
Compare
@@ -39,6 +39,8 @@ namespace QuantLib { | |||
template <class Curve> class GlobalBootstrap { | |||
typedef typename Curve::traits_type Traits; // ZeroYield, Discount, ForwardRate | |||
typedef typename Curve::interpolator_type Interpolator; // Linear, LogLinear, ... | |||
typedef std::function<Array(const std::vector<Time>&, const std::vector<Real>&)> | |||
AdditionalErrors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe AdditionalPenalties
would be more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Would you like the member variable renamed as well, or just the type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change the whole lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I also rebased this branch to make sure there are no conflicts with my previous PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Pass curve data (times and values) to GlobalBootstrap's error functions so that they can compute errors based on the curve's shape. For example, one can penalize gradient to make the curve smoother.
4df4f0c
to
4a5b84f
Compare
Pass curve data (times and values) to GlobalBootstrap's error functions so that they can compute errors based on the curve's shape. For example, one can penalize gradient to make the curve smoother.