PositionCalculations

vecxt_re.PositionCalculations

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def pnlForecast1Year(price: Price, priceDate: LocalDate, maturity: LocalDate, lossVector: Array[Double], riskFreeRate: RiskFreeRate, spread: Spread): Array[Double]

Investment is purchased on the price date Investment is sold in one years time, it is assumed the market is at a steady state over this period with no material change in risk premia. Annual seasonality - i.e. seasonality can be ignored over a single annual time period. A deep liquid market which is not affected by purchase / sale Investments renew at expiry into an equivalent bond at par, at the same risk spread and expected loss. All capital is ultimately returned to investor - impaired bonds would not pull to parity The lossVector is assumed to be in units of One

Investment is purchased on the price date Investment is sold in one years time, it is assumed the market is at a steady state over this period with no material change in risk premia. Annual seasonality - i.e. seasonality can be ignored over a single annual time period. A deep liquid market which is not affected by purchase / sale Investments renew at expiry into an equivalent bond at par, at the same risk spread and expected loss. All capital is ultimately returned to investor - impaired bonds would not pull to parity The lossVector is assumed to be in units of One

Value parameters

lossVector
  • By convention all positive numbers
maturity

the maturity date of the bond

price

the current price, expressed in priceUnit

priceDate

the date on which price was observed (the purchase date)

priceUnit

the unit price is quoted in

riskFreeRate

the annual risk free rate, expressed in riskFreeRateUnit (e.g. 325 in Bps is 3.25%)

riskFreeRateUnit

the unit riskFreeRate is quoted in

Attributes

Returns

one element per entry of lossVector: the one year PnL in units of One, i.e. risk free interest plus pull to parity minus that loss

def priceForecast1Year(price: Price, priceDate: LocalDate, maturity: LocalDate): Price

Forecasts the price of a bond which is being pulled to parity assuming a one year time horizon.

Forecasts the price of a bond which is being pulled to parity assuming a one year time horizon.

This allows us to ignore seasonality, which is assumed to be annual.

Value parameters

maturity

the maturity date of the bond

price

the current price

priceDate

the date on which price was observed; the forecast is for one year after this date

Attributes

Returns

the forecast price one year after priceDate. If the bond matures within the year, this is par.

def priceForecast1Year(prices: Array[Price], priceDate: LocalDate, maturities: Array[LocalDate]): Array[Price]

As priceForecast1Year, elementwise over positions observed on the same date.

As priceForecast1Year, elementwise over positions observed on the same date.

Attributes

def pull2Parity1Year(prices: Array[Price], priceDate: LocalDate, maturities: Array[LocalDate]): Array[Rel]

As pull2Parity1Year, elementwise over positions observed on the same date.

As pull2Parity1Year, elementwise over positions observed on the same date.

Attributes

def pull2Parity1Year(price: Price, priceDate: LocalDate, maturity: LocalDate): Rel

The change in price over one year of a bond which is being pulled linearly (by calendar days) to parity at maturity.

The change in price over one year of a bond which is being pulled linearly (by calendar days) to parity at maturity.

This allows us to ignore seasonality, which is assumed to be annual.

Uses calendar days, not yield accretion.

Value parameters

maturity

the maturity date of the bond

price

the current price

priceDate

the date on which price was observed; the projection is for one year after this date

Attributes

Returns

the forecast price change (forecast price minus price). Positive for a bond priced below par, negative above par. If the bond matures within the year, this is the full distance to par.