Options
All
  • Public
  • Public/Protected
  • All
Menu

Simple polynomial fitting method

Fits a discount function to the simple polynomial form: $$ d(t) = \sum_{i=0}^{degree} c_i * t^{i} $$ where the constants $ c_i $ are to be determined.

This is a simple/crude, but fast and robust, means of fitting a yield curve.

Hierarchy

Index

Properties

Protected _constrainAtZero

_constrainAtZero: boolean

Protected _costFunction

_costFunction: FittingCost

_curve

Protected _guessSolution

_guessSolution: Real[]

_l2

_l2: Real[]

Private _size

_size: Size

_solution

_solution: Real[]

_weights

_weights: Real[]

Methods

calculate

  • calculate(): void
  • Returns void

clone

constrainAtZero

  • constrainAtZero(): boolean

discount

discountFunction

fmInit

  • Parameters

    • Default value constrainAtZero: boolean = true
    • Default value weights: Real[] = []
    • Default value optimizationMethod: OptimizationMethod = null
    • Default value l2: Real[] = []

    Returns FittingMethod

init

  • init(): void
  • Returns void

l2

  • Returns Real[]

minimumCostValue

  • minimumCostValue(): Real

numberOfIterations

optimizationMethod

size

  • Returns Size

solution

  • solution(): Real[]

spfInit1

  • Parameters

    • degree: Natural
    • Default value constrainAtZero: boolean = true
    • Default value weights: Real[] = []
    • Default value optimizationMethod: OptimizationMethod = null
    • Default value l2: Real[] = []

    Returns SimplePolynomialFitting

spfInit2

weights