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

Smith-Wilson method #1484

Merged
merged 3 commits into from Feb 24, 2017
Merged

Smith-Wilson method #1484

merged 3 commits into from Feb 24, 2017

Conversation

@yukiiwashita
Copy link
Member

@yukiiwashita yukiiwashita commented Feb 22, 2017

  • Implemented Smith-Wilson formula
  • The formula is used via ParameterizedFunctionalCurve
  • Created an interface CurveDefinition for the existing interface, NodalCurveDefinition, and added a new implementation ParameterizedFunctionalCurveDefinition
  • Calibration example in CalibrationDiscountingSmithWilsonTest.
for (CurveNode node : defn.getNodes()) {
result.add(node.initialGuess(marketData, valueType));
for (CurveDefinition defn : curveDefinitions) {
if (defn instanceof ParameterizedFunctionalCurveDefinition) {

This comment has been minimized.

@marc-henrard

marc-henrard Feb 24, 2017
Contributor

A method initialGuess(MarketData marketData) should probably be created in CurveDefinition. For the ParameterizedFunctionalCurveDefinition it will the one already implemented; for the other it will return the array resulting from the loop on the nodes. The cast will not be necessary anymore.

* <p>
* The curve is controlled by {@code omega}, {@code alpha} and {@code weights}:
* {@code omega} is related to the ultimate forward rate (UFR) by {@code omega = log(1 + UFR)},
* the {@code alpha} parameter determines the rate of convergence to the UFR,

This comment has been minimized.

@marc-henrard

marc-henrard Feb 24, 2017
Contributor

Why a difference between the alpha and the omega treatment?

-0.380409008626438, 0.228249649568978, -0.160902407241201);
DoubleArray nodes = DoubleArray.of(3d, 5d, 7d, 10d, 15d, 20d, 30d);
double alpha = 0.162009;
double[] dfExp = new double[] {

This comment has been minimized.

@marc-henrard

marc-henrard Feb 24, 2017
Contributor

Where are those number coming from? Is it from an external implementation?

This comment has been minimized.

@yukiiwashita

yukiiwashita Feb 24, 2017
Author Member

Added comment "Source: EIOPA - European Insurance and Occupational Pensions Authority".

* @param x the x value
* @param alpha the alpha parameter
* @param nodes the nodes
* @param weights the weights

This comment has been minimized.

@marc-henrard

marc-henrard Feb 24, 2017
Contributor

Weights not in method signature.

@marc-henrard marc-henrard merged commit fc9332d into master Feb 24, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@yukiiwashita yukiiwashita deleted the topic/smith-wilson branch Feb 27, 2017
@jodastephen jodastephen added this to the v1.2 milestone Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.