NAME
Quant::Framework::Currency
DESCRIPTION
The representation of currency within our system
my $currency = Quant::Framework::Currency->new({ symbol => 'AUD'});
symbol Represents currency symbol.
for_date The Date::Utility wherein this underlying is fixed.
chronicle_reader and chronicle_writer
Used to work with Chronicle storage data.
weight_on Returns the weight assigned to the day of a given Date::Utility object. Return 0.0 for holidays and 1.0 if there is no weight set.
has_holiday_on Returns true if the currency has a holiday on the day of a given Date::Utility object. Holidays with weights are not considered real holidays, this sub will return 0 for them.
interest Returns an interest rates object
rate_for Returns market rate
rate_implied_from Returns rates implied from another currency $usd->rate_implied_from('JPY',$tiy) # returns rate of usd implied from jpy for a specific term
METHODS
new($symbol)
Constructor. Should be used in the following ways:
Saving new interest rates: ->new(symbol => 'SYM', rates => {...}, date => Date::Utility->new); ->save;
Fetching the latest rates in DB: ->new('SYM'); ->new(symbol => 'SYM');
Fetching historical rates: ->new(symbol => 'SYM', for_date => Date::Utility->new('some time in the past'));