CurrencyPairMethods: CurrencyPair methods

Description Usage Arguments Details Examples

Description

A collection of methods related to currency pairs.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
is_t1(x)

to_spot(dates, x)

to_spot_next(dates, x)

to_forward(dates, tenor, x)

to_today(dates, x)

to_tomorrow(dates, x)

to_fx_value(dates, tenor, x)

invert(x)

Arguments

x

a CurrencyPair object

dates

a vector of dates from which forward dates are calculated

tenor

the tenor of the value date which can be one of the following: "spot", "spot_next", "today", "tomorrow" and the usual "forward" dates (e.g. lubridate::months(3))

Details

The methods are summarised as follows:

Examples

1
2
3
4
5
6
7
8
library(lubridate)
is_t1(AUDUSD())
dts <- lubridate::ymd(20170101) + lubridate::days(0:30)
to_spot(dts, AUDUSD())
to_spot_next(dts, AUDUSD())
to_today(dts, AUDUSD())
to_tomorrow(dts, AUDUSD())
to_fx_value(dts, months(3), AUDUSD())

fmbasics documentation built on May 2, 2019, 6:22 a.m.