Skip to main content

reserving_kernels/
tail.rs

1//! Parametric and heuristic tail-factor fitting kernels.
2//!
3//! Implements tail-factor extrapolation curves and tail-variance estimators
4//! from primary actuarial literature:
5//!
6//! * **Bondy (1966)** & **Generalized Bondy** — CAS Tail Factor Working Party
7//!   (2013), *The Estimation of Loss Development Tail Factors: A Summary
8//!   Report*, CAS E-Forum, Fall 2013, §4.2.
9//! * **Exponential Decay** — log-linear regression `ln(f_t - 1) = a + b · t`
10//!   (CAS TFWP 2013, §4.3).
11//! * **Inverse Power Curve** — Sherman (1984), *Extrapolating, Smoothing, and
12//!   Interpolating Development Factors*, PCAS Vol. LXXI, pp. 122–155:
13//!   `f_t = 1 + a · t^{-b}`.
14//! * **Weibull Curve** — CAS TFWP (2013):
15//!   `ln(ln(f_t / (f_t - 1))) = a + b · ln(t)`.
16//! * **Mack (1999) Tail Variance** — Mack (1999), *The Standard Error of Chain
17//!   Ladder Reserve Estimates: Recursive Calculation and Inclusion of a Tail
18//!   Factor*, ASTIN Bulletin, Vol. 29, No. 2, pp. 361–366.
19
20use crate::mack::MackTailSpec;
21use crate::validate::{ValidationError, validate_positive_finite_slice};
22
23/// Tail curve family fitted to empirical development factors.
24#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
25pub enum TailCurveKind {
26    /// Classic Bondy method (`b = 0.5`, tail equals final observed LDF).
27    Bondy,
28    /// Generalized Bondy geometric decay in log-LDF space (`ln f_k = c · b^k`).
29    GeneralizedBondy,
30    /// Exponential decay `f_t = 1 + exp(a + b · t)` with `b < 0`.
31    Exponential,
32    /// Sherman (1984) inverse power curve `f_t = 1 + exp(a) · t^b` with `b < 0`.
33    InversePower,
34    /// Weibull curve `f_t = 1 / (1 - exp(-exp(a) · t^b))`.
35    Weibull,
36}
37
38/// Result of fitting and extrapolating a parametric tail curve.
39#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
40pub struct TailFit {
41    /// Curve family used.
42    pub curve: TailCurveKind,
43    /// Compounded multiplicative tail factor (`>= 1.0`).
44    pub tail_factor: f64,
45    /// Curve intercept parameter (`a`, or `ln(f_start)` for Bondy).
46    pub intercept: f64,
47    /// Curve slope/decay parameter (`b`).
48    pub slope: f64,
49    /// Coefficient of determination `R²` on the transformed regression scale.
50    pub r_squared: f64,
51    /// Number of observed LDF points included in the fit.
52    pub n_points_used: usize,
53    /// Extrapolated age-to-age factors beyond the triangle edge.
54    pub extrapolated_ldfs: Vec<f64>,
55}
56
57/// Classic Bondy (1966) tail factor: repeats the final observed development
58/// factor (`b = 0.5`, so `prod_{m>=1} f_last^{0.5^m} = f_last`).
59pub fn bondy(ldfs: &[f64]) -> Result<TailFit, ValidationError> {
60    if ldfs.is_empty() {
61        return Err(ValidationError::ShapeMismatch);
62    }
63    validate_positive_finite_slice(ldfs, "LDF")?;
64    let last = *ldfs.last().expect("non-empty");
65    let tail_factor = last.max(1.0);
66    // Geometric Bondy decay: f_{last+m} = f_last^{0.5^m}, whose infinite product equals f_last.
67    let mut extrapolated_ldfs = Vec::with_capacity(5);
68    let mut weight = 0.5;
69    for _ in 0..5 {
70        extrapolated_ldfs.push(tail_factor.powf(weight));
71        weight *= 0.5;
72    }
73    Ok(TailFit {
74        curve: TailCurveKind::Bondy,
75        tail_factor,
76        intercept: tail_factor.ln(),
77        slope: 0.5,
78        r_squared: 1.0,
79        n_points_used: 1,
80        extrapolated_ldfs,
81    })
82}
83
84/// Generalized Bondy tail factor (CAS Tail Factor Working Party 2013, §4.2).
85///
86/// Minimizes `Σ_k (ln(f_{start+k}) - c · b^k)²` over `b ∈ (0, 1)` and `c > 0`
87/// via exact profile least squares (golden-section search over `b`), yielding
88/// the closed-form infinite tail product `exp(c · b^m / (1 - b))`.
89pub fn generalized_bondy(
90    ldfs: &[f64],
91    fit_start: usize,
92    extrap_periods: usize,
93) -> Result<TailFit, ValidationError> {
94    if ldfs.is_empty() || fit_start >= ldfs.len() {
95        return Err(ValidationError::ShapeMismatch);
96    }
97    validate_positive_finite_slice(ldfs, "LDF")?;
98
99    let slice = &ldfs[fit_start..];
100    if slice.len() == 1 {
101        return bondy(slice);
102    }
103    let ys: Vec<f64> = slice.iter().map(|&f| f.ln()).collect();
104    if ys.iter().all(|&y| y <= 0.0) {
105        return Err(ValidationError::InvalidParameter(
106            "generalized Bondy requires at least one LDF > 1.0",
107        ));
108    }
109
110    // For fixed b, optimal c(b) = sum(y_k b^k) / sum(b^{2k}) minimizes SSE(b).
111    let eval_sse = |b: f64| -> (f64, f64) {
112        let mut num = 0.0;
113        let mut den = 0.0;
114        let mut bk = 1.0;
115        for &y in &ys {
116            num += y * bk;
117            den += bk * bk;
118            bk *= b;
119        }
120        let c = if den > 0.0 { (num / den).max(0.0) } else { 0.0 };
121        let mut sse = 0.0;
122        let mut bk = 1.0;
123        for &y in &ys {
124            let err = y - c * bk;
125            sse += err * err;
126            bk *= b;
127        }
128        (sse, c)
129    };
130
131    // Coarse grid scan to bracket the global minimum, then golden-section refine.
132    let grid_n = 200usize;
133    let mut best_idx = 1usize;
134    let mut best_sse = f64::INFINITY;
135    for i in 1..grid_n {
136        let b = i as f64 / grid_n as f64;
137        let (sse, _) = eval_sse(b);
138        if sse < best_sse {
139            best_sse = sse;
140            best_idx = i;
141        }
142    }
143    let mut lo = ((best_idx - 1) as f64 / grid_n as f64).max(1e-6);
144    let mut hi = ((best_idx + 1) as f64 / grid_n as f64).min(1.0 - 1e-6);
145    let phi = 0.5 * (5.0_f64.sqrt() - 1.0);
146    let mut x1 = hi - phi * (hi - lo);
147    let mut x2 = lo + phi * (hi - lo);
148    let mut f1 = eval_sse(x1).0;
149    let mut f2 = eval_sse(x2).0;
150    for _ in 0..80 {
151        if f1 < f2 {
152            hi = x2;
153            x2 = x1;
154            f2 = f1;
155            x1 = hi - phi * (hi - lo);
156            f1 = eval_sse(x1).0;
157        } else {
158            lo = x1;
159            x1 = x2;
160            f1 = f2;
161            x2 = lo + phi * (hi - lo);
162            f2 = eval_sse(x2).0;
163        }
164    }
165    let b = 0.5 * (lo + hi);
166    if b >= 1.0 - 1e-5 {
167        return Err(ValidationError::InvalidParameter(
168            "generalized Bondy requires decaying LDFs (b < 1.0)",
169        ));
170    }
171    let (sse, c) = eval_sse(b);
172
173    let y_mean = ys.iter().sum::<f64>() / ys.len() as f64;
174    let sst: f64 = ys.iter().map(|&y| (y - y_mean).powi(2)).sum();
175    let r_squared = if sst > 0.0 {
176        (1.0 - sse / sst).clamp(0.0, 1.0)
177    } else {
178        1.0
179    };
180
181    let m = ys.len();
182    let tail_log = c * b.powi(m as i32) / (1.0 - b);
183    let tail_factor = tail_log.exp().max(1.0);
184    if !tail_factor.is_finite() {
185        return Err(ValidationError::NotFinite);
186    }
187    let mut extrapolated_ldfs = Vec::with_capacity(extrap_periods);
188    for step in 0..extrap_periods {
189        let log_f = c * b.powi((m + step) as i32);
190        let f_step = log_f.exp();
191        if !f_step.is_finite() {
192            return Err(ValidationError::NotFinite);
193        }
194        extrapolated_ldfs.push(f_step);
195    }
196
197    Ok(TailFit {
198        curve: TailCurveKind::GeneralizedBondy,
199        tail_factor,
200        intercept: c,
201        slope: b,
202        r_squared,
203        n_points_used: m,
204        extrapolated_ldfs,
205    })
206}
207
208/// Ordinary least squares on `(xs, ys)` returning `(intercept, slope, r_squared)`.
209fn ols_fit(xs: &[f64], ys: &[f64]) -> Result<(f64, f64, f64), ValidationError> {
210    let n = xs.len();
211    if n < 2 || n != ys.len() {
212        return Err(ValidationError::InvalidParameter(
213            "tail curve regression requires at least two valid LDF points > 1.0",
214        ));
215    }
216    let nf = n as f64;
217    let mx = xs.iter().sum::<f64>() / nf;
218    let my = ys.iter().sum::<f64>() / nf;
219    let mut sxx = 0.0;
220    let mut sxy = 0.0;
221    let mut syy = 0.0;
222    for (&x, &y) in xs.iter().zip(ys.iter()) {
223        let dx = x - mx;
224        let dy = y - my;
225        sxx += dx * dx;
226        sxy += dx * dy;
227        syy += dy * dy;
228    }
229    if !(sxx > 0.0) {
230        return Err(ValidationError::DivideByZero("tail regression variance"));
231    }
232    let slope = sxy / sxx;
233    let intercept = my - slope * mx;
234    let sse: f64 = xs
235        .iter()
236        .zip(ys.iter())
237        .map(|(&x, &y)| (y - (intercept + slope * x)).powi(2))
238        .sum();
239    let r_squared = if syy > 0.0 {
240        (1.0 - sse / syy).clamp(0.0, 1.0)
241    } else {
242        1.0
243    };
244    Ok((intercept, slope, r_squared))
245}
246
247/// Fit an exponential decay tail curve: `ln(f_t - 1) = a + b · t` for 1-indexed
248/// development links `t = 1..=ldfs.len()` (CAS TFWP 2013, §4.3).
249///
250/// Only links at indices `>= fit_start` with `f_t > 1.00001` enter the
251/// log-linear regression. Extrapolates `extrap_periods` links beyond the
252/// triangle edge and compounds them into `tail_factor`.
253pub fn fit_exponential_decay(
254    ldfs: &[f64],
255    fit_start: usize,
256    extrap_periods: usize,
257) -> Result<TailFit, ValidationError> {
258    if ldfs.is_empty() || fit_start >= ldfs.len() {
259        return Err(ValidationError::ShapeMismatch);
260    }
261    validate_positive_finite_slice(ldfs, "LDF")?;
262
263    let mut xs = Vec::new();
264    let mut ys = Vec::new();
265    for (idx, &f) in ldfs.iter().enumerate().skip(fit_start) {
266        if f > 1.000_01 {
267            xs.push((idx + 1) as f64);
268            ys.push((f - 1.0).ln());
269        }
270    }
271
272    let (intercept, slope, r_squared) = ols_fit(&xs, &ys)?;
273    if !(slope < 0.0) {
274        return Err(ValidationError::InvalidParameter(
275            "exponential tail curve requires negative decay slope",
276        ));
277    }
278
279    let m = ldfs.len();
280    let mut extrapolated_ldfs = Vec::with_capacity(extrap_periods);
281    let mut tail_factor = 1.0;
282    for step in 1..=extrap_periods {
283        let t = (m + step) as f64;
284        let f_t = 1.0 + (intercept + slope * t).exp();
285        if !f_t.is_finite() {
286            return Err(ValidationError::NotFinite);
287        }
288        extrapolated_ldfs.push(f_t);
289        tail_factor *= f_t;
290    }
291    if !tail_factor.is_finite() {
292        return Err(ValidationError::NotFinite);
293    }
294
295    Ok(TailFit {
296        curve: TailCurveKind::Exponential,
297        tail_factor,
298        intercept,
299        slope,
300        r_squared,
301        n_points_used: xs.len(),
302        extrapolated_ldfs,
303    })
304}
305
306/// Fit a Sherman (1984) inverse power tail curve:
307/// `f_t = 1 + a · t^b`, estimated via OLS of `ln(f_t - 1) = ln(a) + b · ln(t)`
308/// for 1-indexed development links `t = 1..=ldfs.len()`.
309pub fn fit_inverse_power(
310    ldfs: &[f64],
311    fit_start: usize,
312    extrap_periods: usize,
313) -> Result<TailFit, ValidationError> {
314    if ldfs.is_empty() || fit_start >= ldfs.len() {
315        return Err(ValidationError::ShapeMismatch);
316    }
317    validate_positive_finite_slice(ldfs, "LDF")?;
318
319    let mut xs = Vec::new();
320    let mut ys = Vec::new();
321    for (idx, &f) in ldfs.iter().enumerate().skip(fit_start) {
322        if f > 1.000_01 {
323            xs.push(((idx + 1) as f64).ln());
324            ys.push((f - 1.0).ln());
325        }
326    }
327
328    let (intercept, slope, r_squared) = ols_fit(&xs, &ys)?;
329    if !(slope < 0.0) {
330        return Err(ValidationError::InvalidParameter(
331            "inverse power tail curve requires negative decay slope",
332        ));
333    }
334
335    let m = ldfs.len();
336    let mut extrapolated_ldfs = Vec::with_capacity(extrap_periods);
337    let mut tail_factor = 1.0;
338    for step in 1..=extrap_periods {
339        let t = (m + step) as f64;
340        // Evaluate in log-space to avoid intermediate exp(intercept) overflow/underflow.
341        let f_t = 1.0 + (intercept + slope * t.ln()).exp();
342        if !f_t.is_finite() {
343            return Err(ValidationError::NotFinite);
344        }
345        extrapolated_ldfs.push(f_t);
346        tail_factor *= f_t;
347    }
348    if !tail_factor.is_finite() {
349        return Err(ValidationError::NotFinite);
350    }
351
352    Ok(TailFit {
353        curve: TailCurveKind::InversePower,
354        tail_factor,
355        intercept,
356        slope,
357        r_squared,
358        n_points_used: xs.len(),
359        extrapolated_ldfs,
360    })
361}
362
363/// Fit a Weibull tail curve (CAS TFWP 2013):
364/// `ln(ln(f_t / (f_t - 1))) = a + b · ln(t)`, yielding
365/// `f_t = 1 / (1 - exp(-exp(a) · t^b))`.
366pub fn fit_weibull(
367    ldfs: &[f64],
368    fit_start: usize,
369    extrap_periods: usize,
370) -> Result<TailFit, ValidationError> {
371    if ldfs.is_empty() || fit_start >= ldfs.len() {
372        return Err(ValidationError::ShapeMismatch);
373    }
374    validate_positive_finite_slice(ldfs, "LDF")?;
375
376    let mut xs = Vec::new();
377    let mut ys = Vec::new();
378    for (idx, &f) in ldfs.iter().enumerate().skip(fit_start) {
379        if f > 1.000_01 {
380            xs.push(((idx + 1) as f64).ln());
381            ys.push((f / (f - 1.0)).ln().ln());
382        }
383    }
384
385    let (intercept, slope, r_squared) = ols_fit(&xs, &ys)?;
386    if !(slope > 0.0) {
387        return Err(ValidationError::InvalidParameter(
388            "Weibull tail curve requires positive slope",
389        ));
390    }
391
392    let m = ldfs.len();
393    let mut extrapolated_ldfs = Vec::with_capacity(extrap_periods);
394    let mut tail_factor = 1.0;
395    for step in 1..=extrap_periods {
396        let t = (m + step) as f64;
397        let z = (intercept + slope * t.ln()).exp();
398        let denom = -(-z).exp_m1();
399        if !(denom > 0.0) || !denom.is_finite() {
400            return Err(ValidationError::NotFinite);
401        }
402        let f_t = 1.0 / denom;
403        if !f_t.is_finite() {
404            return Err(ValidationError::NotFinite);
405        }
406        extrapolated_ldfs.push(f_t);
407        tail_factor *= f_t;
408    }
409    if !tail_factor.is_finite() {
410        return Err(ValidationError::NotFinite);
411    }
412
413    Ok(TailFit {
414        curve: TailCurveKind::Weibull,
415        tail_factor,
416        intercept,
417        slope,
418        r_squared,
419        n_points_used: xs.len(),
420        extrapolated_ldfs,
421    })
422}
423
424/// Estimate Mack (1999) tail variance parameters (`tail_sigma_sq` and `tail_se`)
425/// by log-linear exponential regression of observed Mack `sigma_sq` and
426/// development-factor standard errors against development age (Mack 1999, §3).
427///
428/// When `tail_factor <= 1.0`, returns zero tail variance.
429pub fn estimate_mack_tail_spec(
430    sigma_sq: &[f64],
431    ldf_se: &[f64],
432    tail_factor: f64,
433) -> Result<MackTailSpec, ValidationError> {
434    if !tail_factor.is_finite() {
435        return Err(ValidationError::NotFinite);
436    }
437    if tail_factor < 1.0 {
438        return Err(ValidationError::InvalidTail { tail: tail_factor });
439    }
440    if sigma_sq.len() != ldf_se.len() || sigma_sq.is_empty() {
441        return Err(ValidationError::ShapeMismatch);
442    }
443    if (tail_factor - 1.0).abs() <= 1e-12 {
444        return Ok(MackTailSpec::fixed(tail_factor));
445    }
446
447    let mut xs_sig = Vec::new();
448    let mut ys_sig = Vec::new();
449    for (idx, &s2) in sigma_sq.iter().enumerate() {
450        if s2.is_finite() && s2 > 0.0 {
451            xs_sig.push((idx + 1) as f64);
452            ys_sig.push(s2.ln());
453        }
454    }
455    let next_t = (sigma_sq.len() + 1) as f64;
456    let last_pos_sig = sigma_sq
457        .iter()
458        .rev()
459        .copied()
460        .find(|&v| v.is_finite() && v > 0.0)
461        .unwrap_or(0.0);
462    let tail_sigma_sq = if xs_sig.len() >= 2 {
463        let (a, b, _) = ols_fit(&xs_sig, &ys_sig)?;
464        let extrapolated = (a + b * next_t).exp();
465        if b < 0.0 && extrapolated.is_finite() {
466            extrapolated.min(last_pos_sig)
467        } else {
468            last_pos_sig
469        }
470    } else {
471        last_pos_sig
472    };
473
474    let mut xs_se = Vec::new();
475    let mut ys_se = Vec::new();
476    for (idx, &se) in ldf_se.iter().enumerate() {
477        if se.is_finite() && se > 0.0 {
478            xs_se.push((idx + 1) as f64);
479            ys_se.push(se.ln());
480        }
481    }
482    let last_pos_se = ldf_se
483        .iter()
484        .rev()
485        .copied()
486        .find(|&v| v.is_finite() && v > 0.0)
487        .unwrap_or(0.0);
488    let tail_se = if xs_se.len() >= 2 {
489        let (a, b, _) = ols_fit(&xs_se, &ys_se)?;
490        let extrapolated = (a + b * next_t).exp();
491        if b < 0.0 && extrapolated.is_finite() {
492            extrapolated.min(last_pos_se)
493        } else {
494            last_pos_se
495        }
496    } else {
497        last_pos_se
498    };
499
500    Ok(MackTailSpec {
501        tail_factor,
502        tail_sigma_sq,
503        tail_se,
504    })
505}
506
507/// Fit a Clark (2003) growth curve (`Loglogistic` or `Weibull`) to `triangle`
508/// and return the implied tail factor and its parameter standard error as a
509/// [`MackTailSpec`] (mirroring `chainladder-python`'s `TailClark`).
510pub fn clark_tail(
511    triangle: &crate::types::TriangleView<'_>,
512    curve: crate::clark_mle::GrowthCurve,
513) -> Result<MackTailSpec, ValidationError> {
514    let opts = crate::clark_mle::ClarkOptions::new(curve);
515    let fit = crate::clark_mle::fit_clark_ldf(triangle, &opts)?;
516    let n_devs = triangle.n_devs;
517    let g_end = fit.growth_curve[n_devs - 1];
518    if !g_end.is_finite() || g_end <= 0.0 || g_end > 1.0 {
519        return Err(ValidationError::NotFinite);
520    }
521    let tail_factor = (1.0 / g_end).max(1.0);
522    // Approximate tail factor SE from Clark's origin-0 (oldest maturity) parameter SE:
523    // R_0 = C_{0, n-1} * (tail - 1) => se(tail) ≈ parameter_se[0] / C_{0, n-1}.
524    let c0_last = triangle.get(0, n_devs - 1);
525    let tail_se = if c0_last.is_finite() && c0_last > 0.0 {
526        (fit.parameter_se[0] / c0_last).max(0.0)
527    } else {
528        0.0
529    };
530    let tail_sigma_sq = if c0_last.is_finite() && c0_last > 0.0 {
531        let proc_var = fit.process_se[0] * fit.process_se[0];
532        (proc_var / c0_last).max(0.0)
533    } else {
534        0.0
535    };
536    Ok(MackTailSpec {
537        tail_factor,
538        tail_sigma_sq,
539        tail_se,
540    })
541}
542
543#[cfg(test)]
544mod tests {
545    use super::*;
546
547    const TAIL_SAMPLE_PAID_LDFS: [f64; 9] = [
548        2.026_309_092_4,
549        1.559_086_954_1,
550        1.320_122_537_1,
551        1.184_491_104_5,
552        1.107_263_962_6,
553        1.074_001_009_1,
554        1.046_207_298_4,
555        1.032_158_277_7,
556        1.023_924_521_2,
557    ];
558
559    const RAA_LDFS: [f64; 9] = [
560        2.999_359, 1.623_523, 1.270_888, 1.171_675, 1.113_385, 1.041_935, 1.033_264, 1.016_936,
561        1.009_217,
562    ];
563
564    #[test]
565    fn bondy_repeats_last_ldf() {
566        let fit = bondy(&RAA_LDFS).expect("bondy");
567        assert!((fit.tail_factor - 1.009_217).abs() < 1e-9);
568    }
569
570    #[test]
571    fn generalized_bondy_matches_raa_exponent() {
572        let fit = generalized_bondy(&RAA_LDFS, 0, 5).expect("gen bondy");
573        assert!((fit.slope - 0.4845).abs() < 0.002, "b={}", fit.slope);
574        assert!(
575            (fit.tail_factor - 1.0031).abs() < 0.0005,
576            "tail={}",
577            fit.tail_factor
578        );
579    }
580
581    #[test]
582    fn exponential_and_inverse_power_match_tail_sample() {
583        let exp_fit = fit_exponential_decay(&TAIL_SAMPLE_PAID_LDFS, 0, 100).expect("exp");
584        let inv_fit = fit_inverse_power(&TAIL_SAMPLE_PAID_LDFS, 0, 100).expect("inv");
585        let weibull_fit = fit_weibull(&TAIL_SAMPLE_PAID_LDFS, 0, 100).expect("weibull");
586
587        // Reference values from CAS TFWP / chainladder TailCurve on tail_sample paid.
588        assert!(
589            (exp_fit.tail_factor - 1.0324).abs() < 0.001,
590            "exp tail={}",
591            exp_fit.tail_factor
592        );
593        assert!(
594            (inv_fit.tail_factor - 1.3615).abs() < 0.005,
595            "inv tail={}",
596            inv_fit.tail_factor
597        );
598        assert!(weibull_fit.tail_factor > 1.0 && weibull_fit.tail_factor < 1.2);
599        assert!(exp_fit.r_squared > 0.98);
600    }
601
602    #[test]
603    fn estimate_mack_tail_spec_returns_positive_variance_for_tail_gt_one() {
604        let sigma_sq = [1000.0, 500.0, 250.0, 125.0, 62.5];
605        let ldf_se = [0.20, 0.12, 0.07, 0.04, 0.025];
606        let spec = estimate_mack_tail_spec(&sigma_sq, &ldf_se, 1.05).expect("spec");
607        assert!(spec.tail_sigma_sq > 0.0 && spec.tail_sigma_sq <= 62.5);
608        assert!(spec.tail_se > 0.0 && spec.tail_se <= 0.025);
609
610        let fixed = estimate_mack_tail_spec(&sigma_sq, &ldf_se, 1.0).expect("fixed");
611        assert_eq!(fixed, MackTailSpec::fixed(1.0));
612    }
613}