Quant::Framework::VolSurface::Delta
Represents a volatility surface, built from market implied volatilities.
my $surface = Quant::Framework::VolSurface::Delta->new({underlying_config => $underlying_config});
The date for which we wish data
Saves current surface using given chronicle writer.
Return the surface type
Get the available deltas for which we have vols.
Returns an ArrayRef, is required and read-only.
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});
Quadratic interpolation to interpolate across smile ->interpolate({smile => $smile, sought_point => $sought_point});
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).
The surfaces that will be saved on Chronicle
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 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.
To install Quant::Framework, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quant::Framework
CPAN shell
perl -MCPAN -e shell install Quant::Framework
For more information on module installation, please visit the detailed CPAN module installation guide.