Skip to content

Local volatility model (Dupire) #6

@katsuwaka

Description

@katsuwaka

Create montecarlo model with Dupire volatility

Assumption

  • 1 x underlyings with continuous dividends (eg FX, index)
  • Volatility as function of time & strike

Input

  • Spot : S
  • Risk-free rate : rate(t)
  • Dividend yield: div(t)
  • Repo yield: repo(t)
  • Cash flow: Map[t:Double, f:Double => Double]
  • Volatility : vol(t, strike)
    ==> Please decide format of volatility input

Required function

  • price(cashflow):Map[Double, Double]
    where result is mapping payment date => price

Example

val r = t => 0.01 + 0.002 * t

val S = 100.0
val div = t => 0.03 + 0.003 * t
val repo = t => 0.0
val vol = (t, k) => 0.1 + 0.01 * t + math.pow(math.abs(k - 100), 2) / 1000.0

val cashflow = Map[
0.5 -> (x:Double) => math.max(0.0, x - 100.0),
1.0 -> (x:Double) => math.max(0.0, x - 100.0),
1.5 -> (x:Double) => math.max(0.0, x - 100.0),
2.0 -> (x:Double) => math.max(0.0, x - 100.0)
]

price(cashflow) = Map[
0.5 -> 4.225, 
1.0 -> 4.10, 
1.5 -> 3.85, 
2.0 -> 3.555
] (or something like this, numbers are complete random)

Ref

http://www.fairmat.com/plugins/view/dupire

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions