The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finance::Underlying - Object representation of a financial asset

VERSION

version 0.002

SYNOPSIS

    use Finance::Underlying;

    my $underlying = Finance::Underlying->by_symbol('frxEURUSD');
    print $underlying->pip_size, "\n";

DESCRIPTION

Provides metadata on financial assets such as forex pairs.

CLASS METHODS

pipsized_value

Return a string pipsized to the correct number of decimal point

->pipsized_value(100);

all_underlyings

Returns a list of all underlyings, ordered by symbol.

symbols

Return sorted list of all symbols.

by_symbol

Look up the underlying for the given symbol, returning a Finance::Underlying instance.

ATTRIBUTES

asset

The asset being quoted, for example USD for the frxUSDJPY underlying.

display_name

User-friendly English name used for display purposes.

exchange_name

The symbol of the exchange this underlying is traded on.

See Finance::Exchange. for more details.

instrument_type

Categorises the underlying, available values are:

  • commodities

  • forex

  • future

  • individualstock

  • smart_fx

  • stockindex

  • synthetic

market

The type of market for this underlying, for example forex for foreign exchange.

This will be one of the following:

  • commodities

  • forex

  • futures

  • indices

  • stocks

  • volidx

market_convention

These should mirror Bloomberg's Composite vol data conventions.

For further information, see Foreign Exchange option pricing, by Iain J Clark, pages 47 onwards.

Types of volatility conventions available:

atm_setting

There are three types:

  • atm_delta_neutral_straddle - strike so that call delta = -put delta

  • atm_forward - strike = forward price

  • atm_spot - strike = spot

delta_premium_adjusted

There are two types:

  • 1 for premium adjusted . Premium adjusted means the actual hedge quantity must be adjusted by the premium received if the premium is paid in foreign currency.

  • 0 for no premium adjusted - for futher explanation please refer to Wystup FX Volatility Smile Construction April 2010 paper, pg 5 and 6.

delta_style

There are two delta convention available:

  • spot_delta - with a hedge in the spot market.

  • forward_delta - with a hedge in FX forward market

rr

Risk reversal:

  • call-put

  • put-call

bf

There are three types of butterfly available in Bloomberg setting:

  • (call+put)/2-atm (which is quoted 1 vol strangle for Composite sources and 2 vol (a.k.a smile strangle) for BGN sources)

  • Base currency strangle - ATM (which is (base currency call + base currency put)- ATM)

  • Foreign currency strangle - ATM (which is (foreign currency call + foreign currency put)- ATM)

pip_size

How large the spot pip is.

quoted_currency

The second half of a forex pair - indicates the currency that this underlying is quoted in, or the currency in which a stock or stock index is quoted.

submarket

Classification for the underlying, see also "market".

symbol

The symbol of the underlying, for example frxUSDJPY or WLDAUD.

SEE ALSO

AUTHOR

binary.com