Options
All
  • Public
  • Public/Protected
  • All
Menu

Variance-swap pricing engine using Monte Carlo simulation

as described in Demeterfi, Derman, Kamal & Zou, "A Guide to Volatility and Variance Swaps", 1999

todo define tolerance of numerical integral and incorporate it in errorEstimate

test returned fair variances checked for consistency with implied volatility curve.

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • Default value RNG: rng_traits = new PseudoRandom()
    • Default value S: any = new RiskStatistics()

    Returns MCVarianceSwapEngine

Properties

MC

RNG

S

S: any

_antitheticVariate

_antitheticVariate: boolean

_arguments

_arguments: Arguments = new VarianceSwap.Arguments()

Protected _brownianBridge

_brownianBridge: boolean

_controlVariate

_controlVariate: boolean

_isDisposed

_isDisposed: boolean = false

Protected _maxSamples

_maxSamples: Size

_mcModel

_mcModel: MonteCarloModel

_observables

_observables: Set<Observable> = new Set()

_observers

_observers: Set<Observer> = new Set()

Protected _process

Protected _requiredSamples

_requiredSamples: Size

Protected _requiredTolerance

_requiredTolerance: Real

_results

_results: Results = new VarianceSwap.Results()

Protected _seed

_seed: BigNatural

Protected _timeSteps

_timeSteps: Size

Protected _timeStepsPerYear

_timeStepsPerYear: Size

calculate

calculate: () => void

Type declaration

    • (): void
    • Returns void

calculate1

calculate1: (requiredTolerance: Real, requiredSamples: Size, maxSamples: Size) => void

Type declaration

    • (requiredTolerance: Real, requiredSamples: Size, maxSamples: Size): void
    • Parameters

      • requiredTolerance: Real
      • requiredSamples: Size
      • maxSamples: Size

      Returns void

controlPathGenerator

controlPathGenerator: () => PathGenerator

Type declaration

controlPathPricer

controlPathPricer: () => PathPricer<Path | MultiPath>

Type declaration

controlPricingEngine

controlPricingEngine: () => PricingEngine

Type declaration

controlVariateValue

controlVariateValue: () => Real

Type declaration

deepUpdate

deepUpdate: () => void

Type declaration

    • (): void
    • Returns void

dispose

dispose: () => void

Type declaration

    • (): void
    • Returns void

errorEstimate

errorEstimate: () => Real

Type declaration

getArguments

getArguments: () => Arguments

Type declaration

getResults

getResults: () => Results

Type declaration

    • (): Results
    • Returns Results

isDisposed

isDisposed: boolean

mcsInit

mcsInit: (antitheticVariate: boolean, controlVariate: boolean) => McSimulation

Type declaration

    • (antitheticVariate: boolean, controlVariate: boolean): McSimulation
    • Parameters

      • antitheticVariate: boolean
      • controlVariate: boolean

      Returns McSimulation

notifyObservers

notifyObservers: () => void

Type declaration

    • (): void
    • Returns void

registerObserver

registerObserver: (o: Observer) => void

Type declaration

registerWith

registerWith: (h: Observable) => void

Type declaration

registerWithObservables

registerWithObservables: (o: Observer) => void

Type declaration

reset

reset: () => void

Type declaration

    • (): void
    • Returns void

sampleAccumulator

sampleAccumulator: () => RiskStatistics

Type declaration

unregisterObserver

unregisterObserver: (o: Observer) => void

Type declaration

unregisterWith

unregisterWith: (h: Observable) => Size

Type declaration

unregisterWithAll

unregisterWithAll: () => void

Type declaration

    • (): void
    • Returns void

update

update: () => void

Type declaration

    • (): void
    • Returns void

value

value: (tolerance: Real, maxSamples: Size, minSamples: Size) => Real

Type declaration

valueWithSamples

valueWithSamples: (samples: Size) => Real

Type declaration

Methods

mcvseInit

pathGenerator

pathPricer

timeGrid