Model Parameters

Parameter Term Structure Types

DiffFusion.ParameterTermstructureType
abstract type ParameterTermstructure <: Termstructure end

An abstract generic parameter term structure that provides methods to retrieve parameter values for various incarnations of signatures.

DiffFusion.PiecewiseFlatParameterType
abstract type PiecewiseFlatParameter <: ParameterTermstructure end

A generic vector-valued model parameter term structure with piece-wise constant interpolation and constant extrapolation.

DiffFusion.BackwardFlatParameterType
struct BackwardFlatParameter <: PiecewiseFlatParameter
    alias::String
    times::AbstractVector
    values::AbstractMatrix
end

A generic vector-valued model parameter term structure with piece-wise constant backward-flat interpolation and constant extrapolation.

DiffFusion.backward_flat_parameterFunction
backward_flat_parameter(
     alias::String,
     times::AbstractVector,
     values::AbstractMatrix,
     )

Create a BackwardFlatParameter object for vector-valued parameters.

backward_flat_parameter(
    alias::String,
    times::AbstractVector,
    values::AbstractVector,
    )

Create a BackwardFlatParameter object for scalar parameters.

DiffFusion.flat_parameterFunction
flat_parameter(value::ModelValue)

Create a constant BackwardFlatParameter object.

flat_parameter(alias::String, value::ModelValue)

Create a constant BackwardFlatParameter object.

flat_parameter(value::AbstractVector)

Create a constant BackwardFlatParameter object.

flat_parameter(alias::String, value::AbstractVector)

Create a constant BackwardFlatParameter object.

DiffFusion.ForwardFlatParameterType
struct ForwardFlatParameter <: PiecewiseFlatParameter
    alias::String
    times::AbstractVector
    values::AbstractMatrix
end

A generic vector-valued model parameter term structure with piece-wise constant forward-flat interpolation and constant extrapolation.

DiffFusion.forward_flat_parameterFunction
forward_flat_parameter(
    alias::String,
    times::AbstractVector,
    values::AbstractMatrix,
    )

Create a ForwardFlatParameter object for vector-valued parameters.

forward_flat_parameter(
    alias::String,
    times::AbstractVector,
    values::AbstractVector,
    )

Create a ForwardFlatParameter object for scalar parameters.

DiffFusion.time_idxMethod
time_idx(ts::BackwardFlatParameter, t)

Find the index such that T[idx-1] < t <= T[idx]. If t is larger than the last (or all) times T then return length(T)+1.

Functions

Call operator for ParameterTermstructure is defined as

(ts::ParameterTermstructure)(args...) = value(ts, args...)
DiffFusion.valueFunction
value(ts::ParameterTermstructure, result_size::TermstructureResultSize = TermstructureVector)

Return a value for constant/time-homogeneous parameters.

value(ts::ParameterTermstructure, t::ModelTime, result_size::TermstructureResultSize = TermstructureVector)

Return a value for a given observation time t.

value(ts::PiecewiseFlatParameter, result_size::TermstructureResultSize = TermstructureVector)

Return a value for constant/time-homogeneous parameters.

value(ts::PiecewiseFlatParameter, t::ModelTime, result_size::TermstructureResultSize = TermstructureVector)

Return a value for a given observation time t.

DiffFusion.time_idxMethod
time_idx(ts::ForwardFlatParameter, t)

Find the index such that T[idx] >= t > T[idx+1]. If t is smaller than the first (or all) times T then return 0.