NAME

Quant::Framework::VolSurface::Delta

DESCRIPTION

Represents a volatility surface, built from market implied volatilities.

SYNOPSIS

my $surface = Quant::Framework::VolSurface::Delta->new({underlying_config => $underlying_config});

for_date

The date for which we wish data

save

Saves current surface using given chronicle writer.

ATTRIBUTES

type

Return the surface type

deltas

Get the available deltas for which we have vols.

Returns an ArrayRef, is required and read-only.

get_volatility

Given a maturity of some form and a barrier of some form, gives you a vol from the surface.

The barrier can be specified either as a strike (strike => $bet->barrier) or a delta (delta => 25).

The maturity can be given either as a number of days (days => 7), an expiry date (expiry_date => Date::Utility->new) or a tenor (tenor => 'ON').

When given an expiry_date, get_volatility assumes that you want an integer number of days, and calculates that based on the number of vol rollovers between the recorded_date and the given expiry. So if the rollover is at GMT2200 (NY1700) and recorded_date is 2012-02-01 10:00:00, a given expiry of 2012-02-02 10:00:00 would give you the ON vol, but an expiry of 2012-02-02 23:59:59 would give a 2-day vol.

USAGE:

my $vol = $s->get_volatility({delta => 25, days => 7});
my $vol = $s->get_volatility({strike => $bet->barrier, tenor => '1M'});
my $vol = $s->get_volatility({delta => 50, expiry_date => Date::Utility->new});

interpolate

Quadratic interpolation to interpolate across smile ->interpolate({smile => $smile, sought_point => $sought_point});

generate_surface_for_cutoff

Transforms the surface to a given cutoff. Cutoff can be given either as a qf_cutoff_code string, or a Quant::Framework::VolSurface::Cutoff instance.

Returns the cut surface data-structure (not a B::M::VS instance).

surfaces_to_save

The surfaces that will be saved on Chronicle

clone

USAGE:

my $clone = $s->clone({
  surface => $my_new_surface,
  cutoff  => $my_new_cutoff,
});

Returns a new cloned instance. You can pass overrides to override an attribute value as it is on the original surface.

cutoff

cutoff is New York 10:00 when we save new volatility delta surfaces. (Surfaces that we get from Bloomberg)

cutoff is UTC 23:59 or UTC 21:00 for contract pricing.