NAME
Quant::Framework::VolSurface
DESCRIPTION
Base class for all volatility surfaces.
for_date
The date for which we want to have the volatility surface data
type
Type of the surface, delta, moneyness or flat.
underlying_config
Contains underlying specific information
effective_date
Surfaces roll over at 5pm NY time, so the vols of any surfaces recorded after 5pm NY but before GMT midnight are effectively for the next GMT day. This attribute holds this effective date.
surface
Volatility surface in a hash reference.
ATTRIBUTES
symbol
The symbol of the underlying that this surface is for (e.g. frxUSDJPY)
recorded_date
The date (and time) that the surface was recorded, as a Date::Utility.
smile_points
The points across a smile.
It can be delta points, moneyness points or any other points that we might have in the future.
spread_points
This will give an array-reference containing volatility spreads for first tenor which has a volatility spread (or ATM if none).
term_by_day
Get all the terms in a surface in ascending order.
original_term
The terms we were originally supplied for this surface.
original_term_for_smile
The original term structure we have for smiles on a surface
original_term_for_spread
The original term structure we have for spreads on a surface
get_spread
Spread is ask-bid difference which can be stored for different tenor and atm/max. This is value could be adjusted for pricing under certain conditions.
USAGE:
my $spread = $volsurface->get_spread({sought_point=> 'atm', day=> 7});
will return the atm spread for the day.
my $spread = $volsurface->get_spread({sought_point=> 'max', day=> 7});
will return the max spread for the day.
get_smile_spread
Returns the ask/bid spread for smile of this volatility surface This is the raw spread.
get_day_for_tenor
USAGE:
my $day = $volsurface->get_day_for_tenor('1W');
Get the corresponding day for a given tenor, if one exists.
get_rr_bf_for_smile
Return the rr and bf values for a given smile For more info see: https://en.wikipedia.org/wiki/Risk_reversal and https://en.wikipedia.org/wiki/Butterfly_(options)
is_valid
Does this volatility surface pass our validation.
save Saves current surface using given chronicle writer.
get_surface_smile
Returns the smile on the surface. Returns an empty hash reference if not present.
get_surface_volatility
Returns the volatility point based on the raw volatility surface data. Returns undef if requested smile is not present. Returns the interpolated/raw volatility point across smile if requested smile is present.
clone
USAGE:
my $clone = $s->clone({
surface_data => $surface_data,
});
Returns a new Quant::Framework::VolSurface instance. You can pass overrides to override an attribute value as it is on the original surface.