vecxt_re
Members list
Type members
Classlikes
The scale a monetary amount is quoted in. multiplier is the number of major currency units in one of this unit.
The scale a monetary amount is quoted in. multiplier is the number of major currency units in one of this unit.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
CalendarYearLevels.type
A calendar year index of levels, for on-leveling historical data.
A calendar year index of levels, for on-leveling historical data.
Holds an index level per calendar year (e.g. total insured value, a price index, or any series whose ratio between two years gives the change between them). A value from year Y is on-levelled to the current year by multiplying by level(currentYear) / level(Y).
For year-on-year change factors (e.g. 1.05 for +5%) rather than levels, use CalendarYearRateChanges.
Value parameters
- currentYear
-
The current/reference year. Must equal
years.head. - levels
-
Array of index levels corresponding to each year. All levels must be strictly positive. The constructor is private: the companion
applymethods defensively copy the input arrays, so mutating the arrays passed in cannot bypass validation. - years
-
Array of contiguous years in descending order (most recent first), i.e.
years(i) == currentYear - i. Use the companionapply(years, levels)to construct from years in any order.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
Year-on-year rate changes by calendar year, for on-leveling historical data.
Year-on-year rate changes by calendar year, for on-leveling historical data.
Each entry is the change factor for a year (e.g. 1.05 for +5%), not an index level. For an index level series (TIV, CPI, ...) use CalendarYearLevels instead.
The factor labelled with year Y is the change from year Y - 1 to year Y. Hence a value from year Y is on-levelled to the current year by multiplying the factors of years Y + 1 to currentYear inclusive, and the earliest year that can be fully on-levelled is earliestYear - 1.
Value parameters
- currentYear
-
The current/reference year (period 0). Must equal
years.head. - factors
-
Array of change factors corresponding to each year. All factors must be strictly positive. The constructor is private: the companion
applymethods defensively copy the input arrays, so mutating the arrays passed in cannot bypass validation or desynchronise the cached cumulative factors. - years
-
Array of contiguous years in descending order (most recent first), i.e.
years(i) == currentYear - i. Use the companionapply(years, factors)to construct from years in any order.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
CurrencyAmount.type
This should NOT be used for actual cash values. We use double here because this intended for financial simulation where errors of <0.01 are meaningless. An absolute monetary quantity denominated in a single currency, e.g. a notional, limit, premium or loss.
This should NOT be used for actual cash values. We use double here because this intended for financial simulation where errors of <0.01 are meaningless. An absolute monetary quantity denominated in a single currency, e.g. a notional, limit, premium or loss.
Amounts in different currencies are never implicitly combined: arithmetic between currencies fails, and conversion requires an explicit FX rate. Scaling by a Rel yields a CurrencyAmount (premium = notional × coupon); dividing two amounts in the same currency yields a Rel.
Stored as a Double in major currency units; AmountUnit only affects construction and display.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
CurrencyRate.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait ContinuousDistr[T]class Mixedclass Paretotrait DiscreteDistr[T]class Empiricalclass NegativeBinomialclass PoissonShow all
Represents a discrete Distribution
Represents a discrete Distribution
Attributes
- Supertypes
- Known subtypes
Empirical distribution (JVM only).
Empirical distribution (JVM only).
This is a nonparametric distribution built directly from observed samples. It supports positive weights $w_i$.
The distribution is represented as a discrete measure on the (possibly repeated) sample values: $$\mathbb{P}(X = x) = \sum_{i: x_i = x} \frac{w_i}{\sum_k w_k}.$$
Consequently, the CDF is a right-continuous step function $$F(t) = \mathbb{P}(X \le t) = \sum_{x \le t} \mathbb{P}(X=x).$$
Sampling is performed by inverse-transform sampling on the cumulative weights.
Note: Since this is an empirical (atomic) distribution, a density/PDF in the usual continuous sense is not defined. The plot method instead displays a (weighted) histogram density estimate.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HasInverseCdftrait HasCdf[Double]trait HasVariance[Double]trait HasMean[Double]trait DiscreteDistr[Double]trait Rand[Double]trait Density[Double]class Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ExceedanceCurve.type
An empirical exceedance curve: one value per iteration, ranked largest first.
An empirical exceedance curve: one value per iteration, ranked largest first.
The k-th largest value (1-based rank k) sits at return period numberIterations / k: it is equalled or exceeded in k of the numberIterations iterations. The curve is a step function between these points; nothing is interpolated.
Value parameters
- amounts
-
one value per iteration, sorted descending. Not copied and not checked: build one through
Scenarr.oep/Scenarr.aep, or ExceedanceCurve.fromIterationValues, unless you know the array is already ranked.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Collective risk model: a claim-count (frequency) distribution paired with a per-claim severity distribution.
Collective risk model: a claim-count (frequency) distribution paired with a per-claim severity distribution.
The aggregate loss is $S = \sum_{i=1}^{N} X_i$ with $N$ drawn from frequency and the $X_i$ iid from severity.
Serialises to JSON with only the distribution parameters; the frequency carries a "type" discriminator so the Poisson / Negative Binomial choice survives a round trip:
{
"frequency": {"type": "NegativeBinomial", "a": 2.0, "b": 0.5},
"severity": {"empirical": {"values": [...], "weights": [...]}, "mixingPoint": 1e6, "paretoShape": 1.8}
}
Value parameters
- frequency
-
The claim-count distribution
- severity
-
The per-claim loss distribution
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Which version of the Hill estimator to compute. All three are built from the k largest losses and the same continuous-threshold curve; they differ in where the threshold sits and in the numerator.
Which version of the Hill estimator to compute. All three are built from the k largest losses and the same continuous-threshold curve; they differ in where the threshold sits and in the numerator.
Write X₍₁₎ ≥ X₍₂₎ ≥ … for the losses, largest first, and S = Σᵢ₌₁ᵏ log(X₍ᵢ₎ / threshold).
- MaxLikelihood: threshold X₍ₖ₊₁₎, α̂ = k / S (Hill 1975; de Haan & Ferreira; Resnick). The maximum likelihood estimate given the threshold. For exact Pareto data S is Gamma(k, α), so E[α̂] = α · k / (k − 1).
- Embrechts: threshold X₍ₖ₎, the k-th largest loss itself, α̂ = k / S (Embrechts, Klüppelberg & Mikosch, 1997). The i = k term of S is zero, so S is Gamma(k − 1, α) and E[α̂] = α · k / (k − 2). Equal to (k / (k − 1)) · the MaxLikelihood estimate at k − 1; always at least the MaxLikelihood estimate at the same k.
- Unbiased: threshold X₍ₖ₊₁₎, α̂ = (k − 1) / S. Exactly unbiased for Pareto data, and minimum variance among unbiased estimators: the most conservative of the three.
The conventions agree as k → ∞; they differ by 25% or more at k = 5. None corrects for losses that are not Pareto.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Hill estimator for Pareto tail index estimation.
Hill estimator for Pareto tail index estimation.
The Hill estimator is used to estimate the shape parameter (α) of a Pareto distribution from the upper tail of the data. For a Pareto distribution with survival function S(x) = (x_min/x)^α, the tail index α determines how heavy the tail is:
- α < 2: Infinite variance
- α < 1: Infinite mean
- Larger α means lighter tails
By default the estimator uses the k largest order statistics over the (k+1)-th: α̂ = k / Σᵢ₌₁ᵏ log(X₍ᵢ₎ / X₍ₖ₊₁₎). See HillConvention for the alternatives.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HillEstimator.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LossMatrix.type
Mixed distribution: Empirical body with Pareto tail.
Mixed distribution: Empirical body with Pareto tail.
This distribution combines an empirical distribution for the body (values below the mixing point) with a Pareto distribution for the tail (values at or above the mixing point).
The distribution is parameterized by:
- An empirical distribution of observed values
- A mixing point $m$ (threshold between body and tail)
- A Pareto shape parameter $\alpha$ (for the tail)
The CDF is continuous at the mixing point. Let $p_m = F_{\text{emp}}(m^-)$ be the empirical CDF just below the mixing point. Then:
- For $x < m$: $F(x) = F_{\text{emp}}(x)$
- For $x \ge m$: $F(x) = p_m + (1 - p_m) \cdot F_{\text{Pareto}}(x)$
where the Pareto distribution has scale = $m$ and shape = $\alpha$.
Value parameters
- empirical
-
The empirical distribution for the body
- mixingPoint
-
The threshold where we switch from empirical to Pareto tail
- paretoShape
-
The shape parameter (α) for the Pareto tail
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HasInverseCdftrait HasCdf[Double]trait HasVariance[Double]trait HasMean[Double]trait ContinuousDistr[Double]trait Rand[Double]trait Density[Double]class Objecttrait Matchableclass AnyShow all
Compile-time helpers for accepting a named tuple by field name rather than by field position.
Compile-time helpers for accepting a named tuple by field name rather than by field position.
A caller may supply (id = "1", price = p, notional = n, name = "A") where the required shape is (price: Price, notional: CurrencyAmount, name: String, id: String): field order is irrelevant and extra fields are ignored, but every required field must be present with a conforming type or compilation fails.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedRecord.type
Negative Binomial Distribution with alternative parameterization.
Negative Binomial Distribution with alternative parameterization.
Uses the parameterization:
- r = a (number of successes, can be any positive real)
- p = 1 / (1 + b) (probability of success)
Which gives:
- mean = a * b
- variance = a * b * (1 + b)
Under this parameterisation, as b -> 0, the distribution will converge to Poisson(ab). The parameter b is therefore a measure of overdispersion.
Implementation uses the gamma-Poisson mixture representation, which allows non-integer a: If λ ~ Gamma(a, b) and X | λ ~ Poisson(λ), then X ~ NegativeBinomial(a, b)
Value parameters
- a
-
shape parameter (must be positive, can be non-integer)
- b
-
scale/dispersion parameter (must be positive)
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HasVariance[Double]trait HasCdf[Int]trait HasMean[Double]trait DiscreteDistr[Int]trait Rand[Int]trait Density[Int]class Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
NegativeBinomial.type
Pareto Type I Distribution.
Pareto Type I Distribution.
The Pareto distribution is a power-law probability distribution commonly used to model the distribution of wealth, insurance losses, and other phenomena where small values are common and large values are rare but possible.
For scale parameter k (minimum possible value) and shape parameter α (Pareto index):
- PDF: f(x) = α * k^α / x^(α+1) for x >= k
- CDF: F(x) = 1 - (k/x)^α for x >= k
- Mean: k * α / (α - 1) for α > 1, otherwise infinite
- Variance: k² * α / ((α-1)² * (α-2)) for α > 2, otherwise infinite
Value parameters
- scale
-
Scale parameter k (minimum possible value of X, must be positive)
- shape
-
Shape parameter α (Pareto index, must be positive)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HasInverseCdftrait HasCdf[Double]trait HasVariance[Double]trait HasMean[Double]trait ContinuousDistr[Double]trait Rand[Double]trait Density[Double]class Objecttrait Matchableclass AnyShow all
Pickands estimator for extreme value index (tail index) estimation.
Pickands estimator for extreme value index (tail index) estimation.
It is unlikely to be useful, given the amount of data typically available in reinsurance.
The Pickands estimator is a robust, non-parametric estimator for the extreme value index (EVI) of a distribution. Unlike the Hill estimator which assumes a Pareto-type tail, the Pickands estimator works for all three domains of attraction (Fréchet, Gumbel, Weibull).
For heavy-tailed distributions (Fréchet domain), the EVI γ > 0 corresponds to a Pareto tail index α = 1/γ.
The estimator uses order statistics at positions n-k, n-2k, n-4k: γ̂ = (1/ln2) * ln((X₍ₙ₋ₖ₎ - X₍ₙ₋₂ₖ₎) / (X₍ₙ₋₂ₖ₎ - X₍ₙ₋₄ₖ₎))
Properties:
- More robust to model misspecification than Hill
- Higher variance than Hill for pure Pareto data
- Works for all extreme value distributions, not just Pareto
- Consistent and asymptotically normal
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PickandsEstimator.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Platform-specific reporting implementations for JVM.
Platform-specific reporting implementations for JVM.
Uses a streaming single-pass algorithm to compute all loss metrics efficiently. The algorithm processes groups inline (avoiding the allocation of an intermediate array) and uses Welford's online algorithm for numerically stable variance computation.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PlatformReporting.type
Poisson Distribution.
Poisson Distribution.
The Poisson distribution models the number of events occurring in a fixed interval of time or space, given that these events occur with a known constant mean rate and independently of the time since the last event.
Parameterization:
- λ (lambda) = mean = variance
PMF: P(X = k) = λ^k * e^(-λ) / k!
The Poisson distribution is a limiting case of the Negative Binomial distribution as the dispersion parameter b → 0.
Value parameters
- lambda
-
the rate parameter (must be positive)
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HasVariance[Double]trait HasCdf[Int]trait HasMean[Double]trait DiscreteDistr[Int]trait Rand[Int]trait Density[Int]class Objecttrait Matchableclass AnyShow all
Portfolio level calculations over a collection of positions.
Portfolio level calculations over a collection of positions.
Positions are record-like views over a Map[String, Any], exposing typed fields via scala.Selectable. Callers need not construct them directly: the public entry points accept any named tuple carrying the required fields (see NamedRecord).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PortfolioCalc.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PositionCalculations.type
The unit a price or rate is quoted in. unit is the value that represents par (100%) in that unit.
The unit a price or rate is quoted in. unit is the value that represents par (100%) in that unit.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A trait for monadic distributions. Provides support for use in for-comprehensions
A trait for monadic distributions. Provides support for use in for-comprehensions
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait ContinuousDistr[T]class Mixedclass Paretotrait DiscreteDistr[T]class Empiricalclass NegativeBinomialclass PoissonShow all
- Self type
-
Rand[T]
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
RateChangesPerPeriod.type
Per-period rate changes, for on-leveling period-based models.
Per-period rate changes, for on-leveling period-based models.
Each entry is the change factor for a period (e.g. 1.05 for +5%), counted from period 0 (current) backwards. The cumulative factor which on-levels a value from a historical period to the current period is the product of the factors in between.
Value parameters
- factors
-
Array of change factors where factors(0) is the current period (period 0) and factors(n) is n periods back.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Per-layer loss metrics over a simulation.
Per-layer loss metrics over a simulation.
Precondition for every method taking years: years(i) is the 1-based iteration of cededToLayer(i), the two arrays have the same length, years is sorted in non-decreasing order, and every value is in 1..numIterations. Arrays that come from a Scenario, or a Scenarr with isSorted = true, already satisfy this.
lossReport checks the precondition and throws IllegalArgumentException if it is broken. The check costs nothing extra: its single pass only consumes years(i) when it equals the current iteration, so leftover entries at the end mean years was unsorted or out of range.
The group-sum based methods (attachmentProbability, exhaustionProbability, std) do NOT check it, because checking would add a second full pass. Unsorted years silently gives wrong numbers there: they keep only the last run of each iteration (see groupSums.scala).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ReReporting.type
What lossReport divides EL and std by.
What lossReport divides EL and std by.
FirstLimit/AggLimit: the layer's limit. Ceded amounts already include the share, so they are divided bylimit * share(see divisor). The resulting ratios are on a 100% basis and do not depend on share.Custom(d): divided by exactlyd, with no share adjustment, e.g.Custom(1.0)for raw ceded EL / std.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Retentions.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RiskFreeRate.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Columnar scenario: one entry per event across iterations, days, amounts and ids.
Columnar scenario: one entry per event across iterations, days, amounts and ids.
isSorted is a promise from the constructor's caller that the columns are ordered by (iteration, day), and that every iteration lies in 1..numberIterations. It is trusted, not verified: per-iteration statistics (freq, agg, oep) feed it into unchecked single-pass kernels (see groupSums.scala), and passing isSorted = true for unsorted data gives silently wrong results. If you're unsure, leave it false and call .sorted.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Result of fitting a severity trend: log(X) = β₀ + β₁·year + ε, by ordinary least squares.
Result of fitting a severity trend: log(X) = β₀ + β₁·year + ε, by ordinary least squares.
exp(β₁) − 1 is the annual trend in the median (geometric mean) severity. If log(X) is normal with constant σ (a lognormal severity), it is also the annual trend in the mean.
Inference uses Student's t with n − 2 degrees of freedom, assuming independent residuals with constant variance. Residuals of log severity are often skewed (log of a Pareto is exponential). With small data volumes that makes the t-based intervals approximate, and single losses can dominate the fit: see TrendAnalysis.fitSeverityTrendLeaveOneOut. Read the result as a check for gross errors in the normalisation, not as a measurement of the trend.
Value parameters
- dfResidual
-
Residual degrees of freedom (n − 2)
- intercept
-
Estimated intercept (β₀), log scale
- meanYear
-
Mean of the years, x̄
- nObs
-
Number of losses
- pValueIntercept
-
Two-tailed p-value for intercept (H₀: β₀ = 0)
- pValueSlope
-
Two-tailed p-value for slope (H₀: β₁ = 0) - this tests for a significant severity trend
- rSquared
-
Coefficient of determination
- seIntercept
-
Standard error of intercept
- seSlope
-
Standard error of slope
- sigma
-
Residual standard deviation of log severity
- slope
-
Estimated year coefficient (β₁), log scale
- sxx
-
Σ(yearᵢ − x̄)²
- tIntercept
-
t-statistic for intercept
- tSlope
-
t-statistic for slope
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SplitLosses.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SplitScenario.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TrendAnalysis.type
Result of fitting a GLM trend model: log(μ) = β₀ + β₁·year
Result of fitting a GLM trend model: log(μ) = β₀ + β₁·year
Contains coefficient estimates, standard errors, test statistics, and goodness-of-fit measures.
Value parameters
- aic
-
Akaike Information Criterion
- dfResidual
-
Residual degrees of freedom (n - 2)
- dispersion
-
Estimated dispersion parameter (1.0 for Poisson, estimated for NegBin)
- fPValue
-
p-value for
fStatistic: χ²(1) for Poisson (dispersion fixed at 1), F(1, n−2) for NegBin (dispersion estimated) - fStatistic
-
Test statistic for model vs intercept-only: the deviance drop, divided by the estimated dispersion for NegBin
- intercept
-
Estimated intercept (β₀)
- logLikelihood
-
Log-likelihood of the fitted model
- nObs
-
Number of observations
- nullDeviance
-
Deviance of intercept-only model
- pValueIntercept
-
Two-tailed p-value for intercept (H₀: β₀ = 0)
- pValueSlope
-
Two-tailed p-value for slope (H₀: β₁ = 0) - this tests for significant trend
- residualDeviance
-
Deviance of full model
- seIntercept
-
Standard error of intercept
- seSlope
-
Standard error of slope
- slope
-
Estimated year coefficient (β₁)
- zIntercept
-
z-statistic for intercept (β₀ / SE(β₀))
- zSlope
-
z-statistic for slope (β₁ / SE(β₁))
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Types
An ISO 4217 currency code, e.g. Ccy.USD or Ccy("SEK"). Open, so callers may use currencies not listed here.
An ISO 4217 currency code, e.g. Ccy.USD or Ccy("SEK"). Open, so callers may use currencies not listed here.
Attributes
The assumption here.
The assumption here.
Potential future outcomes of a single transactions run down columns.
Each row represents one potential future outcome, across a portfolio
Attributes
A price level relative to par, stored as a canonical Double where 1.0 is par.
A price level relative to par, stored as a canonical Double where 1.0 is par.
A Price is a point on a scale rather than an amount, so it is deliberately not a Rel: the difference of two prices is a Rel, a Rel can be added to or subtracted from a Price, and two prices cannot be added together.
As with Rel, PriceUnit only affects construction (Price(102, PriceUnit.Pts)) and display (p.in(PriceUnit.Pts)).
Attributes
A relative quantity: a change in price, a return, a ratio, or a one year rate (see Spread, RiskFreeRate). Stored as a canonical Double where 1.0 is 100%.
A relative quantity: a change in price, a return, a ratio, or a one year rate (see Spread, RiskFreeRate). Stored as a canonical Double where 1.0 is 100%.
PriceUnit is a boundary concern only: it is used to construct a Rel from a quote (Rel(50, PriceUnit.Bps)) and to read one back out (r.in(PriceUnit.Bps)). It is not stored, so equality, ordering and arithmetic are all on the canonical value, and an Array[Rel] is an Array[Double] at runtime.
A price level is not a Rel; see Price. Price - Price is a Rel and Price + Rel is a Price.
Attributes
An annual risk free rate. Over the one year horizon it is the risk free return.
An annual risk free rate. Over the one year horizon it is the risk free return.
Attributes
An annual credit spread. Over the one year horizon it is the return earned for bearing credit risk.
An annual credit spread. Over the one year horizon it is the return earned for bearing credit risk.
Attributes
Value members
Concrete methods
Aggregate each layer's per-event amounts into per-iteration totals.
Aggregate each layer's per-event amounts into per-iteration totals.
years(i) is the 1-based iteration of each layer's amounts(i). It must be sorted in non-decreasing order with values in 1..numItrs, and every amounts array must have the same length as years. This is NOT checked, for performance: unsorted years silently gives wrong totals. See groupSums.scala.
Attributes
- You have a sorted groups array.
- Each group has a small number of values.
- You're doing per-group differences.
- Returns differences between consecutive elements within each group
- Each group starts with its first value
Attributes
In-place version that modifies the input array directly. More efficient when the original values are not needed.
In-place version that modifies the input array directly. More efficient when the original values are not needed.
Attributes
Extensions
Extensions
The probability of paying any loss
The probability of paying any loss